mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
tracing/hwlat: Report total time spent in all NMIs during the sample
commit98dc19c114upstream. 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:7b2c862501("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>
This commit is contained in:
committed by
Chris
parent
92af40e987
commit
0b87cd11a5
@@ -151,7 +151,7 @@ void trace_hwlat_callback(bool enter)
|
||||
if (enter)
|
||||
nmi_ts_start = time_get();
|
||||
else
|
||||
nmi_total_ts = time_get() - nmi_ts_start;
|
||||
nmi_total_ts += time_get() - nmi_ts_start;
|
||||
}
|
||||
|
||||
if (enter)
|
||||
|
||||
Reference in New Issue
Block a user