Skip to content

test(DSM): Update tests to pass with or without deterministic tracker…#9894

Merged
adambratschikaye merged 5 commits intomasterfrom
abk/fix-dsm-tests
Apr 16, 2026
Merged

test(DSM): Update tests to pass with or without deterministic tracker…#9894
adambratschikaye merged 5 commits intomasterfrom
abk/fix-dsm-tests

Conversation

@adambratschikaye
Copy link
Copy Markdown
Contributor

… charging

Modify instrumentation, benchmark, and subnet-size tests so they produce correct expected values regardless of whether the deterministic memory tracker charges instructions for dirty and accessed pages.

  • Instrumentation tests: account for the per-OS-page instruction overhead charged in-band by the SIGSEGV handler when the tracker is enabled.
  • Benchmark reference counts: add helpers deterministic_tracker_overhead() and deterministic_tracker_write_overhead() that return zero when the tracker is disabled and the appropriate per-Wasm-page cost when it is enabled. Use the actual OS page size (ic_sys::PAGE_SIZE) rather than a hard-coded 4096 so the values are correct on arm64-darwin (16 KiB pages) as well as on Linux (4 KiB pages).
  • Subnet-size test: apply the same page-size-aware overhead helper to the reference instruction count used in test_subnet_size_execute_message_cost.

… charging

Modify instrumentation, benchmark, and subnet-size tests so they produce
correct expected values regardless of whether the deterministic memory
tracker charges instructions for dirty and accessed pages.

- Instrumentation tests: account for the per-OS-page instruction overhead
  charged in-band by the SIGSEGV handler when the tracker is enabled.
- Benchmark reference counts: add helpers deterministic_tracker_overhead()
  and deterministic_tracker_write_overhead() that return zero when the
  tracker is disabled and the appropriate per-Wasm-page cost when it is
  enabled. Use the actual OS page size (ic_sys::PAGE_SIZE) rather than a
  hard-coded 4096 so the values are correct on arm64-darwin (16 KiB pages)
  as well as on Linux (4 KiB pages).
- Subnet-size test: apply the same page-size-aware overhead helper to the
  reference instruction count used in test_subnet_size_execute_message_cost.
@adambratschikaye adambratschikaye requested a review from a team as a code owner April 15, 2026 13:07
@github-actions github-actions bot added the test label Apr 15, 2026
@adambratschikaye adambratschikaye added this pull request to the merge queue Apr 16, 2026
Merged via the queue into master with commit b07f3c8 Apr 16, 2026
37 checks passed
@adambratschikaye adambratschikaye deleted the abk/fix-dsm-tests branch April 16, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants