tracing/hwlat: select TRACER_MAX_TRACE
PATCH 1/1 tracing/hwlat: select TRACER_MAX_TRACE
hwlat_trace cannot work without CONFIG_TRACER_MAX_TRACE:
kernel/trace/trace_hwlat.c: In function 'get_sample':kernel/trace/trace_hwlat.c:258:18: error: 'struct trace_array' has no member named 'max_latency'; did you mean 'max_lock'?
if (sample > tr->max_latency)
^~
kernel/trace/trace_hwlat.c:259:6: error: 'struct trace_array' has no member named 'max_latency'; did you mean 'max_lock'?
tr->max_latency = sample;
^~kernel/trace/trace_hwlat.c: In function 'hwlat_tracer_init':kernel/trace/trace_hwlat.c:583:4: error: 'struct trace_array' has no member named 'max_latency'; did you mean 'max_lock'?
tr->max_latency = 0;
We also have to enable CONFIG_TRACER_SNAPSHOT, which in turn is a dependency of CONFIG_TRACER_MAX_TRACE.
--- kernel/trace/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
kernel/trace/Kconfig +2 -0
@@ -219,6 +219,8 @@ config SCHED_TRACER config HWLAT_TRACER bool "Tracer to detect hardware latencies (like SMIs)" select GENERIC_TRACER + select TRACER_MAX_TRACE + select TRACER_SNAPSHOT help This tracer, when enabled will create one or more kernel threads, depening on what the cpumask file is set to, which each thread
Signature · 1 line
2.9.0
Steven Rostedt
maintainerQuoted 9 lines · On Wed, 7 Sep 2016 18:08:31 +0200 Arnd Bergmann <[email protected]> wrote:
hwlat_tracecannot work withoutCONFIG_TRACER_MAX_TRACE:
kernel/trace/trace_hwlat.c: In function 'get_sample':kernel/trace/trace_hwlat.c:258:18: error: 'structtrace_array' has no member named 'max_latency'; did you mean 'max_lock'?
if (sample >tr->max_latency)^~ kernel/trace/trace_hwlat.c:259:6: error: 'struct trace_array' has no member named 'max_latency'; did you mean 'max_lock'? tr->max_latency = sample; ^~
Quoted 6 lines
kernel/trace/trace_hwlat.c: In function 'hwlat_tracer_init':kernel/trace/trace_hwlat.c:583:4: error: 'structtrace_array' has no member named 'max_latency'; did you mean 'max_lock'?
tr->max_latency= 0;We also have to enable
CONFIG_TRACER_SNAPSHOT, which in turn is a dependency ofCONFIG_TRACER_MAX_TRACE.
Hi Arnd,
Thanks.
Randy Dunlap already reported this, and it's been fixed. I just finished testing and it will be uploaded today. The real fix was posted in the thread here:
http://lkml.kernel.org/r/[email protected]
-- Steve