* toplev would hang forever when analyzing a program with PID
@ 2017-03-26 14:07 Yijie Shen
2017-03-27 20:35 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Yijie Shen @ 2017-03-26 14:07 UTC (permalink / raw)
To: linux-perf-users
Hi all,
I'm planning to do some exploration on my program performance using
toplev, but faced with these problems:
when I called toplev.py -l1 ls, it stoped gracefully with the following output:
Will measure complete system.
Using level 1.
Nodes Backend_Bound Frontend_Bound have errata HSD135
perf stat -x\; -e
'{cpu/event=0x3c,umask=0x0,any=1/,cpu/event=0xe,umask=0x1/,cpu/event=0x9c,umask=0x1/,cpu/event=0xd,umask=0x3,any=1,cmask=1/,cpu/event=0xc2,umask=0x2/}'
-A -a ls
S0-C0 FE Frontend_Bound: 51.94 % Slots
[100.00%] This category represents slots fraction where the
processor's Frontend undersupplies its Backend...
S0-C0 BE Backend_Bound: 24.73 % Slots
[100.00%] This category represents slots fraction where no uops are
being delivered due to a lack of required resources for
accepting new uops in the Backend...
S0-C1 FE Frontend_Bound: 37.89 % Slots
[100.00%]S0-C1 BE Backend_Bound: 33.91 % Slots
[100.00%]S1-C4 FE Frontend_Bound: 82.60 %
Slots [100.00%]S1-C4 RET Retiring:
88.53 % Slots [100.00%]
but toplev would hang forever when it was called to analyze a program using pid:
toplev.py -l1 -- --pid 29297
Will measure complete system.
Using level 1.
Nodes Backend_Bound Frontend_Bound have errata HSD135
perf stat -x\; -e
'{cpu/event=0x3c,umask=0x0,any=1/,cpu/event=0xe,umask=0x1/,cpu/event=0x9c,umask=0x1/,cpu/event=0xd,umask=0x3,any=1,cmask=1/,cpu/event=0xc2,umask=0x2/}'
-A -a --pid 29297
this would hang forever even if the process with such pid end, this
happens whatever the pid is pointing at is, a Java process or a Linux
tool such as top.
Am I doing something wrong? What does the right command look like to
analyze a program using PID?
Thanks in advance.
Yours,
Yijie
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: toplev would hang forever when analyzing a program with PID
2017-03-26 14:07 toplev would hang forever when analyzing a program with PID Yijie Shen
@ 2017-03-27 20:35 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2017-03-27 20:35 UTC (permalink / raw)
To: Yijie Shen; +Cc: linux-perf-users
Yijie Shen <henry.yijieshen@gmail.com> writes:
>
>
> this would hang forever even if the process with such pid end, this
> happens whatever the pid is pointing at is, a Java process or a Linux
> tool such as top.
>
>
> Am I doing something wrong? What does the right command look like to
> analyze a program using PID?
You're using SMT, so toplev has to enable global monitoring (-a),
but that does not interact well with --pid in perf.
That's more a perf bug .
It would work in single thread mode or without SMT, or using intervals.
toplev should probably print a warning in this case.
-Andi
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-27 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-26 14:07 toplev would hang forever when analyzing a program with PID Yijie Shen
2017-03-27 20:35 ` Andi Kleen
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).