Store the callsites into the library callsite list
[lttng-ust.git] / liblttng-ust / tracepoint.c
index 013f9b2a6091a69e4e07f8d9365ac695c39cc84f..b46bd84b6ded50bb193b71ce1a8e13dfbc829650 100644 (file)
@@ -122,6 +122,7 @@ struct callsite_entry {
        struct tracepoint *tp;
 };
 
+/* coverity[+alloc] */
 static void *allocate_probes(int count)
 {
        struct tp_probes *p  = zmalloc(count * sizeof(struct tracepoint_probe)
@@ -129,6 +130,7 @@ static void *allocate_probes(int count)
        return p == NULL ? NULL : p->probes;
 }
 
+/* coverity[+free : arg-0] */
 static void release_probes(void *old)
 {
        if (old) {
@@ -312,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;
@@ -330,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);
 }
 
 /*
@@ -478,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.02483 seconds and 4 git commands to generate.