All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 00/11] perf intel-pt: Add perf event clocks to better support VM tracing
@ 2022-02-14 11:09 Adrian Hunter
  2022-02-14 11:09 ` [PATCH V2 01/11] perf/x86: Fix native_perf_sched_clock_from_tsc() with __sched_clock_offset Adrian Hunter
                   ` (11 more replies)
  0 siblings, 12 replies; 46+ messages in thread
From: Adrian Hunter @ 2022-02-14 11:09 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Alexander Shishkin, Arnaldo Carvalho de Melo, Jiri Olsa,
	linux-kernel, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, kvm, H Peter Anvin, Mathieu Poirier,
	Suzuki K Poulose, Leo Yan

Hi

These patches add 2 new perf event clocks based on TSC for use with VMs.

The first patch is a minor fix, the next 2 patches add each of the 2 new
clocks.  The remaining patches add minimal tools support and are based on
top of the Intel PT Event Trace tools' patches.

The future work, to add the ability to use perf inject to inject perf
events from a VM guest perf.data file into a VM host perf.data file,
has yet to be implemented.


Changes in V2:
      perf/x86: Fix native_perf_sched_clock_from_tsc() with __sched_clock_offset
	  Add __sched_clock_offset unconditionally

      perf/x86: Add support for TSC as a perf event clock
	  Use an attribute bit 'ns_clockid' to identify non-standard clockids

      perf/x86: Add support for TSC in nanoseconds as a perf event clock
	  Do not affect use of __sched_clock_offset
	  Adjust to use 'ns_clockid'

      perf tools: Add new perf clock IDs
      perf tools: Add API probes for new clock IDs
      perf tools: Add new clock IDs to "perf time to TSC" test
      perf tools: Add perf_read_tsc_conv_for_clockid()
      perf intel-pt: Add support for new clock IDs
      perf intel-pt: Use CLOCK_PERF_HW_CLOCK_NS by default
      perf intel-pt: Add config variables for timing parameters
      perf intel-pt: Add documentation for new clock IDs
	  Adjust to use 'ns_clockid'


Adrian Hunter (11):
      perf/x86: Fix native_perf_sched_clock_from_tsc() with __sched_clock_offset
      perf/x86: Add support for TSC as a perf event clock
      perf/x86: Add support for TSC in nanoseconds as a perf event clock
      perf tools: Add new perf clock IDs
      perf tools: Add API probes for new clock IDs
      perf tools: Add new clock IDs to "perf time to TSC" test
      perf tools: Add perf_read_tsc_conv_for_clockid()
      perf intel-pt: Add support for new clock IDs
      perf intel-pt: Use CLOCK_PERF_HW_CLOCK_NS by default
      perf intel-pt: Add config variables for timing parameters
      perf intel-pt: Add documentation for new clock IDs

 arch/x86/events/core.c                     | 39 ++++++++++--
 arch/x86/include/asm/perf_event.h          |  5 ++
 arch/x86/kernel/tsc.c                      |  2 +-
 include/uapi/linux/perf_event.h            | 18 +++++-
 kernel/events/core.c                       | 63 +++++++++++++-------
 tools/include/uapi/linux/perf_event.h      | 18 +++++-
 tools/perf/Documentation/perf-config.txt   | 18 ++++++
 tools/perf/Documentation/perf-intel-pt.txt | 47 +++++++++++++++
 tools/perf/Documentation/perf-record.txt   |  9 ++-
 tools/perf/arch/x86/util/intel-pt.c        | 95 ++++++++++++++++++++++++++++--
 tools/perf/builtin-record.c                |  2 +-
 tools/perf/tests/perf-time-to-tsc.c        | 42 ++++++++++---
 tools/perf/util/clockid.c                  | 14 +++++
 tools/perf/util/evsel.c                    |  1 +
 tools/perf/util/intel-pt.c                 | 27 +++++++--
 tools/perf/util/intel-pt.h                 |  7 ++-
 tools/perf/util/perf_api_probe.c           | 24 ++++++++
 tools/perf/util/perf_api_probe.h           |  2 +
 tools/perf/util/perf_event_attr_fprintf.c  |  1 +
 tools/perf/util/record.h                   |  2 +
 tools/perf/util/tsc.c                      | 58 ++++++++++++++++++
 tools/perf/util/tsc.h                      |  2 +
 22 files changed, 444 insertions(+), 52 deletions(-)


Regards
Adrian

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2022-05-16  7:21 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 11:09 [PATCH V2 00/11] perf intel-pt: Add perf event clocks to better support VM tracing Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 01/11] perf/x86: Fix native_perf_sched_clock_from_tsc() with __sched_clock_offset Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 02/11] perf/x86: Add support for TSC as a perf event clock Adrian Hunter
2022-03-04 12:30   ` Peter Zijlstra
2022-03-04 13:03     ` Adrian Hunter
2022-03-04 12:32   ` Peter Zijlstra
2022-03-04 17:51     ` Thomas Gleixner
2022-03-04 12:33   ` Peter Zijlstra
2022-03-04 12:41     ` Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 03/11] perf/x86: Add support for TSC in nanoseconds " Adrian Hunter
2022-03-04 13:41   ` Peter Zijlstra
2022-03-04 18:27     ` Adrian Hunter
2022-03-07  9:50       ` Peter Zijlstra
2022-03-07  9:50         ` Peter Zijlstra
2022-03-07 10:06         ` Juergen Gross via Virtualization
2022-03-07 10:06           ` Juergen Gross
2022-03-07 10:38           ` Peter Zijlstra
2022-03-07 10:38             ` Peter Zijlstra
2022-03-07 10:58             ` Juergen Gross via Virtualization
2022-03-07 10:58               ` Juergen Gross
2022-03-07 12:36         ` Adrian Hunter
2022-03-07 14:42           ` Peter Zijlstra
2022-03-07 14:42             ` Peter Zijlstra
2022-03-08 14:23             ` Adrian Hunter
2022-03-08 21:06               ` Hall, Christopher S
2022-03-14 11:50                 ` Adrian Hunter
2022-04-25  5:30                   ` Adrian Hunter
2022-04-25  9:32                     ` Thomas Gleixner
2022-04-25  9:32                       ` Thomas Gleixner
2022-04-25 13:15                       ` Adrian Hunter
2022-04-25 17:05                         ` Thomas Gleixner
2022-04-25 17:05                           ` Thomas Gleixner
2022-04-26  6:51                           ` Adrian Hunter
2022-04-27 23:10                             ` Thomas Gleixner
2022-04-27 23:10                               ` Thomas Gleixner
2022-05-16  7:20                               ` Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 04/11] perf tools: Add new perf clock IDs Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 05/11] perf tools: Add API probes for new " Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 06/11] perf tools: Add new clock IDs to "perf time to TSC" test Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 07/11] perf tools: Add perf_read_tsc_conv_for_clockid() Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 08/11] perf intel-pt: Add support for new clock IDs Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 09/11] perf intel-pt: Use CLOCK_PERF_HW_CLOCK_NS by default Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 10/11] perf intel-pt: Add config variables for timing parameters Adrian Hunter
2022-02-14 11:09 ` [PATCH V2 11/11] perf intel-pt: Add documentation for new clock IDs Adrian Hunter
2022-02-21  6:54 ` [PATCH V2 00/11] perf intel-pt: Add perf event clocks to better support VM tracing Adrian Hunter
2022-03-01 11:06   ` Adrian Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.