On Wed, 24 Mar 2021 15:04:10 +0200 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > @@ -1296,15 +1287,23 @@ static unsigned long long timestamp_correct(unsigned long long ts, > static unsigned long long timestamp_calc(unsigned long long ts, > struct tracecmd_input *handle) > { > - ts = timestamp_correct(ts, handle); > + /* Guest trace file, sync with host timestamps */ > + if (handle->host.sync_enable) > + ts = timestamp_host_sync(ts, handle); > > - if (handle->ts2secs) > + if (handle->ts2secs) { > + /* user specified clock frequency */ > ts *= handle->ts2secs; > - else if (handle->tsc_calc.mult) { > + } else if (handle->tsc_calc.mult) { > + /* auto calculated TSC clock frequency */ > ts -= handle->tsc_calc.offset; > ts = mul_u64_u32_shr(ts, handle->tsc_calc.mult, handle->tsc_calc.shift); > } > > + /* User specified time offset with --ts-offset or --date options */ > + if (handle->ts_offset) > + ts += handle->ts_offset; > + > return ts; > } Now that I'm playing with this, I find I want to see what the result is without the tsc_calc.offset, but can't do it. I'm thinking that the --ts-offset should modify that instead: bool ts_offset_set = false; [..] } else if (handel->tsc_calc.mult) { ts_offset_set = true; if (handle->ts_offset) ts += handle->ts_offset; else ts -= handle->tsc_calc.offset; [..] } if (handle->ts_offset && !ts_offset_set) ts += handle->ts_offset; Or should we add another option to modify the ts_calc.offset? Thoughts? -- Steve