I've compiled a large chunk of C++ code to WASM using enscriptem, and am trying to optimize its performance. Here is what my profiler is showing:
What does the "debug trap handling" section mean, and why is my code spending so much time in it?
I think that means Firefox compiled the Wasm such that it is suitable for debugging, so you can step through the Wasm line by line, since the profiler is open. This usually means that it is interpreted. (It does not have to do with the flags you use to compile you C++ project.)
Not super sure if there's a way to profile from the command line, maybe you can try inserted calls to console.profile();
to surround parts of your C++ code that you care about.