2022-04-22 21:39:22

by Timothy Hayes

[permalink] [raw]
Subject: [PATCH 1/3] perf: arm-spe: Fix addresses of synthesized SPE events

This patch corrects a bug whereby synthesized events from SPE
samples are missing virtual addresses.

Signed-off-by: Timothy Hayes <[email protected]>
---
tools/perf/util/arm-spe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index d2b64e3f588b..151cc38a171c 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -1036,7 +1036,7 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session)
attr.sample_type = evsel->core.attr.sample_type & PERF_SAMPLE_MASK;
attr.sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID |
PERF_SAMPLE_PERIOD | PERF_SAMPLE_DATA_SRC |
- PERF_SAMPLE_WEIGHT;
+ PERF_SAMPLE_WEIGHT | PERF_SAMPLE_ADDR;
if (spe->timeless_decoding)
attr.sample_type &= ~(u64)PERF_SAMPLE_TIME;
else
--
2.25.1


2022-04-24 16:27:15

by Leo Yan

[permalink] [raw]
Subject: Re: [PATCH 1/3] perf: arm-spe: Fix addresses of synthesized SPE events

On Thu, Apr 21, 2022 at 05:52:03PM +0100, Timothy Hayes wrote:
> This patch corrects a bug whereby synthesized events from SPE
> samples are missing virtual addresses.
>
> Signed-off-by: Timothy Hayes <[email protected]>

Reviewed-by: Leo Yan <[email protected]>

> ---
> tools/perf/util/arm-spe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
> index d2b64e3f588b..151cc38a171c 100644
> --- a/tools/perf/util/arm-spe.c
> +++ b/tools/perf/util/arm-spe.c
> @@ -1036,7 +1036,7 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session)
> attr.sample_type = evsel->core.attr.sample_type & PERF_SAMPLE_MASK;
> attr.sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID |
> PERF_SAMPLE_PERIOD | PERF_SAMPLE_DATA_SRC |
> - PERF_SAMPLE_WEIGHT;
> + PERF_SAMPLE_WEIGHT | PERF_SAMPLE_ADDR;
> if (spe->timeless_decoding)
> attr.sample_type &= ~(u64)PERF_SAMPLE_TIME;
> else
> --
> 2.25.1
>

2022-04-25 07:54:39

by Leo Yan

[permalink] [raw]
Subject: Re: [PATCH 1/3] perf: arm-spe: Fix addresses of synthesized SPE events

On Sun, Apr 24, 2022 at 08:28:31PM +0800, Leo Yan wrote:
> On Thu, Apr 21, 2022 at 05:52:03PM +0100, Timothy Hayes wrote:
> > This patch corrects a bug whereby synthesized events from SPE
> > samples are missing virtual addresses.
> >
> > Signed-off-by: Timothy Hayes <[email protected]>
>
> Reviewed-by: Leo Yan <[email protected]>

Supplement for fixed tag:

Since patches 01, 02 are fixing bugs, please add fixed tag [1]:

Fixes: 54f7815efef7 ("perf arm-spe: Fill address info for samples")

Thanks,
Leo

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n138