From: Pierre-Marc Fournier Date: Wed, 13 Jan 2010 19:33:20 +0000 (-0500) Subject: Replace __COUNTER__ with the more portable __LINE__ X-Git-Tag: v1.9.1~790 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e05cba90ba95c84c8377baf22662b81fb2bfaf64;p=lttng-ust.git Replace __COUNTER__ with the more portable __LINE__ Also, change visibility of marker structs so they are visible only to the current compilation unit. This allows to have the same marker on the same line in two different files. It however does not allow to have two identical (channel and name) markers on the same line of the same file. --- diff --git a/include/ust/marker.h b/include/ust/marker.h index 18628ccd..d9c0e5f0 100644 --- a/include/ust/marker.h +++ b/include/ust/marker.h @@ -105,7 +105,7 @@ struct marker { ".align 8\n\t" \ XSTR(make_mark_struct_name(channel, name, unique)) ":\n\t" \ ".global " XSTR(make_mark_struct_name(channel, name, unique)) "\n\t" \ - ".hidden " XSTR(make_mark_struct_name(channel, name, unique)) "\n\t" \ + ".local " XSTR(make_mark_struct_name(channel, name, unique)) "\n\t" \ _ASM_PTR "(__mstrtab_" XSTR(channel) "_" XSTR(name) "_channel_" XSTR(unique) ")\n\t" /* channel string */ \ _ASM_PTR "(__mstrtab_" XSTR(channel) "_" XSTR(name) "_name_" XSTR(unique) ")\n\t" /* name string */ \ _ASM_PTR "(__mstrtab_" XSTR(channel) "_" XSTR(name) "_format_" XSTR(unique) ")\n\t" /* format string */ \ @@ -152,7 +152,7 @@ struct marker { __mark_struct_##channel##_##name##_##unique #define __trace_mark(generic, channel, name, call_private, format, args...) \ - __trace_mark_counter(generic, channel, name, __COUNTER__, call_private, format, ## args) + __trace_mark_counter(generic, channel, name, __LINE__, call_private, format, ## args) #define __trace_mark_counter(generic, channel, name, unique, call_private, format, args...) \ do { \ @@ -174,7 +174,7 @@ struct marker { } while (0) #define __trace_mark_tp(channel, name, call_private, tp_name, tp_cb, format, args...) \ - __trace_mark_tp_counter(channel, name, __COUNTER__, call_private, tp_name, tp_cb, format, ## args) + __trace_mark_tp_counter(channel, name, __LINE__, call_private, tp_name, tp_cb, format, ## args) #define __trace_mark_tp_counter(channel, name, unique, call_private, tp_name, tp_cb, format, args...) \ do { \