rte_trace_point.h(3)
β¨ NAME β¨
rte_trace_point.h β the one and only, straight outta the Library Functions Manual, bestie. Yes, this is rte_trace_point.h(3), DPDK's tracepoint API header, and it's literally the main character for tracing in RTE applications.
πΈ SYNOPSIS πΈ
The whole include stack, no cap:
#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.
β οΈ Warning β EXPERIMENTAL: this API may change without prior notice π so maybe don't build your whole personality around it, okay?
Definition in file rte_trace_point.h.
π Macro Definition Documentation π
π§ #define RTE_TRACE_POINT_ARGS
Macro to define the tracepoint arguments in RTE_TRACE_POINT macro.
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 usingRTE_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 usingrte_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 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.
Parameters
tpβ Tracepoint object. Before using the tracepoint, an application needs to define the tracepoint usingRTE_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 usingrte_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 usingRTE_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 isRTE_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.
Definition at line 175 of file rte_trace_point.h.
π Function Documentation π
π typedef (uint64_t) rte_trace_point_t
The tracepoint object.
π __rte_experimental int rte_trace_point_enable (rte_trace_point_t *tp)
Enable recording events of the given tracepoint in the trace buffer.
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.
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.
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.
Parameters
nameβ The name of the tracepoint.
Returns
The tracepoint object or NULL if not found.
π AUTHOR π
Generated automatically by Doxygen for DPDK from the source code.
That's the whole tea, bestie. DPDK Version 26.03.0, rte_trace_point.h(3) β bye, love u, happy tracing! π
β¨π«Ά
π¦ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms