On Mon, 22 Mar 2021 11:59:39 +0200 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > @@ -1279,14 +1296,18 @@ static unsigned long long timestamp_correct(unsigned long long ts, > static unsigned long long timestamp_calc(unsigned long long ts, > struct tracecmd_input *handle) > { > - unsigned long long tstamp; > + unsigned long long t; > > - tstamp = timestamp_correct(ts, handle); > + t = timestamp_correct(ts, handle); > > if (handle->ts2secs) > - tstamp *= handle->ts2secs; > + t *= handle->ts2secs; > + else if (handle->tsc_calc.mult) { > + t -= handle->tsc_calc.offset; > + t = mul_u64_u32_shr(t, handle->tsc_calc.mult, handle->tsc_calc.shift); > + } > > - return tstamp; > + return t; > } > Like I said, I like to save on extra variables ;-) static unsigned long long timestamp_calc(unsigned long long ts, struct tracecmd_input *handle) { ts = timestamp_correct(ts, handle); if (handle->ts2secs) ts *= handle->ts2secs; else if (handle->tsc_calc.mult) { ts -= handle->tsc_calc.offset; ts = mul_u64_u32_shr(t, handle->tsc_calc.mult, handle->tsc_calc.shift); } return ts; } -- Steve