grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
10.08k stars 609 forks source link

Wasm #184

Closed gedw99 closed 9 months ago

gedw99 commented 3 years ago

I am increasingly compiling golang code to run as wasm using the golang and tinygo compiler

It would be awesome to be able to profile code that is compiled this way .

With tinygo you can’t use reflection or network golang api calls but running in a web worker is fine and how I generally run golang wasm in a browser or IOT device.

anyways I think it’s an interesting use case an challenge.

Here is a example approach. See makefile

https://github.com/jerson/openpgp-mobile/tree/flatbuffers

—-

As an aside it’s also possible for the actual profiling web gui to be make to use wasm too these days without too much effort

chadbrewbaker commented 3 years ago

https://bellard.org/jslinux/vm.html?url=alpine-x86.cfg&mem=192 even curl works :)

WASM profiling with perf: https://rustwasm.github.io/book/reference/time-profiling.html