linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: thomas.falcon@intel.com
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>,
	Dapeng Mi <dapeng1.mi@linux.intel.com>
Subject: Re: [Patch v3 0/2] perf record: ratio-to-prev event term for auto counter reload
Date: Fri, 3 Oct 2025 16:27:55 -0300	[thread overview]
Message-ID: <aOAju-lDNHBFnYWx@x1> (raw)
In-Reply-To: <20251002234308.64218-1-thomas.falcon@intel.com>

On Thu, Oct 02, 2025 at 06:43:04PM -0500, thomas.falcon@intel.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):

  parent reply	other threads:[~2025-10-03 19:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 23:43 [Patch v3 0/2] perf record: ratio-to-prev event term for auto counter reload thomas.falcon
2025-10-02 23:43 ` [Patch v3 1/2] perf record: Add ratio-to-prev term thomas.falcon
2025-10-07  8:55   ` Namhyung Kim
2025-10-08 20:30     ` Falcon, Thomas
2025-10-02 23:43 ` [Patch v3 2/2] perf record: Add auto counter reload parse and regression tests thomas.falcon
2025-10-03 19:27 ` Arnaldo Carvalho de Melo [this message]
2025-10-06 16:23   ` [Patch v3 0/2] perf record: ratio-to-prev event term for auto counter reload Falcon, Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aOAju-lDNHBFnYWx@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=thomas.falcon@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).