[dpdk-dev] [RFC] DPDK Trace support
Stephen Hemminger
stephen at networkplumber.org
Mon Jan 20 17:51:40 CET 2020
On Sat, 18 Jan 2020 10:14:31 -0500
<dave at barachs.net> wrote:
> It would be well worth considering one of the vpp techniques to minimize trace impact:
>
> static inline ring_handler_inline (..., int is_traced)
> {
> for (i = 0; i < vector_size; i++)
> {
> if (is_traced)
> {
> do_trace_work;
> }
> normal_packet_processing;
> }
> }
>
> ring_handler (...)
> {
> if (PREDICT_FALSE(global_trace_flag != 0))
> return ring_handler_inline (..., 1 /* is_traced */);
> else
> return ring_handler_inline (..., 0 /* is_traced */);
> }
>
> This reduces the runtime tax to the absolute minimum, but costs space.
>
> Please consider it.
>
> HTH... Dave
LTTng already has tracepoint_enabled for this
More information about the dev
mailing list