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

Loading perf artifact is not well documented, or not flexible #106

Closed
ami-GS opened this issue Jan 24, 2023 · 3 comments
Closed

Loading perf artifact is not well documented, or not flexible #106

ami-GS opened this issue Jan 24, 2023 · 3 comments

Comments

@ami-GS
Copy link

ami-GS commented Jan 24, 2023

Hi team,

I did reverse engineering to load perf file. Then I felt it is not well documented and not flexible.

  • Requires perf scripted output
  • Requires XXX**.perf.data.txt** extension

Especially about the extension requirements, as WPA extends feature for .txt loading as shown in Diagnostic Console

@ivberg
Copy link
Contributor

ivberg commented Jan 24, 2023

The current Perf capture is documented here, including exact script commands and conversion to txt format with the right naming - https://github.com/microsoft/Microsoft-Performance-Tools-Linux-Android/blob/develop/LinuxTraceLogCapture.md#perf

Unfortunately, it's a bit complicated, but that is because LTTng does not support CPU Sampling capture yet, and the perf tool is the built-in kernel standard tool that allows this. Decoding to text is required not only to read the format but because it contains symbols. LTTng does not have great symbol support at the moment.

I don't particularly love that we REQUIRE a certain extension (like .txt). However, with a plugin framework as is used by Microsoft Performance Toolkit SDK, you do need to see if a certain plugin (like perf) supports a certain file format, and an extension is a standard way to do that. The file is indeed txt format. We also use the same format and general capture method as https://aka.ms/perfcollect

Do you have any suggestions or PR to improve @ami-GS?

FYI @Nemati as he recently used this and may also have some ideas as well

@ami-GS
Copy link
Author

ami-GS commented Jan 24, 2023

I did not notice the document. but what I did was more simpler than the one written.

perf record -F XX -a -g -o out.perf.data MY_COMMAND
perf script -i out.perf.data > out.perf.data.txt

This file could be visualized on WPA
what the difference with the commands on your doc?

And, just .txt file failed to be loaded. Need to have XXX.perf.data.txt.
This is more complicated and nothing mentioned as much as I investigated.
My recommendation is that WPA Diagnostic console to mention ".perf.data.txt"
like
Associating .PERF.DATA.TXT with `Linux Perf Txt Data
instead of

Associating .TXT with `Linux Perf Txt Data
or mention the requirements in the doc

@ivberg
Copy link
Contributor

ivberg commented Jun 4, 2024

Closing as this has been documented for some time the required format and name

@ivberg ivberg closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants