Profiler can print bad values for "self" on first row
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 512
- Forks
- 51
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 21
Description
The sprintf formatting on the first line of profile data is messed up sometimes. I think it's somehow printing 0 as the "nested" value (incorrectly) and then printing the actually nested size as a value that's somehow negated digit-by-digit, in the "self" column. (notice that the digits in that self value match the "nested" for the row below, which would make since if the two rows had the same "nested" value, as is often the case.)
I've only seen this happen on the very first row.
* nested self self % count
func #1444 0.000000s0.00-1-7-4-8s 0.000% 1
func #1380 0.001748s 0.000006s 0.000% 1
func #776 0.001538s 0.000017s 0.000% 1
func #780 0.000445s 0.000004s 0.000% 1
func #279 0.000274s 0.000001s 0.000% 1
func #1300 0.000273s 0.000002s 0.000% 1
func #271 0.000271s 0.000005s 0.000% 1
func #268 0.000263s 0.000001s 0.000% 1
func #311 0.000260s 0.000003s 0.000% 1
func #315 0.000256s 0.000006s 0.000% 1
func #317 0.000242s 0.000002s 0.000% 1
func #552 0.000237s 0.000000s 0.000% 1
func #1386 0.000237s 0.000001s 0.000% 1
func #553 0.000236s 0.000001s 0.000% 1
func #558 0.000230s 0.000011s 0.000% 1
My invoking command was this:
/wizard-engine/bin/wizeng.x86-64-linux --ext:stack-switching --monitors=profile --colors=false y.wasm 10 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the profile output with the shown wizard-engine command and the --monitors=profile option. Trace the profiler's first-row sprintf formatting and compare its nested and self values with subsequent rows. Done means the first row prints the correct values with valid formatting, without affecting the remaining profile rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100