Skip to contentSkip to conversation

: Re: A couple of perf questions

External Arnaldo Carvalho de Melo 1 participant 1 message Oct 17, 2022 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 6 lines · Jesus Maldonado

Hi Arnaldo,

Thanks for getting back.

+ [email protected] (as suggested)

Quoted 7 lines

For the first part, about perf record. My intention is to record both command and some list of pids. e.g.
/perf record -p <1234,5678> myExecutable/

So, the final result should include pids 1234, 5678, *and* whatever is the pid for myExecutable once run. But what happens is that it can only include 1234 abd 5678.

Is there an alias or option that can be used so --pid considers as well <command>'s pid.

That's not available right now but should be doable.

Quoted 6 lines

2)

Quoted 2 lines

You mean for AMD or Like some feature available on AMD systems, which one?

I meant on AMD CPUs. Something that is similar to Intel PT for AMD CPUs.

Take a look at this recent patch:

https://lwn.net/Articles/904482/

- Arnaldo

Quoted 42 lines

Thanks

Jesus

Quoted 37 lines · Arnaldo Carvalho de Melo

Em Wed, Oct 12, 2022 at 11:25:48AM -0700, Jesus Maldonado escreveu:

Quoted 4 lines

Hi Arnaldo,

Saw your awesome PR for perf tools changes in 6.1. and thought you are the right person to ask these 2 questions.

Please next time [email protected], you may end up getting a better and/or faster response there :-)

Quoted 6 lines

1) Does perf record allow for recording of a new process + system processes? e.g. A benchmark tool that runs for a few seconds but interacts with some other processes in the system.
Ideally something like "filter by process(cmd) name" + new process specified in command line.
I can think of some workarounds, but wanted to validate.

perf record can record many things, and some of those things have different filter mechanisms, for instance, you can use --filter right after a tracepoint event to add a filter to that specific event, etc.

Intel PT also has ways for setting up filters.

See 'perf record --help' with the perf man pages installed, look for --filter.

One other way would be to have multiple perf record sessions and then combine the results, but that would require some more work, perhaps a brute force with what is available would be to do a perf script on the multiple perf.data files then concatenate them together and then do a sort by the timestamp.

May be ok for some specific workloads and events, but not for others.

Quoted 2 lines

2) Do you know of something that allows for high resolution branch tracing (say call, return) other than Intel PTs? Like for AMD?

You mean for AMD or Like some feature available on AMD systems, which one?

- Arnaldo