* [PATCH 1/3] perf script: Fix --max-blocks man page description
@ 2019-07-11 18:19 Andi Kleen
2019-07-11 18:19 ` [PATCH 2/3] perf script: Fix off by one in brstackinsn IPC computation Andi Kleen
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Andi Kleen @ 2019-07-11 18:19 UTC (permalink / raw)
To: acme; +Cc: jolsa, linux-kernel, linux-perf-users, Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
The --max-blocks description was using the old name brstackasm.
Use brstackinsn instead.
Signed-off-by: Andi Kleen <ak@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 d4e2e18a5881..042b9e5dcc32 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -384,7 +384,7 @@ include::itrace.txt[]
perf script --time 0%-10%,30%-40%
--max-blocks::
- Set the maximum number of program blocks to print with brstackasm for
+ Set the maximum number of program blocks to print with brstackinsn for
each sample.
--reltime::
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] perf script: Fix off by one in brstackinsn IPC computation
2019-07-11 18:19 [PATCH 1/3] perf script: Fix --max-blocks man page description Andi Kleen
@ 2019-07-11 18:19 ` Andi Kleen
2019-07-16 18:44 ` Arnaldo Carvalho de Melo
2019-07-11 18:19 ` [PATCH 3/3] perf script: Improve man page description of metrics Andi Kleen
2019-07-16 18:43 ` [PATCH 1/3] perf script: Fix --max-blocks man page description Arnaldo Carvalho de Melo
2 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2019-07-11 18:19 UTC (permalink / raw)
To: acme; +Cc: jolsa, linux-kernel, linux-perf-users, Andi Kleen, Denis Bakhvalov
From: Andi Kleen <ak@linux.intel.com>
When we hit the end of a program block, need to count the last instruction
too for the IPC computation. This caused large errors for small blocks.
% perf script -b ls / > /dev/null
Before:
% perf script -F +brstackinsn --xed
...
00007f94c9ac70d8 jz 0x7f94c9ac70e3 # PRED 3 cycles [36] 4.33 IPC
00007f94c9ac70e3 testb $0x20, 0x31d(%rbx)
00007f94c9ac70ea jnz 0x7f94c9ac70b0
00007f94c9ac70ec testb $0x8, 0x205ad(%rip)
00007f94c9ac70f3 jz 0x7f94c9ac6ff0 # PRED 1 cycles [37] 3.00 IPC
After:
% perf script -F +brstackinsn --xed
...
00007f94c9ac70d8 jz 0x7f94c9ac70e3 # PRED 3 cycles [15] 4.67 IPC
00007f94c9ac70e3 testb $0x20, 0x31d(%rbx)
00007f94c9ac70ea jnz 0x7f94c9ac70b0
00007f94c9ac70ec testb $0x8, 0x205ad(%rip)
00007f94c9ac70f3 jz 0x7f94c9ac6ff0 # PRED 1 cycles [16] 4.00 IPC
Suggested-by: Denis Bakhvalov <denis.bakhvalov@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/builtin-script.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 2f6232f1bfdc..9a63cb3442a9 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1059,7 +1059,7 @@ static int perf_sample__fprintf_brstackinsn(struct perf_sample *sample,
printed += ip__fprintf_sym(ip, thread, x.cpumode, x.cpu, &lastsym, attr, fp);
if (ip == end) {
- printed += ip__fprintf_jump(ip, &br->entries[i], &x, buffer + off, len - off, insn, fp,
+ printed += ip__fprintf_jump(ip, &br->entries[i], &x, buffer + off, len - off, ++insn, fp,
&total_cycles);
if (PRINT_FIELD(SRCCODE))
printed += print_srccode(thread, x.cpumode, ip);
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] perf script: Improve man page description of metrics
2019-07-11 18:19 [PATCH 1/3] perf script: Fix --max-blocks man page description Andi Kleen
2019-07-11 18:19 ` [PATCH 2/3] perf script: Fix off by one in brstackinsn IPC computation Andi Kleen
@ 2019-07-11 18:19 ` Andi Kleen
2019-07-16 18:45 ` Arnaldo Carvalho de Melo
2019-07-16 18:43 ` [PATCH 1/3] perf script: Fix --max-blocks man page description Arnaldo Carvalho de Melo
2 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2019-07-11 18:19 UTC (permalink / raw)
To: acme; +Cc: jolsa, linux-kernel, linux-perf-users, Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
Clarify that a metric is based on events, not referring
to itself. Also some improvements with the sentences.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/Documentation/perf-script.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index 042b9e5dcc32..caaab28f8400 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -228,11 +228,11 @@ OPTIONS
With the metric option perf script can compute metrics for
sampling periods, similar to perf stat. This requires
- specifying a group with multiple metrics with the :S option
+ specifying a group with multiple events defining metrics with the :S option
for perf record. perf will sample on the first event, and
- compute metrics for all the events in the group. Please note
+ print computed metrics for all the events in the group. Please note
that the metric computed is averaged over the whole sampling
- period, not just for the sample point.
+ period (since the last sample), not just for the sample point.
For sample events it's possible to display misc field with -F +misc option,
following letters are displayed for each bit:
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] perf script: Fix --max-blocks man page description
2019-07-11 18:19 [PATCH 1/3] perf script: Fix --max-blocks man page description Andi Kleen
2019-07-11 18:19 ` [PATCH 2/3] perf script: Fix off by one in brstackinsn IPC computation Andi Kleen
2019-07-11 18:19 ` [PATCH 3/3] perf script: Improve man page description of metrics Andi Kleen
@ 2019-07-16 18:43 ` Arnaldo Carvalho de Melo
2 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-07-16 18:43 UTC (permalink / raw)
To: Andi Kleen; +Cc: jolsa, linux-kernel, linux-perf-users, Andi Kleen
Em Thu, Jul 11, 2019 at 11:19:20AM -0700, Andi Kleen escreveu:
> From: Andi Kleen <ak@linux.intel.com>
>
> The --max-blocks description was using the old name brstackasm.
> Use brstackinsn instead.
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] perf script: Fix off by one in brstackinsn IPC computation
2019-07-11 18:19 ` [PATCH 2/3] perf script: Fix off by one in brstackinsn IPC computation Andi Kleen
@ 2019-07-16 18:44 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-07-16 18:44 UTC (permalink / raw)
To: Andi Kleen
Cc: jolsa, linux-kernel, linux-perf-users, Andi Kleen, Denis Bakhvalov
Em Thu, Jul 11, 2019 at 11:19:21AM -0700, Andi Kleen escreveu:
> From: Andi Kleen <ak@linux.intel.com>
>
> When we hit the end of a program block, need to count the last instruction
> too for the IPC computation. This caused large errors for small blocks.
>
> % perf script -b ls / > /dev/null
>
> Before:
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] perf script: Improve man page description of metrics
2019-07-11 18:19 ` [PATCH 3/3] perf script: Improve man page description of metrics Andi Kleen
@ 2019-07-16 18:45 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-07-16 18:45 UTC (permalink / raw)
To: Andi Kleen; +Cc: jolsa, linux-kernel, linux-perf-users, Andi Kleen
Em Thu, Jul 11, 2019 at 11:19:22AM -0700, Andi Kleen escreveu:
> From: Andi Kleen <ak@linux.intel.com>
>
> Clarify that a metric is based on events, not referring
> to itself. Also some improvements with the sentences.
Thanks, applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-16 18:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 18:19 [PATCH 1/3] perf script: Fix --max-blocks man page description Andi Kleen
2019-07-11 18:19 ` [PATCH 2/3] perf script: Fix off by one in brstackinsn IPC computation Andi Kleen
2019-07-16 18:44 ` Arnaldo Carvalho de Melo
2019-07-11 18:19 ` [PATCH 3/3] perf script: Improve man page description of metrics Andi Kleen
2019-07-16 18:45 ` Arnaldo Carvalho de Melo
2019-07-16 18:43 ` [PATCH 1/3] perf script: Fix --max-blocks man page description Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).