tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency
authorSrivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
Thu, 10 Oct 2019 18:51:01 +0000 (11:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2019 20:42:46 +0000 (13:42 -0700)
commitd9df3aa26ba914932fb843d54fd1c7b299b2d5ba
treea14fdac7ba23bf83069bdfa5c611726d50a0fa2e
parent81e3f1d35d7b509c07156e1a758e9959ee6e71c9
tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency

commit fc64e4ad80d4b72efce116f87b3174f0b7196f8e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_hwlat.c