From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
stable@vger.kernel.org,
"Srivatsa S. Bhat (VMware)" <srivatsa@csail.mit.edu>
Subject: [for-linus][PATCH 10/11] tracing/hwlat: Dont ignore outer-loop duration when calculating max_latency
Date: Sun, 13 Oct 2019 13:43:52 -0400 [thread overview]
Message-ID: <20191013174419.738889779@goodmis.org> (raw)
In-Reply-To: <20191013174342.381019558@goodmis.org>
From: "Srivatsa S. Bhat (VMware)" <srivatsa@csail.mit.edu>
max_latency is intended to record the maximum ever observed hardware
latency, which may occur in either part of the loop (inner/outer). So
we need to also consider the outer-loop sample when updating
max_latency.
Link: http://lkml.kernel.org/r/157073345463.17189.18124025522664682811.stgit@srivatsa-ubuntu
Fixes: e7c15cd8a113 ("tracing: Added hardware latency tracer")
Cc: stable@vger.kernel.org
Signed-off-by: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/trace_hwlat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index a0251a78807d..862f4b0139fc 100644
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -256,6 +256,8 @@ static int get_sample(void)
/* Keep a running maximum ever recorded hardware latency */
if (sample > tr->max_latency)
tr->max_latency = sample;
+ if (outer_sample > tr->max_latency)
+ tr->max_latency = outer_sample;
}
out:
--
2.23.0
next prev parent reply other threads:[~2019-10-13 17:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-13 17:43 [for-linus][PATCH 00/11] tracing: Fixes for v5.4-rc2 Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 01/11] tracefs: Revert ccbd54ff54e8 ("tracefs: Restrict tracefs when the kernel is locked down") Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 02/11] ftrace: Get a reference counter for the trace_array on filter files Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 03/11] tracing: Get trace_array reference for available_tracers files Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 04/11] tracing: Have trace events system open call tracing_open_generic_tr() Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 05/11] tracing: Add tracing_check_open_get_tr() Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 06/11] tracing: Add locked_down checks to the open calls of files created for tracefs Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 07/11] tracing: Do not create tracefs files if tracefs lockdown is in effect Steven Rostedt
2019-10-13 17:43 ` [for-linus][PATCH 09/11] tracing/hwlat: Report total time spent in all NMIs during the sample Steven Rostedt
2019-10-13 17:43 ` Steven Rostedt [this message]
2019-10-13 17:43 ` [for-linus][PATCH 11/11] tracing: Initialize iter->seq after zeroing in tracing_read_pipe() Steven Rostedt
[not found] ` <20191013174419.228868312@goodmis.org>
2019-10-13 18:57 ` [for-linus][PATCH 08/11] recordmcount: Fix nop_mcount() function Steven Rostedt
2019-10-13 19:14 ` Uwe Kleine-König
2019-10-13 19:53 ` Steven Rostedt
2019-10-13 20:03 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191013174419.738889779@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=srivatsa@csail.mit.edu \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome