Store the callsites into the library callsite list
authorIkaheimonen, JP <jp_ikaheimonen@mentor.com>
Thu, 3 Oct 2013 06:46:27 +0000 (06:46 +0000)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 Oct 2013 13:17:19 +0000 (09:17 -0400)
Fix the issue where the callsites are registered but never
properly unregistered.

[ Edit by Mathieu Desnoyers: minor coding style fix: remove parenthesis. ]

Signed-off-by: Ikaheimonen, JP <jp_ikaheimonen@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/tracepoint.c

index 7bb38fa9ec307f9b1eb85670c7b90a456e9bce3d..b46bd84b6ded50bb193b71ce1a8e13dfbc829650 100644 (file)
@@ -314,7 +314,7 @@ static void remove_tracepoint(struct tracepoint_entry *e)
  * Add the callsite to the callsite hash table. Must be called with
  * tracepoint mutex held.
  */
-static void add_callsite(struct tracepoint *tp)
+static void add_callsite(struct tracepoint_lib * lib, struct tracepoint *tp)
 {
        struct cds_hlist_head *head;
        struct callsite_entry *e;
@@ -332,6 +332,7 @@ static void add_callsite(struct tracepoint *tp)
        assert(e);
        cds_hlist_add_head(&e->hlist, head);
        e->tp = tp;
+       cds_list_add(&e->node, &lib->callsites);
 }
 
 /*
@@ -480,7 +481,7 @@ static void lib_register_callsites(struct tracepoint_lib *lib)
                if (!(*iter)->name) {
                        continue;
                }
-               add_callsite(*iter);
+               add_callsite(lib, *iter);
        }
 }
 
This page took 0.025434 seconds and 4 git commands to generate.