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

tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency

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


Fixes: e7c15cd8 ("tracing: Added hardware latency tracer")
Signed-off-by: default avatarSrivatsa S. Bhat (VMware) <>
Signed-off-by: default avatarSteven Rostedt (VMware) <>
parent 98dc19c1
......@@ -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;
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