+};
+
+#define GET_MARKER(name) (__mark_ust_##name)
+
+#define _DEFINE_MARKER(channel, name, tp_name_str, tp_cb, format, unique, m) \
+ struct registers __marker_regs; \
+ \
+ /* This next asm has to be a basic inline asm (no input/output/clobber), \
+ * because it must not require %-sign escaping, as we most certainly \
+ * have some %-signs in the format string. \
+ */ \
+ asm volatile ( \
+ /* We only define these symbols if they have not yet been defined. Indeed, \
+ * if two markers with the same channel/name are on the same line, they \
+ * will try to create the same symbols, resulting in a conflict. This \
+ * is not unusual as it can be the result of function inlining. \
+ */ \
+ ".ifndef __mstrtab_" __stringify(channel) "_" __stringify(name) "_channel_" __stringify(unique) "\n\t" \
+ /*".section __markers_strings\n\t"*/ \
+ ".section __markers_strings,\"aw\"\n\t" \
+ "__mstrtab_" __stringify(channel) "_" __stringify(name) "_channel_" __stringify(unique) ":\n\t" \
+ ".string \"" __stringify(channel) "\"\n\t" \
+ "__mstrtab_" __stringify(channel) "_" __stringify(name) "_name_" __stringify(unique) ":\n\t" \
+ ".string \"" __stringify(name) "\"\n\t" \
+ "__mstrtab_" __stringify(channel) "_" __stringify(name) "_format_" __stringify(unique) ":\n\t" \
+ ".string " "\"" format "\"" "\n\t" \
+ ".previous\n\t" \
+ ".endif\n\t" \
+ ); \
+ asm volatile ( \
+ /*".section __markers\n\t"*/ \
+ ".section __markers,\"aw\"\n\t" \
+ "2:\n\t" \
+ _ASM_PTR "(__mstrtab_" __stringify(channel) "_" __stringify(name) "_channel_" __stringify(unique) ")\n\t" /* channel string */ \
+ _ASM_PTR "(__mstrtab_" __stringify(channel) "_" __stringify(name) "_name_" __stringify(unique) ")\n\t" /* name string */ \
+ _ASM_PTR "(__mstrtab_" __stringify(channel) "_" __stringify(name) "_format_" __stringify(unique) ")\n\t" /* format string */ \
+ ".byte 0\n\t" /* state imv */ \
+ ".byte 0\n\t" /* ptype */ \
+ ".hword 0\n\t" /* channel_id */ \
+ ".hword 0\n\t" /* event_id */ \
+ ".balign " __stringify(__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 */ \
+ _ASM_PTR "0\n\t" /* marker_probe_closure *multi */ \
+ _ASM_PTR "0\n\t" /* tp_name */ \
+ _ASM_PTR "0\n\t" /* tp_cb */ \
+ _ASM_PTR "(1f)\n\t" /* location */ \
+ ".previous\n\t" \
+ /*".section __markers_ptrs\n\t"*/ \
+ ".section __markers_ptrs,\"a\"\n\t" \
+ _ASM_PTR "(2b)\n\t" \
+ ".previous\n\t" \
+ "1:\n\t" \
+ ARCH_COPY_ADDR("%[outptr]") \
+ : [outptr] "=r" (m) ); \
+ \
+ save_registers(&__marker_regs)
+
+
+#define DEFINE_MARKER(name, format, unique, m) \
+ _DEFINE_MARKER(ust, name, NULL, NULL, format, unique, m)