* [PATCH V4 1/2] perf event: Fix the Retire Latency sample_type check failure
@ 2023-02-06 16:20 kan.liang
2023-02-06 16:21 ` [PATCH V4 2/2] perf script: Fix missing Retire Latency fields option documentation kan.liang
0 siblings, 1 reply; 2+ messages in thread
From: kan.liang @ 2023-02-06 16:20 UTC (permalink / raw)
To: acme, peterz, mingo, linux-kernel; +Cc: ak, eranian, irogers, Kan Liang
From: Kan Liang <kan.liang@linux.intel.com>
perf test -v "x86 sample parsing"
74: x86 Sample parsing :
--- start ---
test child forked, pid 72526
Samples differ at 'retire_lat'
parsing failed for sample_type 0x1000000
test child finished with -1
---- end ----
x86 Sample parsing: FAILED!
In the arch_perf_synthesize_sample_weight(), the retire_lat is
mistakenly missed.
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---
tools/perf/arch/x86/util/event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/x86/util/event.c b/tools/perf/arch/x86/util/event.c
index 37b3feb53e8d..e4288d09f3a0 100644
--- a/tools/perf/arch/x86/util/event.c
+++ b/tools/perf/arch/x86/util/event.c
@@ -101,6 +101,7 @@ void arch_perf_synthesize_sample_weight(const struct perf_sample *data,
if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
*array &= 0xffffffff;
*array |= ((u64)data->ins_lat << 32);
+ *array |= ((u64)data->retire_lat << 48);
}
}
--
2.35.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH V4 2/2] perf script: Fix missing Retire Latency fields option documentation
2023-02-06 16:20 [PATCH V4 1/2] perf event: Fix the Retire Latency sample_type check failure kan.liang
@ 2023-02-06 16:21 ` kan.liang
0 siblings, 0 replies; 2+ messages in thread
From: kan.liang @ 2023-02-06 16:21 UTC (permalink / raw)
To: acme, peterz, mingo, linux-kernel; +Cc: ak, eranian, irogers, Kan Liang
From: Kan Liang <kan.liang@linux.intel.com>
The 'perf script' documentation is missing the fields option for Retire
Latency. Add it.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---
tools/perf/Documentation/perf-script.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index a2ebadc9d948..777a0d8ba7d1 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -134,7 +134,7 @@ OPTIONS
srcline, period, iregs, uregs, brstack, brstacksym, flags, bpf-output,
brstackinsn, brstackinsnlen, brstackoff, callindent, insn, insnlen, synth,
phys_addr, metric, misc, srccode, ipc, data_page_size, code_page_size, ins_lat,
- machine_pid, vcpu, cgroup.
+ machine_pid, vcpu, cgroup, retire_lat.
Field list can be prepended with the type, trace, sw or hw,
to indicate to which event type the field list applies.
e.g., -F sw:comm,tid,time,ip,sym and -F trace:time,cpu,trace
--
2.35.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-06 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 16:20 [PATCH V4 1/2] perf event: Fix the Retire Latency sample_type check failure kan.liang
2023-02-06 16:21 ` [PATCH V4 2/2] perf script: Fix missing Retire Latency fields option documentation kan.liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®