- save_registers(®s)
-
-
-#define DEFINE_MARKER(channel, name, format, unique, m) \
- _DEFINE_MARKER(channel, name, NULL, NULL, format, unique, m)
-
-#define DEFINE_MARKER_TP(channel, name, tp_name, tp_cb, format, unique, m) \
- _DEFINE_MARKER(channel, name, #tp_name, tp_cb, format, unique, m)
+ save_registers(&__ust_marker_regs)
+
+
+#define DEFINE_UST_MARKER(name, format, unique, m) \
+ _DEFINE_UST_MARKER(ust, name, NULL, NULL, format, unique, m)
+
+#define DEFINE_UST_MARKER_TP(name, tp_name, tp_cb, format) \
+ _DEFINE_UST_MARKER_TP(ust, name, #tp_name, tp_cb, format)
+
+#define _DEFINE_UST_MARKER_TP(channel, name, tp_name_str, tp_cb, format)\
+ static const char __mstrtab_##channel##_##name[] \
+ __attribute__((section("__ust_marker_strings"))) \
+ = #channel "\0" #name "\0" format; \
+ static struct ust_marker __ust_marker_##channel##_##name\
+ __attribute__((section("__ust_marker"))) = \
+ { __mstrtab_##channel##_##name, \
+ &__mstrtab_##channel##_##name[sizeof(#channel)],\
+ &__mstrtab_##channel##_##name[sizeof(#channel) + sizeof(#name)], \
+ 0, 0, 0, 0, ust_marker_probe_cb, \
+ { __ust_marker_empty_function, NULL}, \
+ NULL, tp_name_str, tp_cb }; \
+ static struct ust_marker * const __ust_marker_ptr_##channel##_##name \
+ __attribute__((used, section("__ust_marker_ptrs"))) = \
+ &__ust_marker_##channel##_##name;