From 10efa8d7c2e8c5c6d196fc1b65f660e0f0c03521 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 10 Jun 2015 13:27:18 +0200 Subject: [PATCH] Fix: function instrumentation ip context Signed-off-by: Mathieu Desnoyers --- liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c | 3 ++- liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h | 2 +- liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c index ab42185c..61ece1f8 100644 --- a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c +++ b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c @@ -24,6 +24,7 @@ #define TRACEPOINT_DEFINE #define TRACEPOINT_CREATE_PROBES +#define TP_IP_PARAM func_addr #include "lttng-ust-cyg-profile-fast.h" void __cyg_profile_func_enter(void *this_fn, void *call_site) @@ -39,5 +40,5 @@ void __cyg_profile_func_enter(void *this_fn, void *call_site) void __cyg_profile_func_exit(void *this_fn, void *call_site) { - tracepoint(lttng_ust_cyg_profile_fast, func_exit); + tracepoint(lttng_ust_cyg_profile_fast, func_exit, this_fn); } diff --git a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h index 0a6c67f9..ea638386 100644 --- a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h +++ b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h @@ -44,7 +44,7 @@ TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile_fast, func_entry, TRACE_DEBUG_FUNCTION) TRACEPOINT_EVENT(lttng_ust_cyg_profile_fast, func_exit, - TP_ARGS(void), + TP_ARGS(void *, func_addr), TP_FIELDS() ) diff --git a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c index 2ff11595..c63b39b0 100644 --- a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c +++ b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c @@ -24,6 +24,7 @@ #define TRACEPOINT_DEFINE #define TRACEPOINT_CREATE_PROBES +#define TP_IP_PARAM func_addr #include "lttng-ust-cyg-profile.h" void __cyg_profile_func_enter(void *this_fn, void *call_site) -- 2.34.1