alistair23-linux/tools
Leo Yan 78a93d4cec perf tsc: Calculate timestamp with cap_user_time_short
The perf mmap'ed buffer contains the flag 'cap_user_time_short' and two
extra fields 'time_cycles' and 'time_mask', perf tool needs to know them
for handling the counter wrapping case.

This patch is to reads out the relevant parameters from the head of the
first mmap'ed page and stores into the structure 'perf_tsc_conversion',
if the flag 'cap_user_time_short' has been set, it will firstly
calibrate cycle value for timestamp calculation.

Committer testing:

Before/after:

  # perf test tsc
  70: Convert perf time to TSC                                        : Ok
  #
  # perf test -v tsc
  70: Convert perf time to TSC                                        :
  --- start ---
  test child forked, pid 11059
  mmap size 528384B
  1st event perf time 996384576521 tsc 3850532906613
  rdtsc          time 996384578455 tsc 3850532913950
  2nd event perf time 996384578845 tsc 3850532915428
  test child finished with 0
  ---- end ----
  Convert perf time to TSC: Ok
  #

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kemeng Shi <shikemeng@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nick Gasson <nick.gasson@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Remi Bernon <rbernon@codeweavers.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steve Maclean <steve.maclean@microsoft.com>
Cc: Will Deacon <will@kernel.org>
Cc: Zou Wei <zou_wei@huawei.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lore.kernel.org/lkml/20200914115311.2201-4-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-09-22 13:45:21 -03:00
..
accounting
arch tools headers kvm s390: Sync headers with the kernel sources 2020-08-12 08:52:32 -03:00
bootconfig tools/bootconfig: Add testcases for value override operator 2020-08-03 16:22:29 -04:00
bpf tools/resolve_btfids: Fix sections with wrong alignment 2020-08-20 14:17:20 -07:00
build tools feature: Add missing -lzstd to the fast path feature detection 2020-09-09 11:11:01 -03:00
cgroup tools/cgroup: add memcg_slabinfo.py tool 2020-08-07 11:33:25 -07:00
debugging
edid
firewire
firmware
gpio
hv
iio
include tools headers UAPI: update linux/in.h copy 2020-09-14 19:06:41 -03:00
io_uring
kvm/kvm_stat
laptop
leds
lib libtraceevent: Fix build warning on 32-bit arches 2020-09-03 15:45:15 -03:00
memory-model These were the main changes in this cycle: 2020-08-03 14:39:35 -07:00
nfsd
objtool Misc updates: 2020-08-03 14:45:33 -07:00
pci
pcmcia
perf perf tsc: Calculate timestamp with cap_user_time_short 2020-09-22 13:45:21 -03:00
power ACPI updates for 5.9-rc1 2020-08-03 20:37:22 -07:00
scripts
spi
testing linux-kselftest-5.9-rc5 2020-09-08 11:56:47 -07:00
thermal/tmon
time
usb tools: usb: move to tools buildsystem 2020-08-19 14:11:44 +02:00
virtio virtio: fixes, features 2020-08-11 14:34:17 -07:00
vm
wmi
Makefile