mirror-linux/tools/perf/arch/x86/util
Thomas Falcon 6b9c0261b3 perf record: Add ratio-to-prev term
Provide ratio-to-prev term which allows the user to
set the event sample period of two events corresponding
to a desired ratio.

If using on an Intel x86 platform with Auto Counter Reload support, also
set corresponding event's config2 attribute with a bitmask which
counters to reset and which counters to sample if the desired ratio is
met or exceeded.

On other platforms, only the sample period is affected by the
ratio-to-prev term.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Thomas Falcon <thomas.falcon@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2025-10-03 16:49:51 -03:00
..
Build perf x86: Define arch_fetch_insn in NO_AUXTRACE builds 2024-12-18 16:24:33 -03:00
archinsn.c tools/perf: Convert to insn_decode() 2021-03-15 12:41:26 +01:00
auxtrace.c perf header: Refactor get_cpuid to take a CPU for ARM 2024-11-16 16:37:54 -03:00
cpuid.h perf tsc: Add arch TSC frequency information 2022-07-25 12:28:00 -03:00
event.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
evlist.c perf parse-events: Fix missing slots for Intel topdown metric events 2025-07-24 13:41:35 -07:00
evsel.c perf record: Add ratio-to-prev term 2025-10-03 16:49:51 -03:00
evsel.h perf record: Support sample-read topdown metric group for hybrid platforms 2022-06-03 21:30:10 +02:00
header.c perf header: Pass a perf_cpu rather than a PMU to get_cpuid_str 2024-11-16 16:40:30 -03:00
intel-bts.c perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record 2024-08-28 18:15:16 -03:00
intel-pt.c perf intel-pt: Do not default to recording all switch events 2025-05-12 14:18:16 -03:00
iostat.c perf tools: Fix up some comments and code to properly use the event_source bus 2025-02-19 13:23:43 -08:00
kvm-stat.c perf tools kvm: Use "cycles" to sample guest for "kvm record" on Intel 2025-10-02 15:31:39 -03:00
machine.c
mem-events.c perf mem/c2c amd: Add ldlat support 2025-04-29 22:30:46 -03:00
mem-events.h perf mem/c2c amd: Add ldlat support 2025-04-29 22:30:46 -03:00
perf_regs.c perf parse-regs: Introduce a weak function arch__sample_reg_masks() 2024-02-15 13:48:36 -08:00
pmu.c perf pmu intel: Adjust cpumaks for sub-NUMA clusters on graniterapids 2025-05-22 23:15:48 -03:00
topdown.c perf parse-events: Fix missing slots for Intel topdown metric events 2025-07-24 13:41:35 -07:00
topdown.h perf parse-events: Fix missing slots for Intel topdown metric events 2025-07-24 13:41:35 -07:00
tsc.c perf tool_pmu: Move expr literals to tool_pmu 2024-10-10 23:40:32 -07:00
unwind-libdw.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
unwind-libunwind.c