Commit 98dc19c1 authored by Srivatsa S. Bhat (VMware)'s avatar Srivatsa S. Bhat (VMware) Committed by Steven Rostedt (VMware)

tracing/hwlat: Report total time spent in all NMIs during the sample

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.


Fixes: 7b2c8625 ("tracing: Add NMI tracing in hwlat detector")
Signed-off-by: default avatarSrivatsa S. Bhat (VMware) <>
Signed-off-by: default avatarSteven Rostedt (VMware) <>
parent 7f8557b8
......@@ -150,7 +150,7 @@ void trace_hwlat_callback(bool enter)
if (enter)
nmi_ts_start = time_get();
nmi_total_ts = time_get() - nmi_ts_start;
nmi_total_ts += time_get() - nmi_ts_start;
if (enter)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment