Skip to content

Commit a3b366d

Browse files
committed
tracing, AER: Hide PCIe AER event when PCIEAER is not configured
The event aer_event is only used when CONFIG_PCIEAER is configured. It should not be created when it is not. When an event is created it creates around 5K of text and meta data regardless if the tracepoint is used or not. Instead of wasting this memory, put #ifdef around the event to not create it when it is not used. Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Tony Luck <[email protected]> Link: https://lore.kernel.org/[email protected] Acked-by: Borislav Petkov (AMD) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 89be9a8 commit a3b366d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/ras/ras_event.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ TRACE_EVENT(non_standard_event,
252252
__print_hex(__get_dynamic_array(buf), __entry->len))
253253
);
254254

255+
#ifdef CONFIG_PCIEAER
255256
/*
256257
* PCIe AER Trace event
257258
*
@@ -337,6 +338,7 @@ TRACE_EVENT(aer_event,
337338
__print_array(__entry->tlp_header, PCIE_STD_MAX_TLP_HEADERLOG, 4) :
338339
"Not available")
339340
);
341+
#endif /* CONFIG_PCIEAER */
340342

341343
/*
342344
* memory-failure recovery action result event

0 commit comments

Comments
 (0)