#include <inttypes.h>
Go to the source code of this file.
Classes | |
class | minitrace::MTRScopedTrace |
class | minitrace::MTRScopedTraceArg |
class | minitrace::MTRScopedTraceLimit |
Namespaces | |
namespace | minitrace |
Defines | |
#define | INTERNAL_MINITRACE_BUFFER_SIZE 1000000 |
#define | MTR_BEGIN(c, n) internal_mtr_raw_event(c, n, 'B', nullptr) |
#define | MTR_BEGIN_C(c, n, aname, astrval) internal_mtr_raw_event_arg(c, n, 'B', 0, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
#define | MTR_BEGIN_FUNC() MTR_BEGIN(__FILE__, __FUNCTION__) |
#define | MTR_BEGIN_FUNC_C(aname, arg) MTR_BEGIN_C(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_BEGIN_FUNC_I(aname, arg) MTR_BEGIN_I(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_BEGIN_FUNC_S(aname, arg) MTR_BEGIN_S(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_BEGIN_I(c, n, aname, aintval) internal_mtr_raw_event_arg(c, n, 'B', 0, MTR_ARG_TYPE_INT, aname, (void*)(intptr_t)(aintval)) |
#define | MTR_BEGIN_S(c, n, aname, astrval) internal_mtr_raw_event_arg(c, n, 'B', 0, MTR_ARG_TYPE_STRING_COPY, aname, (void *)(astrval)) |
#define | MTR_COUNTER(c, n, val) internal_mtr_raw_event_arg(c, n, 'C', 0, MTR_ARG_TYPE_INT, n, (void *)(intptr_t)(val)) |
#define | MTR_ENABLED |
#define | MTR_END(c, n) internal_mtr_raw_event(c, n, 'E', nullptr) |
#define | MTR_END_C(c, n, aname, astrval) internal_mtr_raw_event_arg(c, n, 'E', 0, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
#define | MTR_END_FUNC() MTR_END(__FILE__, __FUNCTION__) |
#define | MTR_END_FUNC_C(aname, arg) MTR_END_C(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_END_FUNC_I(aname, arg) MTR_END_I(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_END_FUNC_S(aname, arg) MTR_END_S(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_END_I(c, n, aname, aintval) internal_mtr_raw_event_arg(c, n, 'E', 0, MTR_ARG_TYPE_INT, aname, (void*)(intptr_t)(aintval)) |
#define | MTR_END_S(c, n, aname, astrval) internal_mtr_raw_event_arg(c, n, 'E', 0, MTR_ARG_TYPE_STRING_COPY, aname, (void *)(astrval)) |
#define | MTR_FINISH(c, n, id) internal_mtr_raw_event(c, n, 'F', (void *)(id)) |
#define | MTR_FLOW_FINISH(c, n, id) internal_mtr_raw_event(c, n, 'f', (void *)(id)) |
#define | MTR_FLOW_START(c, n, id) internal_mtr_raw_event(c, n, 's', (void *)(id)) |
#define | MTR_FLOW_STEP(c, n, id, step) internal_mtr_raw_event_arg(c, n, 't', (void *)(id), MTR_ARG_TYPE_STRING_CONST, "step", (void *)(step)) |
#define | MTR_INSTANT(c, n) internal_mtr_raw_event(c, n, 'I', nullptr) |
#define | MTR_INSTANT_C(c, n, aname, astrval) internal_mtr_raw_event(c, n, 'I', 0, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
#define | MTR_INSTANT_FUNC() MTR_INSTANT(__FILE__, __FUNCTION__) |
#define | MTR_INSTANT_I(c, n, aname, aintval) internal_mtr_raw_event(c, n, 'I', 0, MTR_ARG_TYPE_INT, aname, (void *)(aintval)) |
#define | MTR_MAX_ARGS 1 |
#define | MTR_META_PROCESS_NAME(n) internal_mtr_raw_event_arg("", "process_name", 'M', 0, MTR_ARG_TYPE_STRING_COPY, "name", (void *)(n)) |
#define | MTR_META_THREAD_NAME(n) internal_mtr_raw_event_arg("", "thread_name", 'M', 0, MTR_ARG_TYPE_STRING_COPY, "name", (void *)(n)) |
#define | MTR_META_THREAD_SORT_INDEX(i) internal_mtr_raw_event_arg("", "thread_sort_index", 'M', 0, MTR_ARG_TYPE_INT, "sort_index", (void *)(i)) |
#define | MTR_SCOPE(c, n) MTRScopedTrace ____mtr_scope(c, n) |
#define | MTR_SCOPE_C(c, n, aname, astrval) MTRScopedTraceArg ____mtr_scope(c, n, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
#define | MTR_SCOPE_FUNC() MTR_SCOPE(__FILE__, __FUNCTION__) |
#define | MTR_SCOPE_FUNC_C(aname, arg) MTR_SCOPE_C(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_SCOPE_FUNC_I(aname, arg) MTR_SCOPE_I(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_SCOPE_FUNC_LIMIT_MS(l) MTRScopedTraceLimit ____mtr_scope(__FILE__, __FUNCTION__, 1) |
#define | MTR_SCOPE_FUNC_LIMIT_S(l) MTRScopedTraceLimit ____mtr_scope(__FILE__, __FUNCTION__, l) |
#define | MTR_SCOPE_FUNC_S(aname, arg) MTR_SCOPE_S(__FILE__, __FUNCTION__, aname, arg) |
#define | MTR_SCOPE_I(c, n, aname, aintval) MTRScopedTraceArg ____mtr_scope(c, n, MTR_ARG_TYPE_INT, aname, (void*)(intptr_t)(aintval)) |
#define | MTR_SCOPE_LIMIT(c, n, l) MTRScopedTraceLimit ____mtr_scope(c, n, l) |
#define | MTR_SCOPE_S(c, n, aname, astrval) MTRScopedTraceArg ____mtr_scope(c, n, MTR_ARG_TYPE_STRING_COPY, aname, (void *)(astrval)) |
#define | MTR_START(c, n, id) internal_mtr_raw_event(c, n, 'S', (void *)(id)) |
#define | MTR_STEP(c, n, id, step) internal_mtr_raw_event_arg(c, n, 'T', (void *)(id), MTR_ARG_TYPE_STRING_CONST, "step", (void *)(step)) |
Enumerations | |
enum | minitrace::mtr_arg_type { minitrace::MTR_ARG_TYPE_NONE = 0, minitrace::MTR_ARG_TYPE_INT = 1, minitrace::MTR_ARG_TYPE_STRING_CONST = 8, minitrace::MTR_ARG_TYPE_STRING_COPY = 9 } |
Functions | |
void | minitrace::internal_mtr_raw_event (const char *category, const char *name, char ph, void *id) |
void | minitrace::internal_mtr_raw_event_arg (const char *category, const char *name, char ph, void *id, mtr_arg_type arg_type, const char *arg_name, void *arg_value) |
void | minitrace::mtr_flush () |
void | minitrace::mtr_init (const char *json_file) |
const char * | minitrace::mtr_pool_string (const char *str) |
void | minitrace::mtr_register_sigint_handler () |
void | minitrace::mtr_shutdown () |
void | minitrace::mtr_start () |
void | minitrace::mtr_stop () |
int64_t | minitrace::mtr_time_usec () |
#define INTERNAL_MINITRACE_BUFFER_SIZE 1000000 |
Definition at line 35 of file minitrace.h.
#define MTR_BEGIN | ( | c, | |
n | |||
) | internal_mtr_raw_event(c, n, 'B', nullptr) |
Definition at line 96 of file minitrace.h.
#define MTR_BEGIN_C | ( | c, | |
n, | |||
aname, | |||
astrval | |||
) | internal_mtr_raw_event_arg(c, n, 'B', 0, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
Definition at line 118 of file minitrace.h.
#define MTR_BEGIN_FUNC | ( | ) | MTR_BEGIN(__FILE__, __FUNCTION__) |
Definition at line 187 of file minitrace.h.
#define MTR_BEGIN_FUNC_C | ( | aname, | |
arg | |||
) | MTR_BEGIN_C(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 199 of file minitrace.h.
#define MTR_BEGIN_FUNC_I | ( | aname, | |
arg | |||
) | MTR_BEGIN_I(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 203 of file minitrace.h.
#define MTR_BEGIN_FUNC_S | ( | aname, | |
arg | |||
) | MTR_BEGIN_S(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 195 of file minitrace.h.
#define MTR_BEGIN_I | ( | c, | |
n, | |||
aname, | |||
aintval | |||
) | internal_mtr_raw_event_arg(c, n, 'B', 0, MTR_ARG_TYPE_INT, aname, (void*)(intptr_t)(aintval)) |
Definition at line 126 of file minitrace.h.
#define MTR_BEGIN_S | ( | c, | |
n, | |||
aname, | |||
astrval | |||
) | internal_mtr_raw_event_arg(c, n, 'B', 0, MTR_ARG_TYPE_STRING_COPY, aname, (void *)(astrval)) |
Definition at line 122 of file minitrace.h.
#define MTR_COUNTER | ( | c, | |
n, | |||
val | |||
) | internal_mtr_raw_event_arg(c, n, 'C', 0, MTR_ARG_TYPE_INT, n, (void *)(intptr_t)(val)) |
Definition at line 136 of file minitrace.h.
#define MTR_ENABLED |
Definition at line 26 of file minitrace.h.
#define MTR_END | ( | c, | |
n | |||
) | internal_mtr_raw_event(c, n, 'E', nullptr) |
Definition at line 97 of file minitrace.h.
#define MTR_END_C | ( | c, | |
n, | |||
aname, | |||
astrval | |||
) | internal_mtr_raw_event_arg(c, n, 'E', 0, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
Definition at line 119 of file minitrace.h.
#define MTR_END_FUNC | ( | ) | MTR_END(__FILE__, __FUNCTION__) |
Definition at line 188 of file minitrace.h.
#define MTR_END_FUNC_C | ( | aname, | |
arg | |||
) | MTR_END_C(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 200 of file minitrace.h.
#define MTR_END_FUNC_I | ( | aname, | |
arg | |||
) | MTR_END_I(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 204 of file minitrace.h.
#define MTR_END_FUNC_S | ( | aname, | |
arg | |||
) | MTR_END_S(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 196 of file minitrace.h.
#define MTR_END_I | ( | c, | |
n, | |||
aname, | |||
aintval | |||
) | internal_mtr_raw_event_arg(c, n, 'E', 0, MTR_ARG_TYPE_INT, aname, (void*)(intptr_t)(aintval)) |
Definition at line 127 of file minitrace.h.
#define MTR_END_S | ( | c, | |
n, | |||
aname, | |||
astrval | |||
) | internal_mtr_raw_event_arg(c, n, 'E', 0, MTR_ARG_TYPE_STRING_COPY, aname, (void *)(astrval)) |
Definition at line 123 of file minitrace.h.
#define MTR_FINISH | ( | c, | |
n, | |||
id | |||
) | internal_mtr_raw_event(c, n, 'F', (void *)(id)) |
Definition at line 104 of file minitrace.h.
#define MTR_FLOW_FINISH | ( | c, | |
n, | |||
id | |||
) | internal_mtr_raw_event(c, n, 'f', (void *)(id)) |
Definition at line 109 of file minitrace.h.
#define MTR_FLOW_START | ( | c, | |
n, | |||
id | |||
) | internal_mtr_raw_event(c, n, 's', (void *)(id)) |
Definition at line 107 of file minitrace.h.
#define MTR_FLOW_STEP | ( | c, | |
n, | |||
id, | |||
step | |||
) | internal_mtr_raw_event_arg(c, n, 't', (void *)(id), MTR_ARG_TYPE_STRING_CONST, "step", (void *)(step)) |
Definition at line 108 of file minitrace.h.
#define MTR_INSTANT | ( | c, | |
n | |||
) | internal_mtr_raw_event(c, n, 'I', nullptr) |
Definition at line 131 of file minitrace.h.
#define MTR_INSTANT_C | ( | c, | |
n, | |||
aname, | |||
astrval | |||
) | internal_mtr_raw_event(c, n, 'I', 0, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
Definition at line 132 of file minitrace.h.
#define MTR_INSTANT_FUNC | ( | ) | MTR_INSTANT(__FILE__, __FUNCTION__) |
Definition at line 190 of file minitrace.h.
#define MTR_INSTANT_I | ( | c, | |
n, | |||
aname, | |||
aintval | |||
) | internal_mtr_raw_event(c, n, 'I', 0, MTR_ARG_TYPE_INT, aname, (void *)(aintval)) |
Definition at line 133 of file minitrace.h.
#define MTR_MAX_ARGS 1 |
Definition at line 83 of file minitrace.h.
#define MTR_META_PROCESS_NAME | ( | n | ) | internal_mtr_raw_event_arg("", "process_name", 'M', 0, MTR_ARG_TYPE_STRING_COPY, "name", (void *)(n)) |
Definition at line 140 of file minitrace.h.
#define MTR_META_THREAD_NAME | ( | n | ) | internal_mtr_raw_event_arg("", "thread_name", 'M', 0, MTR_ARG_TYPE_STRING_COPY, "name", (void *)(n)) |
Definition at line 141 of file minitrace.h.
#define MTR_META_THREAD_SORT_INDEX | ( | i | ) | internal_mtr_raw_event_arg("", "thread_sort_index", 'M', 0, MTR_ARG_TYPE_INT, "sort_index", (void *)(i)) |
Definition at line 142 of file minitrace.h.
#define MTR_SCOPE | ( | c, | |
n | |||
) | MTRScopedTrace ____mtr_scope(c, n) |
Definition at line 98 of file minitrace.h.
#define MTR_SCOPE_C | ( | c, | |
n, | |||
aname, | |||
astrval | |||
) | MTRScopedTraceArg ____mtr_scope(c, n, MTR_ARG_TYPE_STRING_CONST, aname, (void *)(astrval)) |
Definition at line 120 of file minitrace.h.
#define MTR_SCOPE_FUNC | ( | ) | MTR_SCOPE(__FILE__, __FUNCTION__) |
Definition at line 189 of file minitrace.h.
#define MTR_SCOPE_FUNC_C | ( | aname, | |
arg | |||
) | MTR_SCOPE_C(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 201 of file minitrace.h.
#define MTR_SCOPE_FUNC_I | ( | aname, | |
arg | |||
) | MTR_SCOPE_I(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 205 of file minitrace.h.
#define MTR_SCOPE_FUNC_LIMIT_MS | ( | l | ) | MTRScopedTraceLimit ____mtr_scope(__FILE__, __FUNCTION__, 1) |
Definition at line 192 of file minitrace.h.
#define MTR_SCOPE_FUNC_LIMIT_S | ( | l | ) | MTRScopedTraceLimit ____mtr_scope(__FILE__, __FUNCTION__, l) |
Definition at line 191 of file minitrace.h.
#define MTR_SCOPE_FUNC_S | ( | aname, | |
arg | |||
) | MTR_SCOPE_S(__FILE__, __FUNCTION__, aname, arg) |
Definition at line 197 of file minitrace.h.
#define MTR_SCOPE_I | ( | c, | |
n, | |||
aname, | |||
aintval | |||
) | MTRScopedTraceArg ____mtr_scope(c, n, MTR_ARG_TYPE_INT, aname, (void*)(intptr_t)(aintval)) |
Definition at line 128 of file minitrace.h.
#define MTR_SCOPE_LIMIT | ( | c, | |
n, | |||
l | |||
) | MTRScopedTraceLimit ____mtr_scope(c, n, l) |
Definition at line 99 of file minitrace.h.
#define MTR_SCOPE_S | ( | c, | |
n, | |||
aname, | |||
astrval | |||
) | MTRScopedTraceArg ____mtr_scope(c, n, MTR_ARG_TYPE_STRING_COPY, aname, (void *)(astrval)) |
Definition at line 124 of file minitrace.h.
#define MTR_START | ( | c, | |
n, | |||
id | |||
) | internal_mtr_raw_event(c, n, 'S', (void *)(id)) |
Definition at line 102 of file minitrace.h.
#define MTR_STEP | ( | c, | |
n, | |||
id, | |||
step | |||
) | internal_mtr_raw_event_arg(c, n, 'T', (void *)(id), MTR_ARG_TYPE_STRING_CONST, "step", (void *)(step)) |
Definition at line 103 of file minitrace.h.