Stream: git-wasmtime

Topic: wasmtime / PR #8107 Print some machinst metrics


view this post on Zulip Wasmtime GitHub notifications bot (Mar 12 2024 at 22:15):

lpereira opened PR #8107 from lpereira:better-metrics to bytecodealliance:main:

This is just a first pass at trying to gather some insights that might lead to memory savings later. For instance, by compiling SpiderMonkey with this patch, we get these metrics out:

Key(machinst.buffer.data): 0.0: 4 0.5: 412.0315874877959 0.9: 1636.1480687972453 1.0: 110084
Key(machinst.buffer.relocs): 0.0: 0 0.5: 1.9999056357269998 0.9: 9.999149133010329 1.0: 600
Key(machinst.buffer.traps): 0.0: 0 0.5: 11.999920242205052 0.9: 57.00277828432678 1.0: 3833
Key(machinst.buffer.call_sites): 0.0: 0 0.5: 1.9999056357269998 0.9: 9.999149133010329 1.0: 600

Which suggest that the fields in MachBuffer struct could be reduced:

Of course, there's only one MachBuffer per thread compiling code, so the savings here are marginal, but this approach could be used in other parts of the code to find more useful things.

The output formatting at this point is pretty crude as this is merely a proof-of-concept, but something better can be made later if necessary.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->


Last updated: Nov 22 2024 at 17:03 UTC