X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libust%2Ftracepoint.c;h=6fe9cd7569444a79895d0fe7133e8a27c8e1ed4c;hb=bc237fab2306223e429c43ff003ac06c3777be99;hp=8783b53084971074bd2ac60a45527dd17505aad1;hpb=1dba3e6c054da18f238d051da5b1839bd5e4e4dd;p=ust.git diff --git a/libust/tracepoint.c b/libust/tracepoint.c index 8783b53..6fe9cd7 100644 --- a/libust/tracepoint.c +++ b/libust/tracepoint.c @@ -74,7 +74,7 @@ struct tp_probes { static inline void *allocate_probes(int count) { - struct tp_probes *p = zmalloc(count * sizeof(void *) + struct tp_probes *p = zmalloc(count * sizeof(struct probe) + sizeof(struct tp_probes)); return p == NULL ? NULL : p->probes; } @@ -87,7 +87,7 @@ static inline void *allocate_probes(int count) static inline void release_probes(void *old) { if (old) { - struct tp_probes *tp_probes = container_of(old, + struct tp_probes *tp_probes = _ust_container_of(old, struct tp_probes, probes[0]); //ust// call_rcu_sched(&tp_probes->u.rcu, rcu_free_old_probes); synchronize_rcu(); @@ -154,8 +154,8 @@ tracepoint_entry_remove_probe(struct tracepoint_entry *entry, void *probe, debug_print_probes(entry); /* (N -> M), (N > 1, M >= 0) probes */ for (nr_probes = 0; old[nr_probes].func; nr_probes++) { - if ((!probe || - old[nr_probes].func == probe && + if (!probe || + (old[nr_probes].func == probe && old[nr_probes].data == data)) nr_del++; } @@ -427,7 +427,7 @@ static void tracepoint_add_old_probes(void *old) { need_update = 1; if (old) { - struct tp_probes *tp_probes = container_of(old, + struct tp_probes *tp_probes = _ust_container_of(old, struct tp_probes, probes[0]); list_add(&tp_probes->u.list, &old_probes); }