rte_trace.h - Man Page
Synopsis
#include <stdbool.h>
#include <stdio.h>
#include <rte_common.h>
#include <rte_compat.h>
Enumerations
enum rte_trace_mode { RTE_TRACE_MODE_OVERWRITE, RTE_TRACE_MODE_DISCARD }
Functions
__rte_experimental bool rte_trace_is_enabled (void)
static __rte_experimental __rte_always_inline bool rte_trace_feature_is_enabled (void)
__rte_experimental void rte_trace_mode_set (enum rte_trace_mode mode)
__rte_experimental enum rte_trace_mode rte_trace_mode_get (void)
__rte_experimental int rte_trace_pattern (const char *pattern, bool enable)
__rte_experimental int rte_trace_regexp (const char *regex, bool enable)
__rte_experimental int rte_trace_save (void)
__rte_experimental int rte_trace_metadata_dump (FILE *f)
__rte_experimental void rte_trace_dump (FILE *f)
Detailed Description
RTE Trace API
This file provides the trace API to RTE applications.
- Warning
EXPERIMENTAL: this API may change without prior notice
Definition in file rte_trace.h.
Enumeration Type Documentation
enum rte_trace_mode
Enumerate trace mode operation.
Enumerator
- RTE_TRACE_MODE_OVERWRITE
In this mode, when no space is left in the trace buffer, the subsequent events overwrite the old events.
- RTE_TRACE_MODE_DISCARD
In this mode, when no space is left in the trace buffer, the subsequent events shall not be recorded.
Definition at line 61 of file rte_trace.h.
Function Documentation
__rte_experimental bool rte_trace_is_enabled (void )
Test if trace is enabled.
- Returns
true if trace is enabled, false otherwise.
static __rte_experimental __rte_always_inline bool rte_trace_feature_is_enabled (void ) [static]
- Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice
Test if trace feature is enabled at compile time.
- Returns
true if trace feature is enabled, false otherwise.
Definition at line 49 of file rte_trace.h.
__rte_experimental void rte_trace_mode_set (enum rte_trace_mode mode)
Set the trace mode.
- Parameters
mode Trace mode.
__rte_experimental enum rte_trace_mode rte_trace_mode_get (void )
Get the trace mode.
- Returns
The current trace mode.
__rte_experimental int rte_trace_pattern (const char * pattern, bool enable)
Enable/Disable a set of tracepoints based on globbing pattern.
- Parameters
pattern The globbing pattern identifying the tracepoint.
enable true to enable tracepoint, false to disable the tracepoint, upon match.
Returns
- 0: Success and no pattern match.
- 1: Success and found pattern match.
- (-ERANGE): Tracepoint object is not registered.
__rte_experimental int rte_trace_regexp (const char * regex, bool enable)
Enable/Disable a set of tracepoints based on regular expression.
- Parameters
regex A regular expression identifying the tracepoint.
enable true to enable tracepoint, false to disable the tracepoint, upon match.
Returns
- 0: Success and no pattern match.
- 1: Success and found pattern match.
- (-ERANGE): Tracepoint object is not registered.
- (-EINVAL): Invalid regular expression rule.
__rte_experimental int rte_trace_save (void )
Save the trace buffer to the trace directory.
By default, trace directory will be created at $HOME directory and this can be overridden by --trace-dir EAL parameter.
Returns
- 0: Success.
- <0 : Failure.
__rte_experimental int rte_trace_metadata_dump (FILE * f)
Dump the trace metadata to a file.
- Parameters
f A pointer to a file for output
Returns
- 0: Success.
- <0 : Failure.
__rte_experimental void rte_trace_dump (FILE * f)
Dump the trace subsystem status to a file.
- Parameters
f A pointer to a file for output
Author
Generated automatically by Doxygen for DPDK from the source code.
Referenced By
The man pages rte_trace_dump(3), rte_trace_feature_is_enabled(3), rte_trace_is_enabled(3), rte_trace_metadata_dump(3), rte_trace_mode(3), RTE_TRACE_MODE_DISCARD(3), rte_trace_mode_get(3), RTE_TRACE_MODE_OVERWRITE(3), rte_trace_mode_set(3), rte_trace_pattern(3), rte_trace_regexp(3) and rte_trace_save(3) are aliases of rte_trace.h(3).