]> Gentwo Git Trees - linux/.git/commit
perf record: Add ratio-to-prev term
authorThomas Falcon <thomas.falcon@intel.com>
Thu, 2 Oct 2025 23:43:05 +0000 (18:43 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 3 Oct 2025 19:49:51 +0000 (16:49 -0300)
commit6b9c0261b3fb298b1fd49621f0479518efdcf3dc
tree629262ece84cd5b0efc9002c3c105fef622905dd
parent584754cbee6edf8495117e176427113b51a9bd7f
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>
tools/perf/Documentation/intel-acr.txt [new file with mode: 0644]
tools/perf/Documentation/perf-list.txt
tools/perf/arch/x86/util/evsel.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/evsel_config.h
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h
tools/perf/util/parse-events.l
tools/perf/util/pmu.c