[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aOAju-lDNHBFnYWx@x1>
Date: Fri, 3 Oct 2025 16:27:55 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: thomas.falcon@...el.com
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
Dapeng Mi <dapeng1.mi@...ux.intel.com>
Subject: Re: [Patch v3 0/2] perf record: ratio-to-prev event term for auto
counter reload
On Thu, Oct 02, 2025 at 06:43:04PM -0500, thomas.falcon@...el.com wrote:
> The goal is to limit event sampling to cases when the branch miss rate
> exceeds 20%. If the branch instructions sample period is exceeded
> first, both events are reloaded. If branch misses exceed their
> threshold first, only the second counter is reloaded, and a sample is
> taken.
> To simplify this, provide a new “ratio-to-prev” event term
> that works alongside the period event option or -c option.
> This would allow users to specify the desired relative rate
> between events as a ratio, making configuration more intuitive.
> With this enhancement, the equivalent command would be:
>
> perf record -e "{cpu_atom/branch-misses/ppu,\
> cpu_atom/branch-instructions,period=1000000,ratio_to_prev=5/u}" \
> -- ./mispredict
> or
> perf record -e "{cpu_atom/branch-misses/ppu,\
> cpu_atom/branch-instructions,ratio-to-prev=5/u}" -c 1000000 \
> -- ./mispredict
> [1] https://lore.kernel.org/lkml/20250327195217.2683619-1-kan.liang@linux.intel.com/
> v3: rebase to current perf-tools-next
Thanks, applied to perf-tools-next,
- Arnaldo
> v2: (changes below suggested by Ian Rogers):
Powered by blists - more mailing lists