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>
* 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;
assert(e);
cds_hlist_add_head(&e->hlist, head);
e->tp = tp;
+ cds_list_add(&e->node, &lib->callsites);
}
/*
if (!(*iter)->name) {
continue;
}
- add_callsite(*iter);
+ add_callsite(lib, *iter);
}
}