[英]When executing WASM in Firefox, what is "debug trap handling"
I've compiled a large chunk of C++ code to WASM using enscriptem, and am trying to optimize its performance.我已经使用 enscriptem 将大量 C++ 代码编译到 WASM,并且正在尝试优化其性能。 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.我认为这意味着 Firefox 编译了 Wasm 使其适合调试,因此您可以逐行逐步完成 Wasm,因为分析器是打开的。 This usually means that it is interpreted.
这通常意味着它被解释。 (It does not have to do with the flags you use to compile you C++ project.)
(它与用于编译 C++ 项目的标志无关。)
Not super sure if there's a way to profile from the command line, maybe you can try inserted calls to console.profile();
不确定是否有办法从命令行进行分析,也许您可以尝试插入对
console.profile();
调用console.profile();
to surround parts of your C++ code that you care about.围绕您关心的 C++ 代码部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.