rte_trace_point.h(3)
π rte_trace_point.h(3) β Library Functions Manual π
okay bestie, buckle up, because this is the RTE Tracepoint API header and it is literally the way your DPDK app gets to drop little glowing breadcrumbs into a trace buffer. it's from the Library Functions Manual, it's a C header, and it's giving very experimental energy (more on that in a sec π). let's go πΈ
β¨ NAME β¨
rte_trace_point.h β the header that hands you the tracepoint API for your RTE applications π¦
π SYNOPSIS π
first up, the includes, no cap β you're gonna want all of these:
#include <stdbool.h>
#include <stdio.h>
#include <time.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_cycles.h>
#include <rte_per_lcore.h>
#include <rte_stdatomic.h>
#include <rte_string_fns.h>
#include <rte_trace.h>
#include <rte_uuid.h>
π Macros
#define RTE_TRACE_POINT_ARGS
#define RTE_TRACE_POINT(tp, args, ...)
#define RTE_TRACE_POINT_FP(tp, args, ...)
#define RTE_TRACE_POINT_REGISTER(trace, name)
#define rte_trace_point_emit_u64(val)
#define rte_trace_point_emit_i64(val)
#define rte_trace_point_emit_u32(val)
#define rte_trace_point_emit_i32(val)
#define rte_trace_point_emit_u16(val)
#define rte_trace_point_emit_i16(val)
#define rte_trace_point_emit_u8(val)
#define rte_trace_point_emit_i8(val)
#define rte_trace_point_emit_int(val)
#define rte_trace_point_emit_long(val)
#define rte_trace_point_emit_size_t(val)
#define rte_trace_point_emit_float(val)
#define rte_trace_point_emit_double(val)
#define rte_trace_point_emit_ptr(val)
#define rte_trace_point_emit_string(val)
#define rte_trace_point_emit_time_t(val)
#define rte_trace_point_emit_blob(val, len)
#define RTE_TRACE_BLOB_LEN_MAX 64
π Functions
typedef (uint64_t) rte_trace_point_t
__rte_experimental int rte_trace_point_enable (rte_trace_point_t *tp)
__rte_experimental int rte_trace_point_disable (rte_trace_point_t *tp)
__rte_experimental bool rte_trace_point_is_enabled (rte_trace_point_t
*tp)
__rte_experimental rte_trace_point_t * rte_trace_point_lookup (const
char *name)
π§ Detailed Description π§
RTE Tracepoint API β¨
this file provides the tracepoint API to RTE applications, periodt.
Warning π¨ EXPERIMENTAL: this API may change without prior notice. so likeβ¦ don't get too attached, bestie π
Definition in file rte_trace_point.h.
π Macro Definition Documentation π
#define RTE_TRACE_POINT_ARGS
macro to define the tracepoint arguments in the RTE_TRACE_POINT macro. that's it, that's the job π«Ά
See also: RTE_TRACE_POINT, RTE_TRACE_POINT_FP
Definition at line 47 of file rte_trace_point.h.
#define RTE_TRACE_POINT( tp, args, ...)
Value:
__RTE_TRACE_POINT(generic, tp, args, __VA_ARGS__)
create a tracepoint π
a tracepoint is defined by specifying:
- its input arguments: they are the C function style parameters to define the arguments of tracepoint function. these input arguments are embedded using the
RTE_TRACE_POINT_ARGSmacro. - its output event fields: they are the sources of event fields that form the payload of any event that the execution of the tracepoint macro emits for this particular tracepoint. the application uses
rte_trace_point_emit_*macros to emit the output event fields.
Parameters
- tp β Tracepoint object. before using the tracepoint, an application needs to define the tracepoint using
RTE_TRACE_POINT_REGISTERmacro. - args β C function style input arguments to define the arguments to tracepoint function.
- ... β Define the payload of trace function. the payload will be formed using
rte_trace_point_emit_*macros. use";"delimiter between two payloads.
See also: RTE_TRACE_POINT_ARGS, RTE_TRACE_POINT_REGISTER, rte_trace_point_emit_*
Definition at line 85 of file rte_trace_point.h.
#define RTE_TRACE_POINT_FP( tp, args, ...)
Value:
__RTE_TRACE_POINT(fp, tp, args, __VA_ARGS__)
create a tracepoint for the fast path ποΈπ¨
similar to RTE_TRACE_POINT, except that it is removed at compilation time unless the RTE_ENABLE_TRACE_FP configuration parameter is set. so like, if that param isn't set, it justβ¦ poofs. gone. not even there π
Parameters
- tp β Tracepoint object. before using the tracepoint, an application needs to define the tracepoint using
RTE_TRACE_POINT_REGISTERmacro. - args β C function style input arguments to define the arguments to tracepoint. function.
- ... β Define the payload of trace function. the payload will be formed using
rte_trace_point_emit_*macros, use";"delimiter between two payloads.
See also: RTE_TRACE_POINT
Definition at line 106 of file rte_trace_point.h.
#define RTE_TRACE_POINT_REGISTER( trace, name)
register a tracepoint π«‘
Parameters
- trace β The tracepoint object created using
RTE_TRACE_POINT_REGISTER. - name β The name of the tracepoint object.
Returns
0: Successfully registered the tracepoint. β<0: Failure to register the tracepoint. π
Definition at line 122 of file rte_trace_point.h.
#define rte_trace_point_emit_u64( val)
tracepoint function payload for uint64_t datatype
Definition at line 125 of file rte_trace_point.h.
#define rte_trace_point_emit_i64( val)
tracepoint function payload for int64_t datatype
Definition at line 127 of file rte_trace_point.h.
#define rte_trace_point_emit_u32( val)
tracepoint function payload for uint32_t datatype
Definition at line 129 of file rte_trace_point.h.
#define rte_trace_point_emit_i32( val)
tracepoint function payload for int32_t datatype
Definition at line 131 of file rte_trace_point.h.
#define rte_trace_point_emit_u16( val)
tracepoint function payload for uint16_t datatype
Definition at line 133 of file rte_trace_point.h.
#define rte_trace_point_emit_i16( val)
tracepoint function payload for int16_t datatype
Definition at line 135 of file rte_trace_point.h.
#define rte_trace_point_emit_u8( val)
tracepoint function payload for uint8_t datatype
Definition at line 137 of file rte_trace_point.h.
#define rte_trace_point_emit_i8( val)
tracepoint function payload for int8_t datatype
Definition at line 139 of file rte_trace_point.h.
#define rte_trace_point_emit_int( val)
tracepoint function payload for int datatype
Definition at line 141 of file rte_trace_point.h.
#define rte_trace_point_emit_long( val)
tracepoint function payload for long datatype
Definition at line 143 of file rte_trace_point.h.
#define rte_trace_point_emit_size_t( val)
tracepoint function payload for size_t datatype
Definition at line 145 of file rte_trace_point.h.
#define rte_trace_point_emit_float( val)
tracepoint function payload for float datatype
Definition at line 147 of file rte_trace_point.h.
#define rte_trace_point_emit_double( val)
tracepoint function payload for double datatype
Definition at line 149 of file rte_trace_point.h.
#define rte_trace_point_emit_ptr( val)
tracepoint function payload for pointer datatype
Definition at line 151 of file rte_trace_point.h.
#define rte_trace_point_emit_string( val)
tracepoint function payload for string datatype
Definition at line 153 of file rte_trace_point.h.
#define rte_trace_point_emit_time_t( val)
tracepoint function payload for time_t datatype
Definition at line 155 of file rte_trace_point.h.
#define rte_trace_point_emit_blob( val, len)
tracepoint function to capture a blob π«§
Parameters
- val β Pointer to the array to be captured.
- len β Length to be captured. the maximum supported length is
RTE_TRACE_BLOB_LEN_MAXbytes.
Definition at line 165 of file rte_trace_point.h.
#define RTE_TRACE_BLOB_LEN_MAX 64
macro to define maximum emit length of blob. sixty-four. that's the number, don't come for me π
Definition at line 175 of file rte_trace_point.h.
π Function Documentation π
typedef (uint64_t )
the tracepoint object. iconic. no notes π
__rte_experimental int rte_trace_point_enable (rte_trace_point_t * tp)
enable recording events of the given tracepoint in the trace buffer. turn it ON bestie π
Parameters
- tp β The tracepoint object to enable.
Returns
0: Success. β(-ERANGE): Trace object is not registered. π«
__rte_experimental int rte_trace_point_disable (rte_trace_point_t * tp)
disable recording events of the given tracepoint in the trace buffer. turn it OFF, we're being quiet now π€«
Parameters
- tp β The tracepoint object to disable.
Returns
0: Success. β(-ERANGE): Trace object is not registered. π«
__rte_experimental bool rte_trace_point_is_enabled (rte_trace_point_t * tp)
test if recording events from the given tracepoint is enabled. vibe check π΅οΈ
Parameters
- tp β The tracepoint object.
Returns
true if tracepoint is enabled, false otherwise.
__rte_experimental rte_trace_point_t * rte_trace_point_lookup (const char * name)
lookup a tracepoint object from its name. find your fave by name, iykyk π
Parameters
- name β The name of the tracepoint.
Returns
The tracepoint object or NULL if not found. (and if it's NULL, we don't talk about it π)
π«Ά Author π«Ά
generated automatically by Doxygen for DPDK from the source code. the robots did this, not me, and honestly? they ate. β¨
and that's the whole page, bestie π this was DPDK Version 25.11.3, page rte_trace_point.h(3), in the Library Functions Manual β go forth and trace those points, you main character π¦ππ
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms