* [PATCH] perf script: Update brstack syntax documentation
@ 2025-02-25 6:17 Yujie Liu
2025-03-07 9:18 ` Yujie Liu
2025-03-11 8:14 ` Leo Yan
0 siblings, 2 replies; 6+ messages in thread
From: Yujie Liu @ 2025-02-25 6:17 UTC (permalink / raw)
To: linux-perf-users, linux-kernel
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Liang, Kan, Andi Kleen, Martin Liska
The following commits appended new fields to the end of the branch info
list, such as branch type and branch speculation info.
commit 1f48989cdc7d ("perf script: Output branch sample type")
commit 6ade6c646035 ("perf script: Show branch speculation info")
Update brstack syntax documentation to be consistent with the latest
branch info list. Improve the descriptions to help users interpret the
fields accurately.
Signed-off-by: Yujie Liu <yujie.liu@intel.com>
---
tools/perf/Documentation/perf-script.txt | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index b72866ef270b..8bd105084280 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -239,13 +239,15 @@ OPTIONS
i.e., -F "" is not allowed.
The brstack output includes branch related information with raw addresses using the
- /v/v/v/v/cycles syntax in the following order:
- FROM: branch source instruction
- TO : branch target instruction
- M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
- X/- : X=branch inside a transactional region, -=not in transaction region or not supported
- A/- : A=TSX abort entry, -=not aborted region or not supported
- cycles
+ FROM/TO/PRED/INTX/ABORT/CYCLES/TYPE/SPEC syntax in the following order:
+ FROM : branch source instruction
+ TO : branch target instruction
+ PRED : M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
+ INTX : X=branch inside a transactional region, -=not in transaction region or not supported
+ ABORT : A=TSX abort entry, -=not aborted region or not supported
+ CYCLES: the number of cycles that have elapsed since the last branch was recorded
+ TYPE : branch type
+ SPEC : branch speculation info
The brstacksym is identical to brstack, except that the FROM and TO addresses are printed in a symbolic form if possible.
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] perf script: Update brstack syntax documentation
2025-02-25 6:17 [PATCH] perf script: Update brstack syntax documentation Yujie Liu
@ 2025-03-07 9:18 ` Yujie Liu
2025-03-10 21:13 ` Namhyung Kim
2025-03-11 8:14 ` Leo Yan
1 sibling, 1 reply; 6+ messages in thread
From: Yujie Liu @ 2025-03-07 9:18 UTC (permalink / raw)
To: linux-perf-users, linux-kernel
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Liang, Kan, Andi Kleen, Martin Liska
Hi, friendly ping on this perf script doc fix. Thanks.
On Tue, Feb 25, 2025 at 02:17:36PM +0800, Yujie Liu wrote:
> The following commits appended new fields to the end of the branch info
> list, such as branch type and branch speculation info.
>
> commit 1f48989cdc7d ("perf script: Output branch sample type")
> commit 6ade6c646035 ("perf script: Show branch speculation info")
>
> Update brstack syntax documentation to be consistent with the latest
> branch info list. Improve the descriptions to help users interpret the
> fields accurately.
>
> Signed-off-by: Yujie Liu <yujie.liu@intel.com>
> ---
> tools/perf/Documentation/perf-script.txt | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
> index b72866ef270b..8bd105084280 100644
> --- a/tools/perf/Documentation/perf-script.txt
> +++ b/tools/perf/Documentation/perf-script.txt
> @@ -239,13 +239,15 @@ OPTIONS
> i.e., -F "" is not allowed.
>
> The brstack output includes branch related information with raw addresses using the
> - /v/v/v/v/cycles syntax in the following order:
> - FROM: branch source instruction
> - TO : branch target instruction
> - M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
> - X/- : X=branch inside a transactional region, -=not in transaction region or not supported
> - A/- : A=TSX abort entry, -=not aborted region or not supported
> - cycles
> + FROM/TO/PRED/INTX/ABORT/CYCLES/TYPE/SPEC syntax in the following order:
> + FROM : branch source instruction
> + TO : branch target instruction
> + PRED : M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
> + INTX : X=branch inside a transactional region, -=not in transaction region or not supported
> + ABORT : A=TSX abort entry, -=not aborted region or not supported
> + CYCLES: the number of cycles that have elapsed since the last branch was recorded
> + TYPE : branch type
> + SPEC : branch speculation info
>
> The brstacksym is identical to brstack, except that the FROM and TO addresses are printed in a symbolic form if possible.
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf script: Update brstack syntax documentation
2025-03-07 9:18 ` Yujie Liu
@ 2025-03-10 21:13 ` Namhyung Kim
2025-03-11 3:20 ` Yujie Liu
0 siblings, 1 reply; 6+ messages in thread
From: Namhyung Kim @ 2025-03-10 21:13 UTC (permalink / raw)
To: Yujie Liu
Cc: linux-perf-users, linux-kernel, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Ian Rogers, Adrian Hunter, Liang, Kan, Andi Kleen,
Martin Liska, Leo Yan
Hello,
On Fri, Mar 07, 2025 at 05:18:12PM +0800, Yujie Liu wrote:
> Hi, friendly ping on this perf script doc fix. Thanks.
Sorry for the late reply.
>
> On Tue, Feb 25, 2025 at 02:17:36PM +0800, Yujie Liu wrote:
> > The following commits appended new fields to the end of the branch info
> > list, such as branch type and branch speculation info.
> >
> > commit 1f48989cdc7d ("perf script: Output branch sample type")
> > commit 6ade6c646035 ("perf script: Show branch speculation info")
> >
> > Update brstack syntax documentation to be consistent with the latest
> > branch info list. Improve the descriptions to help users interpret the
> > fields accurately.
Thanks for your work, but can you please update it again with recent
changes from Leo?
https://lore.kernel.org/linux-perf-users/20250304111240.3378214-1-leo.yan@arm.com/
Thanks,
Namhyung
> >
> > Signed-off-by: Yujie Liu <yujie.liu@intel.com>
> > ---
> > tools/perf/Documentation/perf-script.txt | 16 +++++++++-------
> > 1 file changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
> > index b72866ef270b..8bd105084280 100644
> > --- a/tools/perf/Documentation/perf-script.txt
> > +++ b/tools/perf/Documentation/perf-script.txt
> > @@ -239,13 +239,15 @@ OPTIONS
> > i.e., -F "" is not allowed.
> >
> > The brstack output includes branch related information with raw addresses using the
> > - /v/v/v/v/cycles syntax in the following order:
> > - FROM: branch source instruction
> > - TO : branch target instruction
> > - M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
> > - X/- : X=branch inside a transactional region, -=not in transaction region or not supported
> > - A/- : A=TSX abort entry, -=not aborted region or not supported
> > - cycles
> > + FROM/TO/PRED/INTX/ABORT/CYCLES/TYPE/SPEC syntax in the following order:
> > + FROM : branch source instruction
> > + TO : branch target instruction
> > + PRED : M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
> > + INTX : X=branch inside a transactional region, -=not in transaction region or not supported
> > + ABORT : A=TSX abort entry, -=not aborted region or not supported
> > + CYCLES: the number of cycles that have elapsed since the last branch was recorded
> > + TYPE : branch type
> > + SPEC : branch speculation info
> >
> > The brstacksym is identical to brstack, except that the FROM and TO addresses are printed in a symbolic form if possible.
> >
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf script: Update brstack syntax documentation
2025-03-10 21:13 ` Namhyung Kim
@ 2025-03-11 3:20 ` Yujie Liu
0 siblings, 0 replies; 6+ messages in thread
From: Yujie Liu @ 2025-03-11 3:20 UTC (permalink / raw)
To: Namhyung Kim
Cc: linux-perf-users, linux-kernel, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Ian Rogers, Adrian Hunter, Liang, Kan, Andi Kleen,
Martin Liska, Leo Yan
On Mon, Mar 10, 2025 at 02:13:56PM -0700, Namhyung Kim wrote:
> > On Tue, Feb 25, 2025 at 02:17:36PM +0800, Yujie Liu wrote:
> > > The following commits appended new fields to the end of the branch info
> > > list, such as branch type and branch speculation info.
> > >
> > > commit 1f48989cdc7d ("perf script: Output branch sample type")
> > > commit 6ade6c646035 ("perf script: Show branch speculation info")
> > >
> > > Update brstack syntax documentation to be consistent with the latest
> > > branch info list. Improve the descriptions to help users interpret the
> > > fields accurately.
>
> Thanks for your work, but can you please update it again with recent
> changes from Leo?
>
> https://lore.kernel.org/linux-perf-users/20250304111240.3378214-1-leo.yan@arm.com/
Sure. I will respin this patch to align with Leo's recent changes.
Best Regards,
Yujie
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf script: Update brstack syntax documentation
2025-02-25 6:17 [PATCH] perf script: Update brstack syntax documentation Yujie Liu
2025-03-07 9:18 ` Yujie Liu
@ 2025-03-11 8:14 ` Leo Yan
2025-03-11 9:04 ` Yujie Liu
1 sibling, 1 reply; 6+ messages in thread
From: Leo Yan @ 2025-03-11 8:14 UTC (permalink / raw)
To: Yujie Liu
Cc: linux-perf-users, linux-kernel, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
Liang, Kan, Andi Kleen, Martin Liska
Hi Yujie,
Sorry I missed this patch.
On Tue, Feb 25, 2025 at 02:17:36PM +0800, Yujie Liu wrote:
>
> The following commits appended new fields to the end of the branch info
> list, such as branch type and branch speculation info.
>
> commit 1f48989cdc7d ("perf script: Output branch sample type")
> commit 6ade6c646035 ("perf script: Show branch speculation info")
>
> Update brstack syntax documentation to be consistent with the latest
> branch info list. Improve the descriptions to help users interpret the
> fields accurately.
>
> Signed-off-by: Yujie Liu <yujie.liu@intel.com>
> ---
> tools/perf/Documentation/perf-script.txt | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
> index b72866ef270b..8bd105084280 100644
> --- a/tools/perf/Documentation/perf-script.txt
> +++ b/tools/perf/Documentation/perf-script.txt
> @@ -239,13 +239,15 @@ OPTIONS
> i.e., -F "" is not allowed.
>
> The brstack output includes branch related information with raw addresses using the
> - /v/v/v/v/cycles syntax in the following order:
> - FROM: branch source instruction
> - TO : branch target instruction
> - M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
> - X/- : X=branch inside a transactional region, -=not in transaction region or not supported
> - A/- : A=TSX abort entry, -=not aborted region or not supported
> - cycles
> + FROM/TO/PRED/INTX/ABORT/CYCLES/TYPE/SPEC syntax in the following order:
> + FROM : branch source instruction
> + TO : branch target instruction
> + PRED : M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
Can we use a more generic naming (e.g., EVENT) for this field?
My patches have added a 'N' flag in this field, which stands for
"Not taken branch". Later we might extend this field for support new
event types.
Thanks,
Leo
> + INTX : X=branch inside a transactional region, -=not in transaction region or not supported
> + ABORT : A=TSX abort entry, -=not aborted region or not supported
> + CYCLES: the number of cycles that have elapsed since the last branch was recorded
> + TYPE : branch type
> + SPEC : branch speculation info
>
> The brstacksym is identical to brstack, except that the FROM and TO addresses are printed in a symbolic form if possible.
>
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf script: Update brstack syntax documentation
2025-03-11 8:14 ` Leo Yan
@ 2025-03-11 9:04 ` Yujie Liu
0 siblings, 0 replies; 6+ messages in thread
From: Yujie Liu @ 2025-03-11 9:04 UTC (permalink / raw)
To: Leo Yan
Cc: linux-perf-users, linux-kernel, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
Liang, Kan, Andi Kleen, Martin Liska
Hi Leo,
On Tue, Mar 11, 2025 at 08:14:43AM +0000, Leo Yan wrote:
> Hi Yujie,
>
> Sorry I missed this patch.
>
> On Tue, Feb 25, 2025 at 02:17:36PM +0800, Yujie Liu wrote:
> >
> > The following commits appended new fields to the end of the branch info
> > list, such as branch type and branch speculation info.
> >
> > commit 1f48989cdc7d ("perf script: Output branch sample type")
> > commit 6ade6c646035 ("perf script: Show branch speculation info")
> >
> > Update brstack syntax documentation to be consistent with the latest
> > branch info list. Improve the descriptions to help users interpret the
> > fields accurately.
> >
> > Signed-off-by: Yujie Liu <yujie.liu@intel.com>
> > ---
> > tools/perf/Documentation/perf-script.txt | 16 +++++++++-------
> > 1 file changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
> > index b72866ef270b..8bd105084280 100644
> > --- a/tools/perf/Documentation/perf-script.txt
> > +++ b/tools/perf/Documentation/perf-script.txt
> > @@ -239,13 +239,15 @@ OPTIONS
> > i.e., -F "" is not allowed.
> >
> > The brstack output includes branch related information with raw addresses using the
> > - /v/v/v/v/cycles syntax in the following order:
> > - FROM: branch source instruction
> > - TO : branch target instruction
> > - M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
> > - X/- : X=branch inside a transactional region, -=not in transaction region or not supported
> > - A/- : A=TSX abort entry, -=not aborted region or not supported
> > - cycles
> > + FROM/TO/PRED/INTX/ABORT/CYCLES/TYPE/SPEC syntax in the following order:
> > + FROM : branch source instruction
> > + TO : branch target instruction
> > + PRED : M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
>
> Can we use a more generic naming (e.g., EVENT) for this field?
>
> My patches have added a 'N' flag in this field, which stands for
> "Not taken branch". Later we might extend this field for support new
> event types.
Thank you for this feedback. Sure I'll change this field name to EVENT
in the repsin patch.
Thanks,
Yujie
>
> Thanks,
> Leo
>
> > + INTX : X=branch inside a transactional region, -=not in transaction region or not supported
> > + ABORT : A=TSX abort entry, -=not aborted region or not supported
> > + CYCLES: the number of cycles that have elapsed since the last branch was recorded
> > + TYPE : branch type
> > + SPEC : branch speculation info
> >
> > The brstacksym is identical to brstack, except that the FROM and TO addresses are printed in a symbolic form if possible.
> >
> > --
> > 2.34.1
> >
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-03-11 9:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 6:17 [PATCH] perf script: Update brstack syntax documentation Yujie Liu
2025-03-07 9:18 ` Yujie Liu
2025-03-10 21:13 ` Namhyung Kim
2025-03-11 3:20 ` Yujie Liu
2025-03-11 8:14 ` Leo Yan
2025-03-11 9:04 ` Yujie Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox