3cd12006bb
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
51 lines
1.4 KiB
Diff
51 lines
1.4 KiB
Diff
From fbc8904ee75e751956cbe0f7e038073e4020fa27 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <fbc8904ee75e751956cbe0f7e038073e4020fa27.1507924974.git.Jim.Somerville@windriver.com>
|
|
From: Jim Somerville <Jim.Somerville@windriver.com>
|
|
Date: Thu, 22 Dec 2016 17:54:11 -0500
|
|
Subject: [PATCH 1/1] Add missing ifdef around max latency variable
|
|
|
|
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
|
---
|
|
kernel/trace/trace_hwlat.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
|
|
index 4b30d8b..1bb578c 100644
|
|
--- a/kernel/trace/trace_hwlat.c
|
|
+++ b/kernel/trace/trace_hwlat.c
|
|
@@ -167,7 +167,9 @@ void trace_hwlat_callback(bool enter)
|
|
*/
|
|
static int get_sample(void)
|
|
{
|
|
+#ifdef CONFIG_TRACER_MAX_TRACE
|
|
struct trace_array *tr = hwlat_trace;
|
|
+#endif
|
|
time_type start, t1, t2, last_t2;
|
|
s64 diff, total, last_total = 0;
|
|
u64 sample = 0;
|
|
@@ -254,9 +256,11 @@ static int get_sample(void)
|
|
s.nmi_count = nmi_count;
|
|
trace_hwlat_sample(&s);
|
|
|
|
+#ifdef CONFIG_TRACER_MAX_TRACE
|
|
/* Keep a running maximum ever recorded hardware latency */
|
|
if (sample > tr->max_latency)
|
|
tr->max_latency = sample;
|
|
+#endif
|
|
}
|
|
|
|
out:
|
|
@@ -582,7 +586,9 @@ static int hwlat_tracer_init(struct trace_array *tr)
|
|
|
|
disable_migrate = false;
|
|
hwlat_data.count = 0;
|
|
+#ifdef CONFIG_TRACER_MAX_TRACE
|
|
tr->max_latency = 0;
|
|
+#endif
|
|
save_tracing_thresh = tracing_thresh;
|
|
|
|
/* tracing_thresh is in nsecs, we speak in usecs */
|
|
--
|
|
1.8.3.1
|
|
|