logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                                  rte_trace.h(3)

Detailed Description

       RTE Trace API

       This file provides the trace API to RTE applications.

       WarningEXPERIMENTAL: this API may change without prior notice

       Definition in file rte_trace.h.

Enumeration Type Documentation

enumrte_trace_mode
       Enumerate trace mode operation.

       EnumeratorRTE_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_experimentalboolrte_trace_is_enabled(void)
       Test if trace is enabled.

       Returns
           true if trace is enabled, false otherwise.

   static__rte_experimental__rte_always_inlineboolrte_trace_feature_is_enabled(void)[static]WarningEXPERIMENTAL: 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_experimentalvoidrte_trace_mode_set(enumrte_trace_modemode)
       Set the trace mode.

       Parametersmode Trace mode.

   __rte_experimentalenumrte_trace_moderte_trace_mode_get(void)
       Get the trace mode.

       Returns
           The current trace mode.

   __rte_experimentalintrte_trace_pattern(constchar*pattern,boolenable)
       Enable/Disable a set of tracepoints based on globbing pattern.

       Parameterspattern 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_experimentalintrte_trace_regexp(constchar*regex,boolenable)
       Enable/Disable a set of tracepoints based on regular expression.

       Parametersregex 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_experimentalintrte_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_experimentalintrte_trace_metadata_dump(FILE*f)
       Dump the trace metadata to a file.

       Parametersf A pointer to a file for output

       Returns

           • 0: Success.

           • <0 : Failure.

   __rte_experimentalvoidrte_trace_dump(FILE*f)
       Dump the trace subsystem status to a file.

       Parametersf A pointer to a file for output

Name

       rte_trace.h

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_moderte_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)

See Also