rte_trace.h(3)

πŸ’– rte_trace.h β€” Library Functions Manual πŸ’–

okay bestie, sit down, hydrate, and let's talk about rte_trace.h(3) because this one is genuinely iconic πŸ”₯ it's the RTE Trace API header, and it's giving main character energy for your whole application's tracing setup. let's get into it ✨


✨ NAME ✨

rte_trace.h β€” that's the whole name, she's simple like that πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

first things first, the girlies she needs to include:

#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 β€” periodt ✨

This file provides the trace API to RTE applications. literally that's the whole vibe, she's here to let your RTE app do tracing πŸ’œ

⚠️ Warning: EXPERIMENTAL: this API may change without prior notice. no cap, she's experimental, so guard your heart (and your builds) accordingly 😭

Definition in file rte_trace.h.


πŸŽ€ Enumeration Type Documentation πŸŽ€

enum rte_trace_mode

Enumerate trace mode operation. it's giving "pick your fighter" 🫢

Enumerator

  • RTE_TRACE_MODE_OVERWRITE β€” In this mode, when no space is left in the trace buffer, the subsequent events overwrite the old events. out with the old, in with the new πŸ’…
  • RTE_TRACE_MODE_DISCARD β€” In this mode, when no space is left in the trace buffer, the subsequent events shall not be recorded. buffer's full? new events simply don't get an invite πŸ™ˆ

Definition at line 61 of file rte_trace.h.


πŸ’œ Function Documentation πŸ’œ

__rte_experimental bool rte_trace_is_enabled (void )

Test if trace is enabled. girl is just checking if the lights are on πŸ”₯

Returns

true if trace is enabled, false otherwise.


__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. note the compile time part bestie, she's decided before your program even wakes up 🌸

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. you're the one choosing her outfit today πŸ‘‘

Parameters

  • mode β€” Trace mode.

__rte_experimental enum rte_trace_mode rte_trace_mode_get (void )

Get the trace mode. asking her what she's wearing rn πŸ’…

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. globbing!! she's flexible like that ✨

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. so regex girlies, this one's for you 🌈

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. she said no to that regex πŸ’€

__rte_experimental int rte_trace_save (void )

Save the trace buffer to the trace directory. bookmarking, but make it systems programming πŸŽ€

By default, trace directory will be created at $HOME directory and this can be overridden by --trace-dir EAL parameter. iykyk πŸ’–

Returns

  • 0: Success.
  • <0 : Failure.

__rte_experimental int rte_trace_metadata_dump (FILE * f)

Dump the trace metadata to a file. the lore, archived πŸ’œ

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. the whole vibe check, written down 🌸

Parameters

  • f β€” A pointer to a file for output

πŸ¦‹ Author πŸ¦‹

Generated automatically by Doxygen for DPDK from the source code. not a human, just a robot doing her little documentation slay πŸ€–βœ¨


and that's the whole page bestie, you ate this πŸ’…πŸ’–

kisses, and remember: this was DPDK, Version 25.11.3, from the rte_trace.h(3) manual page β€” experimental API, so stay flexible, stay hydrated, and go trace something gorgeous 🫢🌟

πŸ“¦ where this page comes from