Do not use __SIZEOF_POINTER__, as it is not compatible with older gcc's
[ust.git] / include / ust / marker.h
index ee2c7e651f210846b9f81173a952bc8c482447fa..577b2fb4985cfcaaab23f75ff937085cf734cf56 100644 (file)
@@ -32,6 +32,8 @@
 #include <kcompat/list.h>
 #include <ust/processor.h>
 
+#include <bits/wordsize.h>
+
 //ust// struct module;
 //ust// struct task_struct;
 struct marker;
@@ -99,13 +101,13 @@ struct marker {
                     "__mstrtab_" XSTR(channel) "_" XSTR(name) "_name_" XSTR(unique) ":\n\t"    \
                     ".string \"" XSTR(name) "\"\n\t"                                           \
                     "__mstrtab_" XSTR(channel) "_" XSTR(name) "_format_" XSTR(unique) ":\n\t"  \
-                    ".string " XSTR(format) "\n\t"                                             \
+                    ".string " "\"" format "\"" "\n\t"                                         \
                     ".previous\n\t"                                                            \
                     ".section __markers,\"aw\",@progbits\n\t"                                  \
                     ".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 */ \
@@ -113,7 +115,7 @@ struct marker {
                     ".byte 0\n\t" /* ptype */                                                  \
                     ".word 0\n\t" /* channel_id */                                             \
                     ".word 0\n\t" /* event_id */                                               \
-                    ".align " XSTR(__SIZEOF_POINTER__) "\n\t" /* alignment */                  \
+                    ".align " XSTR(__WORDSIZE) " / 8\n\t" /* alignment */                      \
                     _ASM_PTR "(marker_probe_cb)\n\t" /* call */                                \
                     _ASM_PTR "(__mark_empty_function)\n\t" /* marker_probe_closure single.field1 */ \
                     _ASM_PTR "0\n\t" /* marker_probe_closure single.field2 */                  \
@@ -152,7 +154,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 +176,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 {                                                            \
This page took 0.036347 seconds and 4 git commands to generate.