Skip to content
Snippets Groups Projects
Commit c59c03b4 authored by Chris Wilson's avatar Chris Wilson :thinking: Committed by Jani Nikula
Browse files

ftrace: Allow configuring global trace buffer size (for dump-on-oops)

We have recently turned on ftrace-dump-on-oops for i915's CI and an
issue we have encountered is that the trace buffer size greatly exceeds
the pstore capabilities; we get the tail of the oops but not the
introduction.

Currently the global buffer size is controllable on the cmdline, but at
the request of our CI sysadmin, we would like to add a control to the
Kconfig as well. The rationale being the cmdline carries the temporary
hacks that we want to eradicate, and we want to track the permanent
configuration in .config.

I have kept the Kconfig option hidden from the user as the default
should suffice for the majority of users; reserving the configuration
for those that eschew the cmdline option.

v2: Add an expert prompt to stop the default value overriding .config
changes.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/8029


Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 3dc18af0
No related branches found
No related tags found
No related merge requests found
......@@ -165,6 +165,13 @@ config TRACING
select TRACE_CLOCK
select NEED_TASKS_RCU
config GLOBAL_TRACE_BUF_SIZE
int
prompt "Global ftrace buffer size (for trace_printk)" if EXPERT
range 0 4194034
default 1441792 # 16384 * 88 (sizeof(struct print_entry))
depends on TRACING
config GENERIC_TRACER
bool
select TRACING
......
......@@ -880,9 +880,7 @@ int tracing_is_enabled(void)
* to not have to wait for all that output. Anyway this can be
* boot time and run time configurable.
*/
#define TRACE_BUF_SIZE_DEFAULT 1441792UL /* 16384 * 88 (sizeof(entry)) */
static unsigned long trace_buf_size = TRACE_BUF_SIZE_DEFAULT;
static unsigned long trace_buf_size = CONFIG_GLOBAL_TRACE_BUF_SIZE;
/* trace_types holds a link list of available tracers. */
static struct tracer *trace_types __read_mostly;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment