1 #ifndef HAWKTRACER_SCOPED_TRACEPOINT_H 2 #define HAWKTRACER_SCOPED_TRACEPOINT_H 6 #if defined (__cplusplus) 7 #define HT_SCOPED_TRACEPOINT_MACRO_ENABLED 11 #define HT_TP_SCOPED_GENERIC_(type, c_type, timeline, label) \ 12 HawkTracer::ScopedTracepoint<c_type> HT_UNIQUE_VAR_NAME(ht_tp_scoped_tracepoint)(timeline, ht_feature_callstack_start_##type, label) 14 #elif defined(__GNUC__) 15 #define HT_SCOPED_TRACEPOINT_MACRO_ENABLED 18 void _ht_callstack_timeline_scoped_cleanup(
HT_Timeline** timeline);
23 #define HT_TP_SCOPED_GENERIC_(type, c_type, callstack_timeline, label) \ 24 HT_Timeline* _ht_callstack_timeline __attribute__ ((__cleanup__(_ht_callstack_timeline_scoped_cleanup))) \ 25 = _ht_callstack_timeline_##type##_start_and_ret(callstack_timeline, label) 29 #ifdef HT_SCOPED_TRACEPOINT_MACRO_ENABLED 31 #define HT_TP_SCOPED_INT(timeline, label) HT_TP_SCOPED_GENERIC_(int, HT_CallstackEventLabel, timeline, label) 32 #define HT_TP_SCOPED_STRING(timeline, label) HT_TP_SCOPED_GENERIC_(string, const char*, timeline, label) #define HT_DECLS_END
Defines an end of C linkage block.
Definition: macros.h:17
typedefHT_DECLS_BEGIN struct _HT_Timeline HT_Timeline
Definition: timeline.h:23
#define HT_DECLS_BEGIN
Defines a beginning of C linkage block.
Definition: macros.h:16
uint64_t HT_CallstackEventLabel
Definition: core_events.h:27