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

Add docs for windows performance analyzer #3149

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jasonwilliams
Copy link
Member

This adds some new documentation for profiling Boa with Windows Performance Analyzer.
This doesn't replace the measureme/crox effort, but offers another way of profiling Boa which may be more suitable to some users.

Please try the guide out and let me know if it makes sense or is missing some steps.

Rendered

@jasonwilliams jasonwilliams added the documentation update documentation label Jul 17, 2023
@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #3149 (d6eb468) into main (de192d3) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3149      +/-   ##
==========================================
- Coverage   50.62%   50.61%   -0.01%     
==========================================
  Files         444      444              
  Lines       42696    42696              
==========================================
- Hits        21613    21612       -1     
- Misses      21083    21084       +1     

see 1 file with indirect coverage changes

Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to follow along fairly well. I still need to play with it a bit more than currently, but it's definitely really cool! Should the improved Symbol Setup step be optional?

Just some suggestions regarding the wording of the doc itself.

docs/profiling_with_wpa.md Outdated Show resolved Hide resolved
Windows have a performance analyzing tool that creates graphs and data tables of Event Tracing for Windows (ETW) events. You can analyze your whole system but also individual binaries too.
This can be used for performance tracing with Rust programs like Boa.

For this to work you will need to have your code running in native windows and not WSL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is WSL ubiquitous enough? Maybe in the interest of clarity it should be fully spelled out.

docs/profiling_with_wpa.md Outdated Show resolved Hide resolved
docs/profiling_with_wpa.md Outdated Show resolved Hide resolved

Once you've done this navigate to the CPU Usage (Sampled) tab underneath and click the first symbol on the far right, it should be called `Display Graph and Table`.

Then on the dropdown (same tab) select `Flame By Process, Stack`. If followed correctly you should have something which looks like this:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then on the dropdown (same tab) select `Flame By Process, Stack`. If followed correctly you should have something which looks like this:
Then on `CPU Usage (Sampled)` View Preset dropdown, located just to the right of the header title, select the `Flame By Process, Stack` option. If followed correctly, you should see something similar to the below:

![cpu](./img/cpu_usage.png)

Almost there..
Symbols are not showing, WPA doesn't scan symbols by default. You need to click Trace at the top and then `Load Symbols`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Symbols are not showing, WPA doesn't scan symbols by default. You need to click Trace at the top and then `Load Symbols`.
Symbols are not showing, WPA doesn't scan symbols by default. To load symbols, click Trace in the application menu at the top and then select `Load Symbols`.

jasonwilliams and others added 3 commits July 19, 2023 01:09
Co-authored-by: Kevin <46825870+nekevss@users.noreply.github.com>
Co-authored-by: Kevin <46825870+nekevss@users.noreply.github.com>
Co-authored-by: Kevin <46825870+nekevss@users.noreply.github.com>
@jedel1043
Copy link
Member

We discussed this in our triage and @raskad @nekevss @HalidOdat will try to run it to see if there are any issues on the example.

@jedel1043 jedel1043 added the windows Issues and PRs related to the Windows platform. label Nov 29, 2023
Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this out and it worked pretty good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation update documentation windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants