X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Ftracepoint.c;h=1e252ce39d859fc10cc1766757db9ace908da7fe;hb=f03d1c0acff59c8d66c6259234f31a8c542f8fd2;hp=217ef4c22af2de76e8fe2990d7facc187f825386;hpb=b728d87e617189fe9898a9492a559ecf949d2348;p=lttng-ust.git diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index 217ef4c2..1e252ce3 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -21,19 +21,24 @@ #define _LGPL_SOURCE #include -#include -#include -#include #include #include + #include #include #include #include #include -#include +#include + +#include +#include + +#include "tracepoint-internal.h" #include "ltt-tracer-core.h" +#include "jhash.h" +#include "error.h" /* Set to 1 to enable tracepoint debug output */ static const int tracepoint_debug; @@ -199,7 +204,7 @@ static struct tracepoint_entry *get_tracepoint(const char *name) struct cds_hlist_head *head; struct cds_hlist_node *node; struct tracepoint_entry *e; - u32 hash = jhash(name, strlen(name), 0); + uint32_t hash = jhash(name, strlen(name), 0); head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; cds_hlist_for_each_entry(e, node, head, hlist) { @@ -219,7 +224,7 @@ static struct tracepoint_entry *add_tracepoint(const char *name) struct cds_hlist_node *node; struct tracepoint_entry *e; size_t name_len = strlen(name) + 1; - u32 hash = jhash(name, name_len-1, 0); + uint32_t hash = jhash(name, name_len-1, 0); head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; cds_hlist_for_each_entry(e, node, head, hlist) { @@ -490,7 +495,7 @@ void tracepoint_probe_update_all(void) * Returns 0 if current not found. * Returns 1 if current found. * - * Called with tracepoint mutex held + * Called with UST lock held */ int lib_get_iter_tracepoints(struct tracepoint_iter *iter) { @@ -522,7 +527,7 @@ int lib_get_iter_tracepoints(struct tracepoint_iter *iter) * Returns whether a next tracepoint has been found (1) or not (0). * Will return the first tracepoint in the range if the input tracepoint is * NULL. - * Called with tracepoint mutex held. + * Called with UST lock held. */ int tracepoint_get_iter_range(struct tracepoint * const **tracepoint, struct tracepoint * const *begin, struct tracepoint * const *end) @@ -539,7 +544,7 @@ int tracepoint_get_iter_range(struct tracepoint * const **tracepoint, } /* - * Called with tracepoint mutex held. + * Called with UST lock held. */ static void tracepoint_get_iter(struct tracepoint_iter *iter) { @@ -568,7 +573,7 @@ void tracepoint_iter_next(struct tracepoint_iter *iter) /* * iter->tracepoint may be invalid because we blindly incremented it. * Make sure it is valid by marshalling on the tracepoints, getting the - * tracepoints from following modules if necessary. + * tracepoints from following library if necessary. */ tracepoint_get_iter(iter); }