* [PATCH v1 1/4] perf arm-spe: Set sample.addr to target address for instruction sample
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
@ 2024-10-25 14:30 ` Graham Woodward
2024-10-25 14:30 ` [PATCH v1 2/4] perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches Graham Woodward
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Graham Woodward @ 2024-10-25 14:30 UTC (permalink / raw)
To: acme, namhyung, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel
Cc: nd, Graham Woodward
For an instruction sample, assign the target address to the field
'to_ip'.
If it is a non-branch record, to_ip will be 0, presenting a non-valid
target address.
Signed-off-by: Graham Woodward <graham.woodward@arm.com>
---
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 856cc36f33d7..49b763807360 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -418,7 +418,7 @@ static int arm_spe__synth_instruction_sample(struct arm_spe_queue *speq,
sample.id = spe_events_id;
sample.stream_id = spe_events_id;
- sample.addr = record->virt_addr;
+ sample.addr = record->to_ip;
sample.phys_addr = record->phys_addr;
sample.data_src = data_src;
sample.period = spe->instructions_sample_period;
--
2.40.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v1 2/4] perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
2024-10-25 14:30 ` [PATCH v1 1/4] perf arm-spe: Set sample.addr to target address for instruction sample Graham Woodward
@ 2024-10-25 14:30 ` Graham Woodward
2024-10-25 14:30 ` [PATCH v1 3/4] perf arm-spe: Correctly set sample flags Graham Woodward
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Graham Woodward @ 2024-10-25 14:30 UTC (permalink / raw)
To: acme, namhyung, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel
Cc: nd, Graham Woodward
Instead of checking the type for just branch misses, we can instead
check for the OP_BRANCH_ERET and synthesise branches as well as
branch misses.
Signed-off-by: Graham Woodward <graham.woodward@arm.com>
---
tools/perf/util/arm-spe.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 49b763807360..e60e21d24735 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -68,7 +68,7 @@ struct arm_spe {
u64 llc_access_id;
u64 tlb_miss_id;
u64 tlb_access_id;
- u64 branch_miss_id;
+ u64 branch_id;
u64 remote_access_id;
u64 memory_id;
u64 instructions_id;
@@ -672,8 +672,8 @@ static int arm_spe_sample(struct arm_spe_queue *speq)
}
}
- if (spe->sample_branch && (record->type & ARM_SPE_BRANCH_MISS)) {
- err = arm_spe__synth_branch_sample(speq, spe->branch_miss_id);
+ if (spe->sample_branch && (record->op & ARM_SPE_OP_BRANCH_ERET)) {
+ err = arm_spe__synth_branch_sample(speq, spe->branch_id);
if (err)
return err;
}
@@ -1385,12 +1385,12 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session)
if (spe->synth_opts.branches) {
spe->sample_branch = true;
- /* Branch miss */
+ /* Branch */
err = perf_session__deliver_synth_attr_event(session, &attr, id);
if (err)
return err;
- spe->branch_miss_id = id;
- arm_spe_set_event_name(evlist, id, "branch-miss");
+ spe->branch_id = id;
+ arm_spe_set_event_name(evlist, id, "branch");
id += 1;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v1 3/4] perf arm-spe: Correctly set sample flags
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
2024-10-25 14:30 ` [PATCH v1 1/4] perf arm-spe: Set sample.addr to target address for instruction sample Graham Woodward
2024-10-25 14:30 ` [PATCH v1 2/4] perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches Graham Woodward
@ 2024-10-25 14:30 ` Graham Woodward
2024-10-25 14:30 ` [PATCH v1 4/4] perf arm-spe: Update --itrace help text Graham Woodward
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Graham Woodward @ 2024-10-25 14:30 UTC (permalink / raw)
To: acme, namhyung, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel
Cc: nd, Graham Woodward
Set flags on all synthesized instruction and branch samples.
Signed-off-by: Graham Woodward <graham.woodward@arm.com>
---
tools/perf/builtin-script.c | 1 +
tools/perf/util/arm-spe.c | 17 +++++++++++++++++
tools/perf/util/event.h | 1 +
3 files changed, 19 insertions(+)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 8c5d5cecfba4..6b6d4472db6e 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1728,6 +1728,7 @@ static struct {
{PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TRACE_END, "tr end"},
{PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | PERF_IP_FLAG_VMENTRY, "vmentry"},
{PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | PERF_IP_FLAG_VMEXIT, "vmexit"},
+ {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_BRANCH_MISS, "br miss"},
{0, NULL}
};
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index e60e21d24735..a291a412f6a1 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -100,6 +100,7 @@ struct arm_spe_queue {
u64 timestamp;
struct thread *thread;
u64 period_instructions;
+ u32 flags;
};
static void arm_spe_dump(struct arm_spe *spe __maybe_unused,
@@ -394,6 +395,7 @@ static int arm_spe__synth_branch_sample(struct arm_spe_queue *speq,
sample.stream_id = spe_events_id;
sample.addr = record->to_ip;
sample.weight = record->latency;
+ sample.flags = speq->flags;
return arm_spe_deliver_synth_event(spe, speq, event, &sample);
}
@@ -423,6 +425,7 @@ static int arm_spe__synth_instruction_sample(struct arm_spe_queue *speq,
sample.data_src = data_src;
sample.period = spe->instructions_sample_period;
sample.weight = record->latency;
+ sample.flags = speq->flags;
return arm_spe_deliver_synth_event(spe, speq, event, &sample);
}
@@ -440,6 +443,19 @@ static const struct midr_range common_ds_encoding_cpus[] = {
{},
};
+static void arm_spe__sample_flags(struct arm_spe_queue *speq)
+{
+ const struct arm_spe_record *record = &speq->decoder->record;
+
+ speq->flags = 0;
+ if (record->op & ARM_SPE_OP_BRANCH_ERET) {
+ speq->flags = PERF_IP_FLAG_BRANCH;
+
+ if (record->type & ARM_SPE_BRANCH_MISS)
+ speq->flags |= PERF_IP_FLAG_BRANCH_MISS;
+ }
+}
+
static void arm_spe__synth_data_source_common(const struct arm_spe_record *record,
union perf_mem_data_src *data_src)
{
@@ -622,6 +638,7 @@ static int arm_spe_sample(struct arm_spe_queue *speq)
u64 data_src;
int err;
+ arm_spe__sample_flags(speq);
data_src = arm_spe__synth_data_source(speq, record);
if (spe->sample_flc) {
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index f8742e6230a5..2744c54f404e 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -66,6 +66,7 @@ enum {
PERF_IP_FLAG_VMEXIT = 1ULL << 12,
PERF_IP_FLAG_INTR_DISABLE = 1ULL << 13,
PERF_IP_FLAG_INTR_TOGGLE = 1ULL << 14,
+ PERF_IP_FLAG_BRANCH_MISS = 1ULL << 15,
};
#define PERF_IP_FLAG_CHARS "bcrosyiABExghDt"
--
2.40.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v1 4/4] perf arm-spe: Update --itrace help text
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
` (2 preceding siblings ...)
2024-10-25 14:30 ` [PATCH v1 3/4] perf arm-spe: Correctly set sample flags Graham Woodward
@ 2024-10-25 14:30 ` Graham Woodward
2024-10-25 17:33 ` [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Leo Yan
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Graham Woodward @ 2024-10-25 14:30 UTC (permalink / raw)
To: acme, namhyung, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel
Cc: nd, Graham Woodward
The --itrace help now needs updating to reflect that
the --itrace=b argument sythesises branches as well
as branch misses.
Signed-off-by: Graham Woodward <graham.woodward@arm.com>
---
tools/perf/Documentation/itrace.txt | 2 +-
tools/perf/Documentation/perf-arm-spe.txt | 2 +-
tools/perf/util/auxtrace.h | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt
index 19cc179be9a7..40476b227f8d 100644
--- a/tools/perf/Documentation/itrace.txt
+++ b/tools/perf/Documentation/itrace.txt
@@ -1,6 +1,6 @@
i synthesize instructions events
y synthesize cycles events
- b synthesize branches events (branch misses for Arm SPE)
+ b synthesize branches events
c synthesize branches events (calls only)
r synthesize branches events (returns only)
x synthesize transactions events
diff --git a/tools/perf/Documentation/perf-arm-spe.txt b/tools/perf/Documentation/perf-arm-spe.txt
index 0a3eda482307..de2b0b479249 100644
--- a/tools/perf/Documentation/perf-arm-spe.txt
+++ b/tools/perf/Documentation/perf-arm-spe.txt
@@ -187,7 +187,7 @@ groups:
7 llc-access
2 tlb-miss
1K tlb-access
- 36 branch-miss
+ 36 branch
0 remote-access
900 memory
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index a1895a4f530b..dddaf4f3ffed 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -75,7 +75,6 @@ enum itrace_period_type {
* (not fully accurate, since CYC packets are only emitted
* together with other events, such as branches)
* @branches: whether to synthesize 'branches' events
- * (branch misses only for Arm SPE)
* @transactions: whether to synthesize events for transactions
* @ptwrites: whether to synthesize events for ptwrites
* @pwr_events: whether to synthesize power events
@@ -650,7 +649,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
#define ITRACE_HELP \
" i[period]: synthesize instructions events\n" \
" y[period]: synthesize cycles events (same period as i)\n" \
-" b: synthesize branches events (branch misses for Arm SPE)\n" \
+" b: synthesize branches events\n" \
" c: synthesize branches events (calls only)\n" \
" r: synthesize branches events (returns only)\n" \
" x: synthesize transactions events\n" \
--
2.40.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
` (3 preceding siblings ...)
2024-10-25 14:30 ` [PATCH v1 4/4] perf arm-spe: Update --itrace help text Graham Woodward
@ 2024-10-25 17:33 ` Leo Yan
2024-10-28 8:34 ` James Clark
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Leo Yan @ 2024-10-25 17:33 UTC (permalink / raw)
To: Graham Woodward
Cc: acme, namhyung, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel, nd
On Fri, Oct 25, 2024 at 03:30:05PM +0100, Graham Woodward wrote:
>
> Currently the --itrace=b will only show branch-misses but this change
> allows perf to synthesize branches as well.
>
> The change also incorporates the ability to display the target
> addresses when specifying the addr field if the instruction is a branch.
Tested for this series:
# perf record -e arm_spe_0/branch_filter=1,load_filter=1/u \
-- ./false_sharing.exe 1
# perf script --itrace=i10ib -F,+addr,+flags
false_sharing.e 880532 [005] 1852579.389533: 1 branch: jmp ffff91beb224 ffff91beb220 __GI___tunables_init+0x40 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389538: 1 branch: jmp ffff91bec318 ffff91bec314 _dl_next_ld_env_entry+0x24 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389620: 1 branch: jmp ffff91be0f14 ffff91be0f10 _dl_new_object+0x168 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389802: 1 branch: jmp ffff91be2cf0 ffff91be2cec _dl_map_object_deps+0x3f4 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389802: 10 instructions: jmp ffff91be2cf0 ffff91be2cec _dl_map_object_deps+0x3f4 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389824: 1 branch: br miss ffff91bee4e4 ffff91bee4e0 strcmp+0xa0 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389849: 1 branch: jmp ffff91be1868 ffff91be1880 _dl_relocate_object+0x4a8 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389858: 1 branch: jmp ffff91be1868 ffff91be1880 _dl_relocate_object+0x4a8 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389861: 1 branch: jmp ffff91be1c20 ffff91be1bcc _dl_relocate_object+0x7f4 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389875: 10 instructions: 0 ffff91bdfe38 _dl_lookup_symbol_x+0x58 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389876: 1 branch: jmp ffff91bdf3a8 ffff91bdf434 do_lookup_x+0x114 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389879: 1 branch: jmp ffff91be18ec ffff91be18e8 _dl_relocate_object+0x510 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389886: 1 branch: jmp ffff91bee440 ffff91bdf2dc check_match+0x154 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389890: 1 branch: jmp ffff91bdfed4 ffff91bdfed0 _dl_lookup_symbol_x+0xf0 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389893: 10 instructions: 0 ffff91be1974 _dl_relocate_object+0x59c (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389894: 1 branch: jmp ffff91bdf3f4 ffff91bdf3f0 do_lookup_x+0xd0 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
false_sharing.e 880532 [005] 1852579.389906: 1 branch: jmp ffff91bdfea4 ffff91bdfe90 _dl_lookup_symbol_x+0xb0 (/usr/lib/aarch64-linux-gnu/ld-2.31.so)
# perf test "Check Arm SPE"
114: Check Arm SPE trace data recording and synthesized samples : Ok
115: Check Arm SPE doesn't hang when there are forks : Ok
Tested-by: Leo Yan <leo.yan@arm.com>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
` (4 preceding siblings ...)
2024-10-25 17:33 ` [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Leo Yan
@ 2024-10-28 8:34 ` James Clark
2024-10-28 16:40 ` Namhyung Kim
2024-10-30 21:30 ` Namhyung Kim
7 siblings, 0 replies; 12+ messages in thread
From: James Clark @ 2024-10-28 8:34 UTC (permalink / raw)
To: Graham Woodward
Cc: nd, acme, namhyung, mark.rutland, jolsa, irogers, mike.leach,
leo.yan, linux-perf-users, linux-kernel, linux-arm-kernel
On 25/10/2024 3:30 pm, Graham Woodward wrote:
> Currently the --itrace=b will only show branch-misses but this change
> allows perf to synthesize branches as well.
>
> The change also incorporates the ability to display the target
> addresses when specifying the addr field if the instruction is a branch.
>
> Graham Woodward (4):
> perf arm-spe: Set sample.addr to target address for instruction sample
> perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches
> perf arm-spe: Correctly set sample flags
> perf arm-spe: Update --itrace help text
>
> tools/perf/Documentation/itrace.txt | 2 +-
> tools/perf/Documentation/perf-arm-spe.txt | 2 +-
> tools/perf/builtin-script.c | 1 +
> tools/perf/util/arm-spe.c | 31 ++++++++++++++++++-----
> tools/perf/util/auxtrace.h | 3 +--
> tools/perf/util/event.h | 1 +
> 6 files changed, 29 insertions(+), 11 deletions(-)
>
Don't forget to pickup the review tags from the previous versions. If
you use the b4 tool it does it automatically:
Reviewed-by: James Clark <james.clark@linaro.org>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
` (5 preceding siblings ...)
2024-10-28 8:34 ` James Clark
@ 2024-10-28 16:40 ` Namhyung Kim
2024-10-29 17:03 ` Leo Yan
2024-10-30 21:30 ` Namhyung Kim
7 siblings, 1 reply; 12+ messages in thread
From: Namhyung Kim @ 2024-10-28 16:40 UTC (permalink / raw)
To: Graham Woodward
Cc: acme, mark.rutland, jolsa, irogers, james.clark, mike.leach,
leo.yan, linux-perf-users, linux-kernel, linux-arm-kernel, nd
Hello,
On Fri, Oct 25, 2024 at 03:30:05PM +0100, Graham Woodward wrote:
> Currently the --itrace=b will only show branch-misses but this change
> allows perf to synthesize branches as well.
>
> The change also incorporates the ability to display the target
> addresses when specifying the addr field if the instruction is a branch.
>
> Graham Woodward (4):
> perf arm-spe: Set sample.addr to target address for instruction sample
> perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches
> perf arm-spe: Correctly set sample flags
> perf arm-spe: Update --itrace help text
It doesn't apply to perf-tools-next cleanly. Can you please rebase?
Thanks,
Namhyung
>
> tools/perf/Documentation/itrace.txt | 2 +-
> tools/perf/Documentation/perf-arm-spe.txt | 2 +-
> tools/perf/builtin-script.c | 1 +
> tools/perf/util/arm-spe.c | 31 ++++++++++++++++++-----
> tools/perf/util/auxtrace.h | 3 +--
> tools/perf/util/event.h | 1 +
> 6 files changed, 29 insertions(+), 11 deletions(-)
>
> --
> 2.40.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch
2024-10-28 16:40 ` Namhyung Kim
@ 2024-10-29 17:03 ` Leo Yan
2024-10-29 23:09 ` Namhyung Kim
0 siblings, 1 reply; 12+ messages in thread
From: Leo Yan @ 2024-10-29 17:03 UTC (permalink / raw)
To: Namhyung Kim
Cc: Graham Woodward, acme, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel, nd
Hi Namhyung,
On Mon, Oct 28, 2024 at 09:40:21AM -0700, Namhyung Kim wrote:
>
> Hello,
>
> On Fri, Oct 25, 2024 at 03:30:05PM +0100, Graham Woodward wrote:
> > Currently the --itrace=b will only show branch-misses but this change
> > allows perf to synthesize branches as well.
> >
> > The change also incorporates the ability to display the target
> > addresses when specifying the addr field if the instruction is a branch.
> >
> > Graham Woodward (4):
> > perf arm-spe: Set sample.addr to target address for instruction sample
> > perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches
> > perf arm-spe: Correctly set sample flags
> > perf arm-spe: Update --itrace help text
>
> It doesn't apply to perf-tools-next cleanly. Can you please rebase?
I confirmed this series can apply cleanly on the branch [1] with the
latest commit 150dab31d560 ("perf disasm: Fix not cleaning up
disasm_line in symbol__disassemble_raw()"):
[1] https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
branch: perf-tools-next
If you are suggesting for the branch:
[2] https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git
branch: perf-tools
You can see it misses some Arm SPE patches which have been picked up
in the repo [1].
Please kindly suggest what is right thing to do.
Thanks,
Leo
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch
2024-10-29 17:03 ` Leo Yan
@ 2024-10-29 23:09 ` Namhyung Kim
2024-10-30 9:33 ` Leo Yan
0 siblings, 1 reply; 12+ messages in thread
From: Namhyung Kim @ 2024-10-29 23:09 UTC (permalink / raw)
To: Leo Yan
Cc: Graham Woodward, acme, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel, nd
Hi Leo,
On Tue, Oct 29, 2024 at 05:03:46PM +0000, Leo Yan wrote:
> Hi Namhyung,
>
> On Mon, Oct 28, 2024 at 09:40:21AM -0700, Namhyung Kim wrote:
> >
> > Hello,
> >
> > On Fri, Oct 25, 2024 at 03:30:05PM +0100, Graham Woodward wrote:
> > > Currently the --itrace=b will only show branch-misses but this change
> > > allows perf to synthesize branches as well.
> > >
> > > The change also incorporates the ability to display the target
> > > addresses when specifying the addr field if the instruction is a branch.
> > >
> > > Graham Woodward (4):
> > > perf arm-spe: Set sample.addr to target address for instruction sample
> > > perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches
> > > perf arm-spe: Correctly set sample flags
> > > perf arm-spe: Update --itrace help text
> >
> > It doesn't apply to perf-tools-next cleanly. Can you please rebase?
>
> I confirmed this series can apply cleanly on the branch [1] with the
> latest commit 150dab31d560 ("perf disasm: Fix not cleaning up
> disasm_line in symbol__disassemble_raw()"):
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
> branch: perf-tools-next
>
> If you are suggesting for the branch:
>
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git
> branch: perf-tools
>
> You can see it misses some Arm SPE patches which have been picked up
> in the repo [1].
>
> Please kindly suggest what is right thing to do.
Sorry, my bad. It works ok. I'll add it to tmp.perf-tools-next branch
and run some tests.
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch
2024-10-29 23:09 ` Namhyung Kim
@ 2024-10-30 9:33 ` Leo Yan
0 siblings, 0 replies; 12+ messages in thread
From: Leo Yan @ 2024-10-30 9:33 UTC (permalink / raw)
To: Namhyung Kim
Cc: Graham Woodward, acme, mark.rutland, jolsa, irogers, james.clark,
mike.leach, leo.yan, linux-perf-users, linux-kernel,
linux-arm-kernel, nd
Hi Namhyung,
On Tue, Oct 29, 2024 at 04:09:46PM -0700, Namhyung Kim wrote:
[...]
> > Please kindly suggest what is right thing to do.
>
> Sorry, my bad. It works ok. I'll add it to tmp.perf-tools-next branch
> and run some tests.
Thanks for confirmation!
Leo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch
2024-10-25 14:30 [PATCH v1 0/4] perf arm-spe: Allow synthesizing of branch Graham Woodward
` (6 preceding siblings ...)
2024-10-28 16:40 ` Namhyung Kim
@ 2024-10-30 21:30 ` Namhyung Kim
7 siblings, 0 replies; 12+ messages in thread
From: Namhyung Kim @ 2024-10-30 21:30 UTC (permalink / raw)
To: acme, mark.rutland, jolsa, irogers, james.clark, mike.leach,
leo.yan, linux-perf-users, linux-kernel, linux-arm-kernel,
Graham Woodward
Cc: nd
On Fri, 25 Oct 2024 15:30:05 +0100, Graham Woodward wrote:
> Currently the --itrace=b will only show branch-misses but this change
> allows perf to synthesize branches as well.
>
> The change also incorporates the ability to display the target
> addresses when specifying the addr field if the instruction is a branch.
>
> Graham Woodward (4):
> perf arm-spe: Set sample.addr to target address for instruction sample
> perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches
> perf arm-spe: Correctly set sample flags
> perf arm-spe: Update --itrace help text
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 12+ messages in thread