X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Ftracepoint.h;h=9ec52ef907880f3304c28e6cd8b1b4ba83500ae6;hb=3202f63a4d5e599bf22d6711828614b58c7efcba;hp=8fa73ce7a55a34f5dcbd0b2179a91b8847cda934;hpb=612e9ce4e5cc3a1292522a563789f6aab6c421b1;p=lttng-ust.git diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 8fa73ce7..9ec52ef9 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -191,10 +191,10 @@ void lttng_ust_tracepoint_cb_##_provider##___##_name(LTTNG_UST__TP_ARGS_PROTO(__ { \ struct lttng_ust_tracepoint_probe *__tp_probe; \ \ - if (caa_unlikely(!TP_RCU_LINK_TEST())) \ + if (caa_unlikely(!LTTNG_UST_TP_RCU_LINK_TEST())) \ return; \ - tp_rcu_read_lock(); \ - __tp_probe = tp_rcu_dereference(lttng_ust_tracepoint_##_provider##___##_name.probes); \ + lttng_ust_tp_rcu_read_lock(); \ + __tp_probe = lttng_ust_tp_rcu_dereference(lttng_ust_tracepoint_##_provider##___##_name.probes); \ if (caa_unlikely(!__tp_probe)) \ goto end; \ do { \ @@ -205,7 +205,7 @@ void lttng_ust_tracepoint_cb_##_provider##___##_name(LTTNG_UST__TP_ARGS_PROTO(__ (LTTNG_UST__TP_ARGS_DATA_VAR(__VA_ARGS__)); \ } while ((++__tp_probe)->func); \ end: \ - tp_rcu_read_unlock(); \ + lttng_ust_tp_rcu_read_unlock(); \ } \ static inline \ void lttng_ust_tracepoint_register_##_provider##___##_name(char *provider_name, char *event_name, \ @@ -350,17 +350,17 @@ lttng_ust_tracepoint__init_urcu_sym(void) lttng_ust_tracepoint_dlopen_ptr->rcu_read_lock_sym = URCU_FORCE_CAST(void (*)(void), dlsym(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle, - "tp_rcu_read_lock")); + "lttng_ust_tp_rcu_read_lock")); if (!lttng_ust_tracepoint_dlopen_ptr->rcu_read_unlock_sym) lttng_ust_tracepoint_dlopen_ptr->rcu_read_unlock_sym = URCU_FORCE_CAST(void (*)(void), dlsym(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle, - "tp_rcu_read_unlock")); + "lttng_ust_tp_rcu_read_unlock")); if (!lttng_ust_tracepoint_dlopen_ptr->rcu_dereference_sym) lttng_ust_tracepoint_dlopen_ptr->rcu_dereference_sym = URCU_FORCE_CAST(void *(*)(void *p), dlsym(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle, - "tp_rcu_dereference_sym")); + "lttng_ust_tp_rcu_dereference_sym")); } #else static inline void @@ -587,6 +587,40 @@ lttng_ust__tracepoints__ptrs_destroy(void) #define tracepoint_enabled lttng_ust_tracepoint_enabled #define TP_ARGS LTTNG_UST_TP_ARGS #define TP_FIELDS LTTNG_UST_TP_FIELDS + +#define ctf_integer lttng_ust_field_integer +#define ctf_integer_hex lttng_ust_field_integer_hex +#define ctf_integer_network lttng_ust_field_integer_network +#define ctf_integer_network_hex lttng_ust_field_integer_network_hex +#define ctf_integer_nowrite lttng_ust_field_integer_nowrite + +#define ctf_float lttng_ust_field_float +#define ctf_float_nowrite lttng_ust_field_float_nowrite + +#define ctf_array lttng_ust_field_array +#define ctf_array_hex lttng_ust_field_array_hex +#define ctf_array_network lttng_ust_field_array_network +#define ctf_array_network_hex lttng_ust_field_array_network_hex +#define ctf_array_text lttng_ust_field_array_text +#define ctf_array_nowrite lttng_ust_field_array_nowrite +#define ctf_array_nowrite_hex lttng_ust_field_array_nowrite_hex +#define ctf_array_network_nowrite lttng_ust_field_array_network_nowrite +#define ctf_array_network_nowrite_hex lttng_ust_field_array_network_nowrite_hex +#define ctf_array_text_nowrite lttng_ust_field_array_text_nowrite + +#define ctf_sequence lttng_ust_field_sequence +#define ctf_sequence_hex lttng_ust_field_sequence_hex +#define ctf_sequence_network lttng_ust_field_sequence_network +#define ctf_sequence_network_hex lttng_ust_field_sequence_network_hex +#define ctf_sequence_text lttng_ust_field_sequence_text +#define ctf_sequence_nowrite lttng_ust_field_sequence_nowrite +#define ctf_sequence_nowrite_hex lttng_ust_field_sequence_nowrite_hex +#define ctf_sequence_network_nowrite lttng_ust_field_sequence_network_nowrite +#define ctf_sequence_network_nowrite_hex lttng_ust_field_sequence_network_nowrite_hex +#define ctf_sequence_text_nowrite lttng_ust_field_sequence_text_nowrite + +#define ctf_string lttng_ust_field_string +#define ctf_string_nowrite lttng_ust_field_string_nowrite #endif /* #if LTTNG_UST_COMPAT_API(0) */ #ifdef __cplusplus @@ -609,7 +643,7 @@ lttng_ust__tracepoints__ptrs_destroy(void) * An example: * * LTTNG_UST_TRACEPOINT_ENUM(someproject_component, enumname, - * TP_ENUM_VALUES( + * LTTNG_UST_TP_ENUM_VALUES( * ctf_enum_value("even", 0) * ctf_enum_value("uneven", 1) * ctf_enum_range("twoto4", 2, 4) @@ -619,7 +653,7 @@ lttng_ust__tracepoints__ptrs_destroy(void) * * Where "someproject_component" is the name of the component this enumeration * belongs to and "enumname" identifies this enumeration. Inside the - * TP_ENUM_VALUES macro is the actual mapping. Each string value can map + * LTTNG_UST_TP_ENUM_VALUES macro is the actual mapping. Each string value can map * to either a single value with ctf_enum_value or a range of values * with ctf_enum_range. * @@ -663,24 +697,24 @@ lttng_ust__tracepoints__ptrs_destroy(void) * * LTTNG_UST_TP_FIELDS( * * Integer, printed in base 10 * - * ctf_integer(int, field_a, arg0) + * lttng_ust_field_integer(int, field_a, arg0) * * * Integer, printed with 0x base 16 * - * ctf_integer_hex(unsigned long, field_d, arg1) + * lttng_ust_field_integer_hex(unsigned long, field_d, arg1) * * * Enumeration * * ctf_enum(someproject_component, enum_name, int, field_e, arg0) * * * Array Sequence, printed as UTF8-encoded array of bytes * - * ctf_array_text(char, field_b, string, FIXED_LEN) - * ctf_sequence_text(char, field_c, string, size_t, strlen) + * lttng_ust_field_array_text(char, field_b, string, FIXED_LEN) + * lttng_ust_field_sequence_text(char, field_c, string, size_t, strlen) * * * String, printed as UTF8-encoded string * - * ctf_string(field_e, string) + * lttng_ust_field_string(field_e, string) * * * Array sequence of signed integer values * - * ctf_array(long, field_f, arg4, FIXED_LEN4) - * ctf_sequence(long, field_g, arg4, size_t, arg4_len) + * lttng_ust_field_array(long, field_f, arg4, FIXED_LEN4) + * lttng_ust_field_sequence(long, field_g, arg4, size_t, arg4_len) * ) * ) * @@ -815,7 +849,7 @@ lttng_ust__tracepoints__ptrs_destroy(void) * LTTNG_UST_TRACEPOINT_LOGLEVEL(< [com_company_]project[_component] >, < event >, * < loglevel_name >) * - * The TRACEPOINT_PROVIDER must be already declared before declaring a + * The LTTNG_UST_TRACEPOINT_PROVIDER must be already declared before declaring a * LTTNG_UST_TRACEPOINT_LOGLEVEL. */ @@ -861,8 +895,12 @@ enum { #endif /* #ifndef LTTNG_UST_TRACEPOINT_LOGLEVEL */ -#ifndef TRACEPOINT_MODEL_EMF_URI +#ifndef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI + +#define LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(provider, name, uri) -#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri) +#if LTTNG_UST_COMPAT_API(0) +#define TRACEPOINT_MODEL_EMF_URI LTTNG_UST_TRACEPOINT_MODEL_EMF_URI +#endif -#endif /* #ifndef TRACEPOINT_MODEL_EMF_URI */ +#endif /* #ifndef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI */