* perf script: perf script hangs forever in linux-next
@ 2025-02-13 11:06 Thomas Richter
2025-02-14 2:13 ` Namhyung Kim
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Richter @ 2025-02-13 11:06 UTC (permalink / raw)
To: linux-perf-use., ashelat, Michael Petlan
Command 'perf script report flamegraph' hangs for ever as can
be seen with these commands:
# perf record -- dd if=/dev/zero of=/dev/null bs=1M count=10K > /dev/null
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB, 10 GiB) copied, 0.387818 s, 27.7 GB/s
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.074 MB perf.data (1520 samples) ]
#
# time perf script report flamegraph
^C
real 0m53.506s
user 0m0.017s
sys 0m0.012s
#
Control-C interrupt is needed to terminate the command.
If I revert commit 23e0a63c6dd3f69cb7ee18411e5f6857cca55b30
Author: Anubhav Shelat <ashelat@redhat.com>
Date: Fri Jan 31 09:57:05 2025 -0500
perf script: force stdin for flamegraph in live mode
then everythings works fine again:
# PERF_EXEC_PATH=/root/mirror-linux-next/tools/perf ./perf script report flamegraph
# dumping data to flamegraph.html
#
Can you fix this so above invocation works again or revert that patch?
Thanks a lot
~
~
~
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perf script: perf script hangs forever in linux-next
2025-02-13 11:06 perf script: perf script hangs forever in linux-next Thomas Richter
@ 2025-02-14 2:13 ` Namhyung Kim
2025-02-14 10:21 ` Thomas Richter
0 siblings, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2025-02-14 2:13 UTC (permalink / raw)
To: Thomas Richter; +Cc: linux-perf-use., ashelat, Michael Petlan
On Thu, Feb 13, 2025 at 12:06:41PM +0100, Thomas Richter wrote:
> Command 'perf script report flamegraph' hangs for ever as can
> be seen with these commands:
>
> # perf record -- dd if=/dev/zero of=/dev/null bs=1M count=10K > /dev/null
> 10240+0 records in
> 10240+0 records out
> 10737418240 bytes (11 GB, 10 GiB) copied, 0.387818 s, 27.7 GB/s
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.074 MB perf.data (1520 samples) ]
> #
> # time perf script report flamegraph
> ^C
>
> real 0m53.506s
> user 0m0.017s
> sys 0m0.012s
> #
>
> Control-C interrupt is needed to terminate the command.
>
> If I revert commit 23e0a63c6dd3f69cb7ee18411e5f6857cca55b30
> Author: Anubhav Shelat <ashelat@redhat.com>
> Date: Fri Jan 31 09:57:05 2025 -0500
>
> perf script: force stdin for flamegraph in live mode
>
> then everythings works fine again:
>
> # PERF_EXEC_PATH=/root/mirror-linux-next/tools/perf ./perf script report flamegraph
> # dumping data to flamegraph.html
> #
>
> Can you fix this so above invocation works again or revert that patch?
Hmm.. it seems the patch fixes one problem but create another. :(
IIUC the report script should be invoked with "-i -" already, that means
flamegraph-report should see it instead of adding its own. I think it's
because of the "--" before "$@" so that it cannot pass the input file to
perf script and give it to flamegraph.py instead.
Can you please test if the below fixes the problem both for your use
case and the live mode (perf script flamegraph -a -F 99 sleep 1)?
Thanks,
Namhyung
---8<---
diff --git a/tools/perf/scripts/python/bin/flamegraph-report b/tools/perf/scripts/python/bin/flamegraph-report
index 83d5738c75ca4726..453a6918afbe8f72 100755
--- a/tools/perf/scripts/python/bin/flamegraph-report
+++ b/tools/perf/scripts/python/bin/flamegraph-report
@@ -1,3 +1,3 @@
#!/bin/bash
# description: create flame graphs
-perf script -s "$PERF_EXEC_PATH"/scripts/python/flamegraph.py -i - -- "$@"
+perf script -s "$PERF_EXEC_PATH"/scripts/python/flamegraph.py "$@"
---8<---
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: perf script: perf script hangs forever in linux-next
2025-02-14 2:13 ` Namhyung Kim
@ 2025-02-14 10:21 ` Thomas Richter
2025-02-19 10:13 ` PING " Thomas Richter
2025-02-19 20:34 ` Namhyung Kim
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Richter @ 2025-02-14 10:21 UTC (permalink / raw)
To: Namhyung Kim; +Cc: linux-perf-use., ashelat, Michael Petlan
On 2/14/25 03:13, Namhyung Kim wrote:
> perf script flamegraph -a -F 99 sleep 1
Thanks Namhyung,
i have tested your patch and both invocations of the perf script command
work again as can be seen here:
# perf script flamegraph -a -- sleep 1
dumping data to flamegraph.html
# perf record -- dd if=/dev/zero of=/dev/null bs=1M count=10K > /dev/null
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB, 10 GiB) copied, 0.294051 s, 36.5 GB/s
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.060 MB perf.data (1177 samples) ]
# perf script report flamegraph
dumping data to flamegraph.html
#
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
^ permalink raw reply [flat|nested] 5+ messages in thread
* PING perf script: perf script hangs forever in linux-next
2025-02-14 10:21 ` Thomas Richter
@ 2025-02-19 10:13 ` Thomas Richter
2025-02-19 20:34 ` Namhyung Kim
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Richter @ 2025-02-19 10:13 UTC (permalink / raw)
To: Namhyung Kim, linux-perf-use.; +Cc: ashelat, Michael Petlan
Hi all,
just a friendly ping as reminder that this issue still exist...
Thanks for your help.
-------- Forwarded Message --------
Subject: Re: perf script: perf script hangs forever in linux-next
Date: Fri, 14 Feb 2025 11:21:56 +0100
From: Thomas Richter <tmricht@linux.ibm.com>
Organization: IBM
To: Namhyung Kim <namhyung@kernel.org>
CC: linux-perf-use. <linux-perf-users@vger.kernel.org>, ashelat@redhat.com, Michael Petlan <mpetlan@redhat.com>
On 2/14/25 03:13, Namhyung Kim wrote:
> perf script flamegraph -a -F 99 sleep 1
Thanks Namhyung,
i have tested your patch and both invocations of the perf script command
work again as can be seen here:
# perf script flamegraph -a -- sleep 1
dumping data to flamegraph.html
# perf record -- dd if=/dev/zero of=/dev/null bs=1M count=10K > /dev/null
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB, 10 GiB) copied, 0.294051 s, 36.5 GB/s
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.060 MB perf.data (1177 samples) ]
# perf script report flamegraph
dumping data to flamegraph.html
#
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perf script: perf script hangs forever in linux-next
2025-02-14 10:21 ` Thomas Richter
2025-02-19 10:13 ` PING " Thomas Richter
@ 2025-02-19 20:34 ` Namhyung Kim
1 sibling, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2025-02-19 20:34 UTC (permalink / raw)
To: Thomas Richter; +Cc: linux-perf-use., ashelat, Michael Petlan
On Fri, Feb 14, 2025 at 11:21:56AM +0100, Thomas Richter wrote:
> On 2/14/25 03:13, Namhyung Kim wrote:
> > perf script flamegraph -a -F 99 sleep 1
>
> Thanks Namhyung,
>
> i have tested your patch and both invocations of the perf script command
> work again as can be seen here:
>
> # perf script flamegraph -a -- sleep 1
> dumping data to flamegraph.html
> # perf record -- dd if=/dev/zero of=/dev/null bs=1M count=10K > /dev/null
> 10240+0 records in
> 10240+0 records out
> 10737418240 bytes (11 GB, 10 GiB) copied, 0.294051 s, 36.5 GB/s
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.060 MB perf.data (1177 samples) ]
> # perf script report flamegraph
> dumping data to flamegraph.html
> #
>
> Tested-by: Thomas Richter <tmricht@linux.ibm.com>
Applied to perf-tools-next, thanks!
Best Regards,
Namhyung
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-19 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 11:06 perf script: perf script hangs forever in linux-next Thomas Richter
2025-02-14 2:13 ` Namhyung Kim
2025-02-14 10:21 ` Thomas Richter
2025-02-19 10:13 ` PING " Thomas Richter
2025-02-19 20:34 ` Namhyung Kim
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).