Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: View combined results of multiple recordings. #464

Open
GitMensch opened this issue Jan 26, 2023 · 4 comments
Open

FR: View combined results of multiple recordings. #464

GitMensch opened this issue Jan 26, 2023 · 4 comments

Comments

@GitMensch
Copy link
Contributor

Is your feature request related to a problem? Please describe.
System wide profiling on an active machine gives lots of data, which is commonly not useful and may result in lost chunks and big files. Limiting this to a specific users helps, but on production machine the system user of an interesting program is not unlikely to be "all the same" for a lot of processes.
To work around the recording issue, it is most easy to run multiple processes, each with perf record, which results in multiple smaller files. ... But how to view them combined afterwards?

File->Open only allows to open a single file and - I guess - just cat ing multiple files together won't work for neither perf.data.* nor *.perfparser.

Describe the solution you'd like
Option to open multiple recordings at once (all in the same session, similar as it i done in a system/user wide recording) via File->Open, and possibly a File->Add option to post-add more recordings after the initial file(s) are opened.

Describe alternatives you've considered
Uer-wide recording, but that will commonly record too much; wrapping multiple runs in a single shell script with async starts, but that needs to be written and may not be applicable, either.

@milianw
Copy link
Member

milianw commented Feb 8, 2023

here's an easy alternative that I used in the past:

write a shell script or similar "launcher" that starts all the processes you want to profile, then profile that. perf will profile subprocesses, so you'll get all apps started there in one file

anything else is super hard as I believe that time stamps are not equivalent between perf data files (potentially, would have to check). anyhow definitely not a use case I would work on myself - patches welcome as always

@milianw
Copy link
Member

milianw commented Mar 6, 2023

@GitMensch ping? any response to my above message? I'm inclined to close this ticket as it's not really actionable

@GitMensch
Copy link
Contributor Author

The workarounds mentioned by me and detailed by you do often work, but the main goal would be to get a combined view "as if" there would have been a single starter, but actually there are multiple perf files.

Maybe perfparser could "combine" those (giving it a "virtual" common start process, if that's needed)?

@GitMensch
Copy link
Contributor Author

While this dos not cover all cases (combination seems still useful for me) the run of a script via perf record that starts everything works in many cases.

Of course I now have a huge perf.data file which contains bash, make and even gcc along with the data that I'm interested in.
running hotspot perf.data --exportTo data.perfparser then also raises a lot of warnings and takes a while.

Opening the file in hotspot does allow "filter by binary" which allows me to post inspect the binaries I'm interested in, too.

Would it be possible to add a --filter option to perfparser (or hotspot --exportTo) where I could specify the binaries I'm (not) interested in? This would make the "collect altogether" option much more useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants