summaryrefslogtreecommitdiffstats
path: root/src/tracing
diff options
context:
space:
mode:
authorMohamad Gebai <mgebai@suse.com>2017-05-11 15:14:45 +0200
committerMohamad Gebai <mgebai@suse.com>2017-05-25 21:16:21 +0200
commit27fe5320bb50883eccd39cacace224302bcba43f (patch)
tree1f4263da263e2a9830b52e039e63fc1c256a45c7 /src/tracing
parentcmake: configuration for OSD function instrumentation (diff)
downloadceph-27fe5320bb50883eccd39cacace224302bcba43f.tar.xz
ceph-27fe5320bb50883eccd39cacace224302bcba43f.zip
tracing: add cyg_profile tracepoint provider
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
Diffstat (limited to 'src/tracing')
-rw-r--r--src/tracing/CMakeLists.txt4
-rw-r--r--src/tracing/cyg_profile.c6
-rw-r--r--src/tracing/cyg_profile.tp23
3 files changed, 33 insertions, 0 deletions
diff --git a/src/tracing/CMakeLists.txt b/src/tracing/CMakeLists.txt
index 6caa91cd722..72257138baa 100644
--- a/src/tracing/CMakeLists.txt
+++ b/src/tracing/CMakeLists.txt
@@ -48,6 +48,10 @@ add_tracing_library(rbd_tp librbd.tp 1.0.0)
add_tracing_library(os_tp objectstore.tp 1.0.0)
install(TARGETS rados_tp osd_tp rbd_tp os_tp DESTINATION ${CMAKE_INSTALL_LIBDIR})
+if(WITH_OSD_INSTRUMENT_FUNCTIONS)
+ add_tracing_library(cyg_profile_tp cyg_profile.tp 1.0.0)
+ install(TARGETS cyg_profile_tp DESTINATION ${CMAKE_INSTALL_LIBDIR})
+endif()
if(WITH_LTTNG AND WITH_EVENTTRACE)
add_tracing_library(eventtrace_tp eventtrace.tp 1.0.0)
install(TARGETS eventtrace_tp DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/src/tracing/cyg_profile.c b/src/tracing/cyg_profile.c
new file mode 100644
index 00000000000..c55272117ef
--- /dev/null
+++ b/src/tracing/cyg_profile.c
@@ -0,0 +1,6 @@
+#define TRACEPOINT_CREATE_PROBES
+/*
+ * The header containing our TRACEPOINT_EVENTs.
+ */
+#include "tracing/cyg_profile.h"
+
diff --git a/src/tracing/cyg_profile.tp b/src/tracing/cyg_profile.tp
new file mode 100644
index 00000000000..42d9b4c92ce
--- /dev/null
+++ b/src/tracing/cyg_profile.tp
@@ -0,0 +1,23 @@
+#include "include/int_types.h"
+
+TRACEPOINT_EVENT(lttng_ust_cyg_profile, func_entry,
+ TP_ARGS(
+ void *, func_addr,
+ void *, call_site),
+ TP_FIELDS(
+ ctf_integer_hex(unsigned long, addr, func_addr)
+ ctf_integer_hex(unsigned long, call_site, call_site)
+ )
+)
+
+TRACEPOINT_EVENT(lttng_ust_cyg_profile, func_exit,
+ TP_ARGS(
+ void *, func_addr,
+ void *, call_site
+ ),
+ TP_FIELDS(
+ ctf_integer_hex(unsigned long, addr, func_addr)
+ ctf_integer_hex(unsigned long, call_site, call_site)
+ )
+)
+