Skip to content

Commit 16f3c7a

Browse files
rostedtAlexei Starovoitov
authored andcommitted
xdp: tracing: Hide some xdp events under CONFIG_BPF_SYSCALL
The events xdp_cpumap_kthread, xdp_cpumap_enqueue and xdp_devmap_xmit are only called when CONFIG_BPF_SYSCALL is defined. As each event can take up to 5K regardless if they are used or not, it's best not to define them when they are not used. Add #ifdef around these events when they are not used. Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent a9a5f41 commit 16f3c7a

File tree

1 file changed

+2
-0
lines changed
  • include/trace/events

1 file changed

+2
-0
lines changed

include/trace/events/xdp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ DEFINE_EVENT(xdp_redirect_template, xdp_redirect_err,
168168
#define _trace_xdp_redirect_map_err(dev, xdp, to, map_type, map_id, index, err) \
169169
trace_xdp_redirect_err(dev, xdp, to, err, map_type, map_id, index)
170170

171+
#ifdef CONFIG_BPF_SYSCALL
171172
TRACE_EVENT(xdp_cpumap_kthread,
172173

173174
TP_PROTO(int map_id, unsigned int processed, unsigned int drops,
@@ -281,6 +282,7 @@ TRACE_EVENT(xdp_devmap_xmit,
281282
__entry->sent, __entry->drops,
282283
__entry->err)
283284
);
285+
#endif /* CONFIG_BPF_SYSCALL */
284286

285287
/* Expect users already include <net/xdp.h>, but not xdp_priv.h */
286288
#include <net/xdp_priv.h>

0 commit comments

Comments
 (0)