- void *location; /* Address of marker in code */
-} __attribute__((aligned(8)));
-
-#define CONFIG_MARKERS
-#ifdef CONFIG_MARKERS
-
-#define _DEFINE_MARKER(channel, name, tp_name_str, tp_cb, format, unique) \
- struct registers regs; \
- /* make asm label visible to C */ \
- extern struct marker make_mark_struct_name(channel, name, unique); \
- \
- /* 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 ( \
- ".section __markers_strings,\"aw\",@progbits\n\t" \
- "__mstrtab_" XSTR(channel) "_" XSTR(name) "_channel_" XSTR(unique) ":\n\t" \
- ".string \"" XSTR(channel) "\"\n\t" \
- "__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 " "\"" 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" \
- _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 */ \
- ".byte 0\n\t" /* state imv */ \
- ".byte 0\n\t" /* ptype */ \
- ".word 0\n\t" /* channel_id */ \
- ".word 0\n\t" /* event_id */ \
- ".align " XSTR(__SIZEOF_POINTER__) "\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 */ \
- "__mark_location_" XSTR(unique) ":\n\t" \
- _ASM_PTR "(1f)\n\t" /* location */ \
- ".previous\n\t" \
- "1:\n\t" \
- ); \
- \
- save_registers(®s)
-
-
-#define DEFINE_MARKER(channel, name, format, unique) \
- _DEFINE_MARKER(channel, name, NULL, NULL, format, unique)
-
-#define DEFINE_MARKER_TP(channel, name, tp_name, tp_cb, format, unique) \
- _DEFINE_MARKER(channel, name, #tp_name, tp_cb, format, unique)