From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: peterz@infradead.org, mingo@redhat.com,
linux-kernel@vger.kernel.org, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
namhyung@kernel.org, irogers@google.com, adrian.hunter@intel.com,
ak@linux.intel.com, eranian@google.com,
alexey.v.bayduraev@linux.intel.com, tinghao.zhang@intel.com
Subject: Re: [PATCH V5 2/8] perf/x86: Add PERF_X86_EVENT_NEEDS_BRANCH_STACK flag
Date: Tue, 7 Nov 2023 12:11:50 -0300 [thread overview]
Message-ID: <ZUpTtoCzJFHhnSdh@kernel.org> (raw)
In-Reply-To: <fb1ebf48-ac2f-499a-b480-ba8474b12200@linux.intel.com>
Em Mon, Nov 06, 2023 at 04:19:13PM -0500, Liang, Kan escreveu:
>
>
> On 2023-11-06 4:12 p.m., Arnaldo Carvalho de Melo wrote:
> > Em Wed, Oct 25, 2023 at 01:16:20PM -0700, kan.liang@linux.intel.com escreveu:
> >> From: Kan Liang <kan.liang@linux.intel.com>
> >>
> >> Currently, branch_sample_type !=0 is used to check whether a branch
> >> stack setup is required. But it doesn't check the sample type,
> >> unnecessary branch stack setup may be done for a counting event. E.g.,
> >> perf record -e "{branch-instructions,branch-misses}:S" -j any
> >> Also, the event only with the new PERF_SAMPLE_BRANCH_COUNTERS branch
> >> sample type may not require a branch stack setup either.
> >>
> >> Add a new flag NEEDS_BRANCH_STACK to indicate whether the event requires
> >> a branch stack setup. Replace the needs_branch_stack() by checking the
> >> new flag.
> >>
> >> The counting event check is implemented here. The later patch will take
> >> the new PERF_SAMPLE_BRANCH_COUNTERS into account.
> >>
> >> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> >> ---
> >>
> >> No changes since V4
> >
> > So I saw this on tip/perf/urgent, I'm picking the tools bits then.
>
> Thanks Arnaldo.
>
> Ian has already reviewed the tool parts.
>
> But I still owe a test case for the feature. I will post a patch later.
> https://lore.kernel.org/lkml/acbb895a-475e-4679-98fc-6b90c05a00af@linux.intel.com/
I saw Ian's suggestion, and agree with it, we need to pair new features
with regression tests in 'perf test', thanks for working on it!
- Arnaldo
next prev parent reply other threads:[~2023-11-07 15:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 20:16 [PATCH V5 1/8] perf: Add branch stack counters kan.liang
2023-10-25 20:16 ` [PATCH V5 2/8] perf/x86: Add PERF_X86_EVENT_NEEDS_BRANCH_STACK flag kan.liang
2023-11-06 21:12 ` Arnaldo Carvalho de Melo
2023-11-06 21:19 ` Liang, Kan
2023-11-07 15:11 ` Arnaldo Carvalho de Melo [this message]
2023-11-08 21:31 ` Arnaldo Carvalho de Melo
2023-11-09 16:14 ` Liang, Kan
2023-11-09 16:45 ` Arnaldo Carvalho de Melo
2023-11-09 17:05 ` Liang, Kan
2023-11-09 18:46 ` Arnaldo Carvalho de Melo
2023-11-09 19:07 ` Liang, Kan
2023-10-25 20:16 ` [PATCH V5 3/8] perf: Add branch_sample_call_stack kan.liang
2023-10-25 20:16 ` [PATCH V5 4/8] perf/x86/intel: Reorganize attrs and is_visible kan.liang
2023-10-25 20:16 ` [PATCH V5 5/8] perf/x86/intel: Support branch counters logging kan.liang
2023-10-25 20:16 ` [PATCH V5 6/8] tools headers UAPI: Sync include/uapi/linux/perf_event.h header with the kernel kan.liang
2023-10-25 20:16 ` [PATCH V5 7/8] perf header: Support num and width of branch counters kan.liang
2023-10-26 2:10 ` Ian Rogers
2023-10-25 20:16 ` [PATCH V5 8/8] perf tools: Add branch counter knob kan.liang
2023-10-26 2:12 ` Ian Rogers
2023-10-26 18:28 ` Liang, Kan
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=ZUpTtoCzJFHhnSdh@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexey.v.bayduraev@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tinghao.zhang@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 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.