From: Mathieu Desnoyers Date: Thu, 9 Feb 2012 21:16:35 +0000 (-0500) Subject: Add debug printout to tracepoint.c X-Git-Tag: v1.9.6~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=05780d81d89c19ff3f9356796bb636a255f11077;p=lttng-ust.git Add debug printout to tracepoint.c Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index 66676f1b..7144fab4 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -401,6 +401,8 @@ int __tracepoint_probe_register(const char *name, void *probe, void *data) void *old; int ret = 0; + DBG("Registering probe to tracepoint %s", name); + pthread_mutex_lock(&tracepoint_mutex); old = tracepoint_add_probe(name, probe, data); if (IS_ERR(old)) { @@ -442,6 +444,8 @@ int __tracepoint_probe_unregister(const char *name, void *probe, void *data) void *old; int ret = 0; + DBG("Un-registering probe from tracepoint %s", name); + pthread_mutex_lock(&tracepoint_mutex); old = tracepoint_remove_probe(name, probe, data); if (IS_ERR(old)) { @@ -504,6 +508,8 @@ int tracepoint_probe_unregister_noupdate(const char *name, void *probe, void *old; int ret = 0; + DBG("Un-registering probe from tracepoint %s", name); + pthread_mutex_lock(&tracepoint_mutex); old = tracepoint_remove_probe(name, probe, data); if (IS_ERR(old)) { @@ -608,6 +614,13 @@ lib_added: DBG("just registered a tracepoints section from %p and having %d tracepoints", tracepoints_start, tracepoints_count); + if (ust_debug()) { + int i; + + for (i = 0; i < tracepoints_count; i++) { + DBG("registered tracepoint: %s", tracepoints_start[i]->name); + } + } return 0; }