kernel_optimize_test/tools/perf/arch/x86/util
Leo Yan 03fca3af51 perf tsc: Move out common functions from x86
Functions perf_read_tsc_conversion() and perf_event__synth_time_conv()
should work as common functions rather than x86 specific, so move these
two functions out from arch/x86 folder and place them into util/tsc.c.

Since the function perf_event__synth_time_conv() will be linked in
util/tsc.c, remove its weak version.

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 8520
  mmap size 528384B
  1st event perf time 592110439891 tsc 2317172044331
  rdtsc          time 592110441915 tsc 2317172052010
  2nd event perf time 592110442336 tsc 2317172053605
  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: linux-arm-kernel@lists.infradead.org
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>
Link: http://lore.kernel.org/lkml/20200914115311.2201-2-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-09-22 13:38:33 -03:00
..
archinsn.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
auxtrace.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
Build perf tools: Rename group to topdown 2020-09-17 15:47:55 -03:00
dwarf-regs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
event.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
header.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
intel-bts.c perf evsel: Rename *perf_evsel__*set_sample_*() to *evsel__*set_sample_*() 2020-05-05 16:35:30 -03:00
intel-pt.c perf intel-pt: Add support for text poke events 2020-07-10 08:31:21 -03:00
kvm-stat.c perf evsel: Rename perf_evsel__{str,int}val() and other tracepoint field metehods to to evsel__*() 2020-05-05 16:35:30 -03:00
machine.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
perf_regs.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
pmu.c tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
topdown.c perf record: Support sample-read topdown metric group 2020-09-17 15:47:58 -03:00
tsc.c perf tsc: Move out common functions from x86 2020-09-22 13:38:33 -03:00
unwind-libdw.c perf libdw: Fix off-by 1 relative directory includes 2020-06-01 12:24:23 -03:00
unwind-libunwind.c perf unwind: Fix libunwind build failure on i386 systems 2019-09-26 21:59:38 +02:00