---
name: "rte_trace_point.h"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_trace_point.h"
---

# rte\_trace\_point.h(3)

## NAME

rte\_trace\_point.h

## SYNOPSIS

`#include <stdbool.h>`\
 `#include <stdio.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, ...)   	\_\_RTE\_TRACE\_POINT(generic, tp, args, \_\_VA\_ARGS\_\_)\
 \#define **RTE\_TRACE\_POINT\_FP**(tp,  args, ...)   	\_\_RTE\_TRACE\_POINT(fp, tp, args, \_\_VA\_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\_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

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 **44** of file **rte\_trace\_point.h**.

### #define RTE\_TRACE\_POINT(tp, args, ...) \_\_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\_ARGS macro.

- •

  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\_REGISTER macro. \
 *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 **80** of file **rte\_trace\_point.h**.

### #define RTE\_TRACE\_POINT\_FP(tp, args, ...) \_\_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 using RTE\_TRACE\_POINT\_REGISTER macro. \
 *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 **101** 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 **117** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_u64(val)

Tracepoint function payload for uint64\_t datatype

Definition at line **120** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_i64(val)

Tracepoint function payload for int64\_t datatype

Definition at line **122** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_u32(val)

Tracepoint function payload for uint32\_t datatype

Definition at line **124** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_i32(val)

Tracepoint function payload for int32\_t datatype

Definition at line **126** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_u16(val)

Tracepoint function payload for uint16\_t datatype

Definition at line **128** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_i16(val)

Tracepoint function payload for int16\_t datatype

Definition at line **130** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_u8(val)

Tracepoint function payload for uint8\_t datatype

Definition at line **132** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_i8(val)

Tracepoint function payload for int8\_t datatype

Definition at line **134** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_int(val)

Tracepoint function payload for int datatype

Definition at line **136** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_long(val)

Tracepoint function payload for long datatype

Definition at line **138** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_size\_t(val)

Tracepoint function payload for size\_t datatype

Definition at line **140** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_float(val)

Tracepoint function payload for float datatype

Definition at line **142** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_double(val)

Tracepoint function payload for double datatype

Definition at line **144** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_ptr(val)

Tracepoint function payload for pointer datatype

Definition at line **146** of file **rte\_trace\_point.h**.

### #define rte\_trace\_point\_emit\_string(val)

Tracepoint function payload for string datatype

Definition at line **148** 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\_MAX bytes.

Definition at line **158** of file **rte\_trace\_point.h**.

### #define RTE\_TRACE\_BLOB\_LEN\_MAX 64

Macro to define maximum emit length of blob.

Definition at line **168** of file **rte\_trace\_point.h**.

## Function Documentation

### typedef (uint64\_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.
