Skip to content

Implement Wasm profiling w/ wasmprof#149

Merged
jbourassa merged 1 commit intomainfrom
jb/profile
Jul 4, 2023
Merged

Implement Wasm profiling w/ wasmprof#149
jbourassa merged 1 commit intomainfrom
jb/profile

Conversation

@jbourassa
Copy link
Contributor

@jbourassa jbourassa commented Jun 30, 2023

Enable Wasm profiling with wasmprof, using fuel as the scale. The generated profile is written to a .perf file and can be used with speedscope.

Sending any of the --profile option will generate a profile:

  • --profile enables the profiling.
  • --profile-out allows picking the destination file. Defaults to writing a file to the current dir, using the specified Wasm's basename, but with a .perf extension. For example: function-runner --function build/foo.wasm --profile will result in ./foo.perf.
  • --profile-frequency specify how many times per second to sample (default to 500_000 which is every 5µs).

@jbourassa jbourassa requested a review from andrewhassan June 30, 2023 00:28
Copy link
Member

@jacobsteves jacobsteves left a comment

Choose a reason for hiding this comment

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

Cool!

@jbourassa jbourassa merged commit 91d626e into main Jul 4, 2023
@jbourassa jbourassa deleted the jb/profile branch July 4, 2023 12:54
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

Successfully merging this pull request may close these issues.

3 participants