tracing/hwlat: Report total time spent in all NMIs during the sample
authorSrivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
Thu, 10 Oct 2019 18:50:46 +0000 (11:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2019 20:42:46 +0000 (13:42 -0700)
commit81e3f1d35d7b509c07156e1a758e9959ee6e71c9
tree0c2b683b17652a9d6e27f61e15c0953f876a1b07
parent5d7360e88a2e634c772f7ae3730de06169d89796
tracing/hwlat: Report total time spent in all NMIs during the sample

commit 98dc19c11470ee6048aba723d77079ad2cda8a52 upstream.

nmi_total_ts is supposed to record the total time spent in *all* NMIs
that occur on the given CPU during the (active portion of the)
sampling window. However, the code seems to be overwriting this
variable for each NMI, thereby only recording the time spent in the
most recent NMI. Fix it by accumulating the duration instead.

Link: http://lkml.kernel.org/r/157073343544.17189.13911783866738671133.stgit@srivatsa-ubuntu
Fixes: 7b2c86250122 ("tracing: Add NMI tracing in hwlat detector")
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