Skip to content

Timestamp offsets calculation per host CPU

Tzvetomir Stoyanov (VMware) linux-trace-devel 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 0 repliesNew
  2. v35 patches 0 repliesSuperseded
  3. v25 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch0 repliesSuperseded

Changes in v4 from the cover letter

- Remove all patches, not related directly to per host CPU timestamp offsets calculation, from the patch set.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3trace-cmd: Time stamp offset per host CPUinclude/trace-cmd/trace-cmd.h lib/trace-cmd/include/trace-tsync-local.h lib/trace-cmd/trace-input.c +5 more+517 -1850 replies
2/3trace-cmd: Add a define to enable per CPU timestamps synchronizationtracecmd/trace-tsync.c+3 -00 replies
3/3trace-cmd: Use per CPU synchronization data when calculating timestamps offsetslib/trace-cmd/trace-input.c+249 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] Timestamp offsets calculation per host CPU

The clock, used for trace time stamps, can vary between CPUs. When synchronizing host and guest trace time stamps, these variations could introduce inaccuracy.
The algorithm for host - guest trace time stamps synchronization is modified to calculate the offset per each host CPU, depending on the CPU affinity of host tasks, running the guest's VCPUs. The calculated array per CPU is stored in the trace.dat file, using TRACECMD_OPTION_TIME_SHIFT option.
The "trace-cmd dump --options" command and tracecmd_init_data() API are adjusted to read the new format of this option.

In order this per CPU synchronization data to be used when host and guest files are merged, information about guest VCPUs migration between host CPUs is needed. This information is extracted from host trace data, thus the host trace must be recored with "-e sched" option.

[
v4 changes:
- Remove all patches, not related directly to per host CPU timestamp offsets calculation, from the patch set.
v3 changes:
- Fix allocation of VCPU sched data array when reading sched data from host trace file.
]

Tzvetomir Stoyanov (VMware) (3):
trace-cmd: Time stamp offset per host CPU
trace-cmd: Add a define to enable per CPU timestamps synchronization
trace-cmd: Use per CPU synchronization data when calculating
timestamps offsets

 include/trace-cmd/trace-cmd.h             |   6 +-
 lib/trace-cmd/include/trace-tsync-local.h |  16 +-
 lib/trace-cmd/trace-input.c               | 433 +++++++++++++++++++---
 lib/trace-cmd/trace-timesync.c            | 269 ++++++++++++--
 tracecmd/include/trace-local.h            |   4 +
 tracecmd/trace-dump.c                     |  60 ++-
 tracecmd/trace-record.c                   |  18 +
 tracecmd/trace-tsync.c                    | 144 ++++---
 8 files changed, 757 insertions(+), 193 deletions(-)
Signature · 1 line
2.25.1