Stream: beginners

Topic: profiling Roc


view this post on Zulip Steve Howell (Sep 15 2026 at 13:54):

I'm trying to profile Roc to find hot spots. Claude has figured a convoluted scheme involving LIR dumps. Is there a better way?

view this post on Zulip Steve Howell (Sep 15 2026 at 13:55):

From Claude:

On asking the Roc Zulip: yes, I think one narrow question is worth it. Even with --debug, the wasm names functions only by number (roc__proc_313), and ROC_LIR_DUMP numbers them differently. Matching the two took a hand-written decoder comparing constants. The question: "Is there a way to get source names into the wasm name section, or a map from proc id to source name, for dev-backend builds?" That's concrete and easy to answer.

view this post on Zulip Anton (Sep 15 2026 at 18:01):

I don't think there's been much wasm profiling yet, maybe @Luke Boswell has done some?

view this post on Zulip Luke Boswell (Sep 15 2026 at 21:05):

I do this trick for my WASM platforms where I also have a native "test" host, and the I can use all the standard tools. I also like to fill the native host to the gills with instrumentation and telemetry and fun things so I can dig into all the details like roc allocarions or traces.


Last updated: Sep 24 2026 at 15:59 UTC