On Thu, 27 Feb 2020 16:19:55 +0200 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > + case TRACECMD_OPTION_TIME_SHIFT: > + /* > + * long long int (8 bytes) trace session ID > + * int (4 bytes) count of timestamp offsets. > + * long long array of size [count] of times, > + * when the offsets were calculated. > + * long long array of size [count] of timestamp offsets. > + */ > + if (size < 12 || handle->flags & TRACECMD_FL_IGNORE_DATE) > + break; > + handle->host.trace_id = tep_read_number(handle->pevent, > + buf, 8); > + handle->host.ts_samples_count = tep_read_number(handle->pevent, > + buf + 8, 4); > + samples_size = (8 * handle->host.ts_samples_count); > + if (size != (12 + (2 * samples_size))) { > + warning("Failed to extract Time Shift information from the file, unexpected size %d", size); Probably should show what was expected as well. warning("Failed to extract Time Shift information from the file: found size %d but expected %d", size, 12 + (2 * samples_size)); -- Steve > + break; > + } > + handle->host.ts_samples = malloc(2 * samples_size); > + if (!handle->host.ts_samples) > + return -ENOMEM; > + tsync_offset_load(handle, buf + 12); > + break;