|
#define | J_TRACE(name, ...) g_autoptr(JTrace) G_PASTE(j_trace, __LINE__) G_GNUC_UNUSED = NULL |
|
#define | J_TRACE_FUNCTION(...) g_autoptr(JTrace) G_PASTE(j_trace_function, __LINE__) G_GNUC_UNUSED = NULL |
|
|
enum | JTraceFileOperation {
J_TRACE_FILE_CLOSE
, J_TRACE_FILE_CREATE
, J_TRACE_FILE_DELETE
, J_TRACE_FILE_OPEN
,
J_TRACE_FILE_READ
, J_TRACE_FILE_SEEK
, J_TRACE_FILE_STATUS
, J_TRACE_FILE_SYNC
,
J_TRACE_FILE_WRITE
} |
|
enum | JTraceFlags { J_TRACE_OFF = 0
, J_TRACE_ECHO = 1 << 0
, J_TRACE_OTF = 1 << 1
, J_TRACE_SUMMARY = 1 << 2
} |
|
The JTrace framework offers abstracted trace capabilities. It can use normal terminal output and OTF.
◆ J_TRACE
#define J_TRACE |
( |
|
name, |
|
|
|
... |
|
) |
| g_autoptr(JTrace) G_PASTE(j_trace, __LINE__) G_GNUC_UNUSED = NULL |
◆ J_TRACE_FUNCTION
#define J_TRACE_FUNCTION |
( |
|
... | ) |
g_autoptr(JTrace) G_PASTE(j_trace_function, __LINE__) G_GNUC_UNUSED = NULL |
◆ JTrace
◆ JTraceFileOperation
◆ JTraceFlags
◆ JTraceStack
◆ JTraceThread
◆ JTraceTime
◆ JTraceFileOperation
Enumerator |
---|
J_TRACE_FILE_CLOSE | |
J_TRACE_FILE_CREATE | |
J_TRACE_FILE_DELETE | |
J_TRACE_FILE_OPEN | |
J_TRACE_FILE_READ | |
J_TRACE_FILE_SEEK | |
J_TRACE_FILE_STATUS | |
J_TRACE_FILE_SYNC | |
J_TRACE_FILE_WRITE | |
◆ JTraceFlags
Flags used to enable specific trace back-ends.
Enumerator |
---|
J_TRACE_OFF | |
J_TRACE_ECHO | |
J_TRACE_OTF | |
J_TRACE_SUMMARY | |
◆ G_LOCK_DEFINE_STATIC() [1/2]
G_LOCK_DEFINE_STATIC |
( |
j_trace_echo |
| ) |
|
◆ G_LOCK_DEFINE_STATIC() [2/2]
G_LOCK_DEFINE_STATIC |
( |
j_trace_summary |
| ) |
|
◆ j_trace_counter()
void j_trace_counter |
( |
gchar const * |
name, |
|
|
guint64 |
counter_value |
|
) |
| |
Traces a counter.
- Parameters
-
name | A counter name. |
counter_value | A counter value. |
◆ j_trace_enter()
JTrace * j_trace_enter |
( |
gchar const * |
name, |
|
|
gchar const * |
format, |
|
|
|
... |
|
) |
| |
Traces the entering of a function.
- Parameters
-
name | A function name. |
format | A format string. |
- Todo:
- also blacklist nested functions
◆ j_trace_file_begin()
Traces the beginning of a file operation.
- Parameters
-
path | A file path. |
op | A file operation. |
◆ j_trace_file_end()
void j_trace_file_end |
( |
gchar const * |
path, |
|
|
JTraceFileOperation |
op, |
|
|
guint64 |
length, |
|
|
guint64 |
offset |
|
) |
| |
Traces the ending of a file operation.
- Parameters
-
path | A file path. |
op | A file operation. |
length | A length. |
offset | An offset. |
◆ j_trace_fini()
void j_trace_fini |
( |
void |
| ) |
|
Shuts down the trace framework.
void j_trace_fini(void)
Definition: jtrace.c:441
◆ j_trace_init()
void j_trace_init |
( |
gchar const * |
name | ) |
|
Initializes the trace framework. Tracing is disabled by default. Set the J_TRACE
environment variable to enable it. Valid values are echo and otf. Multiple values can be combined with commas.
void j_trace_init(gchar const *name)
Definition: jtrace.c:356
- Parameters
-
◆ j_trace_leave()
void j_trace_leave |
( |
JTrace * |
trace | ) |
|
Traces the leaving of a function.
- Parameters
-
- Todo: