Skip to content

Add MVP of virtual machine tracer - #4931

Open
nekevss wants to merge 7 commits into
boa-dev:mainfrom
nekevss:rework-vm-tracing
Open

Add MVP of virtual machine tracer#4931
nekevss wants to merge 7 commits into
boa-dev:mainfrom
nekevss:rework-vm-tracing

Conversation

@nekevss

@nekevss nekevss commented Mar 7, 2026

Copy link
Copy Markdown
Member

This pull request implements a new VirtualMachineTracer trait that emits VirtualMachineEvents rather than immediately printing the values to stdout.

This should allow better customization of event handling.

@nekevss
nekevss requested a review from a team as a code owner March 7, 2026 19:05
@nekevss
nekevss force-pushed the rework-vm-tracing branch from 80c0e21 to 2778f0a Compare March 7, 2026 19:14
@nekevss
nekevss force-pushed the rework-vm-tracing branch from 2778f0a to 01e41cd Compare March 7, 2026 19:16
@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,687 49,666 -21
Ignored 2,262 2,284 +22
Failed 1,014 1,013 -1
Panics 0 0 0
Conformance 93.81% 93.77% -0.04%

Tested main commit: b3d820369072123ded8defc927405b99b9012648
Tested PR commit: 01e41cd03fa72e78cc7a00ec3bcf4e67e5ca357d
Compare commits: b3d8203...01e41cd

@codecov

codecov Bot commented Mar 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 39.65517% with 350 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.81%. Comparing base (6ddc2b4) to head (fd0451c).
⚠️ Report is 1052 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/vm/operands.rs 39.26% 348 Missing ⚠️
core/engine/src/vm/mod.rs 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4931       +/-   ##
===========================================
+ Coverage   47.24%   62.81%   +15.56%     
===========================================
  Files         476      537       +61     
  Lines       46892    60433    +13541     
===========================================
+ Hits        22154    37958    +15804     
+ Misses      24738    22475     -2263     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


/// A message that emits instruction execution details about a call frame
#[derive(Debug, Clone)]
pub struct OpcodeExecutionMessage {

@jedel1043 jedel1043 Mar 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to granularize this, because some tracers would need to have the individual operands and stack values instead of a big string; I'm thinking of like a web-based tracer that displays the stack in a more dynamic way, for example.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry just saw this!

Thats a good idea. I'll make the update ASAP

@jedel1043 jedel1043 added A-Enhancement New feature or request A-API Changes related to public APIs C-VM Issues and PRs related to the Boa Virtual Machine. Waiting On Author Waiting on PR changes from the author labels Mar 16, 2026
@jedel1043 jedel1043 added this to the v1.0.0 milestone Mar 16, 2026
@jedel1043

Copy link
Copy Markdown
Member

Any updates on this?

@nekevss

nekevss commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Still planning to eventually take another pass at this when I have a bit of time.

@github-actions github-actions Bot added C-Dependencies Pull requests that update a dependency file C-Tests Issues and PRs related to the tests. labels Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,578 53,578 0
Passed 51,432 51,432 0
Ignored 1,648 1,648 0
Failed 498 498 0
Panics 0 0 0
Conformance 95.99% 95.99% 0.00%

Tested main commit: 257bc301afa0cda88f470a8452251ade54d516e3
Tested PR commit: fd0451c1c26945de73590a5cceac01cf5d7c4d06
Compare commits: 257bc30...fd0451c

@nekevss
nekevss requested a review from jedel1043 September 7, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-API Changes related to public APIs A-Enhancement New feature or request C-Dependencies Pull requests that update a dependency file C-Tests Issues and PRs related to the tests. C-VM Issues and PRs related to the Boa Virtual Machine. Waiting On Author Waiting on PR changes from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants