On Fri, Dec 16, 2016 at 12:32 AM, Namhyung Kim <namhy...@kernel.org> wrote: > On Wed, Dec 14, 2016 at 11:17:16AM -0500, Steven Rostedt wrote: >> @@ -203,8 +212,13 @@ static int get_sample(void) >> } >> if (diff > outer_sample) >> outer_sample = diff; >> + >> + diff = nmi_t1 - last_nmi; > > It these are time_type, it should use time_to_us() instead.
Oh, I meant "time_to_us(time_sub(nmi_t1, last_nmi))". Thanks, Namhyung > >> + if (diff > nmi_sample) >> + nmi_sample = diff; >> } >> last_t2 = t2; >> + last_nmi = nmi_t2; >> >> total = time_to_us(time_sub(t2, start)); /* sample width */ >> >> @@ -227,6 +241,10 @@ static int get_sample(void) >> if (diff > sample) >> sample = diff; /* only want highest value */ >> >> + diff = nmi_t2 - nmi_t1; >> + if (diff > nmi_sample) >> + nmi_sample = diff; >> + >> } while (total <= hwlat_data.sample_width); >> >> barrier(); /* finish the above in the view for NMIs */