Add debug printout to tracepoint.c
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 9 Feb 2012 21:16:35 +0000 (16:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 9 Feb 2012 21:16:35 +0000 (16:16 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/tracepoint.c

index 66676f1be1c4458b25bfa346186ae4517b626627..7144fab40003c586a726fff5a6b4544f14d4c36c 100644 (file)
@@ -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;
 }
This page took 0.025608 seconds and 4 git commands to generate.