Skip to content

chore(Core): Update instrumentation - #10725

Open
michael-weigelt wants to merge 14 commits into
masterfrom
mwe/charge_call
Open

chore(Core): Update instrumentation#10725
michael-weigelt wants to merge 14 commits into
masterfrom
mwe/charge_call

Conversation

@michael-weigelt

@michael-weigelt michael-weigelt commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Dynamically charge for function locals to align with other memory operations.

@michael-weigelt michael-weigelt changed the title Mwe/charge call chore(Core): Update instrumentation Jul 13, 2026
@michael-weigelt
michael-weigelt marked this pull request as ready for review July 13, 2026 12:04
@michael-weigelt
michael-weigelt requested a review from a team as a code owner July 13, 2026 12:04
@zeropath-ai

zeropath-ai Bot commented Jul 13, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 92b2b9b.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/embedders/src/wasm_utils/instrumentation.rs
    Add Types import, extend injections to account for locals and arguments costs, compute local_cost, pass func_signature to inject_metering, adjust cost accumulation for locals and arguments
► rs/embedders/tests/instrumentation.rs
    Update expectations for metering cost due to added locals cost
► rs/embedders/tests/snapshots/instrumentation__app.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__app2.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__basic.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__basic_import.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__basic_import_call.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__control_flow.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__element.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__export_mutable_globals.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__fac.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__fizzbuzz.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__memory_fill.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__memory_grow.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__nested_ifs.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__recursive.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__simple_loop.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__start.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__zero_cost_ops.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/execution_environment/benches/system_api/execute_inspect_message.rs
    Adjust expected benchmark costs (offsets) for enabled/disabled wasm32/wasm64 scenarios
► rs/execution_environment/benches/system_api/execute_query.rs
    Adjust expected benchmark costs (offsets) for enabled/disabled wasm32/wasm64 scenarios
► rs/execution_environment/benches/system_api/execute_update.rs
    Adjust expected benchmark costs (offsets) for various benchmarks across wasm32/wasm64 and tracker overhead
► rs/execution_environment/benches/system_api/../ (multiple benchmark files in this diff)

@michael-weigelt
michael-weigelt requested a review from a team as a code owner July 20, 2026 11:21

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):

  1. Update unreleased_changelog.md (if there are behavior changes, even if they are
    non-breaking).

  2. Are there BREAKING changes?

  3. Is a data migration needed?

  4. Security review?

How to Satisfy This Automatic Review

  1. Go to the bottom of the pull request page.

  2. Look for where it says this bot is requesting changes.

  3. Click the three dots to the right.

  4. Select "Dismiss review".

  5. In the text entry box, respond to each of the numbered items in the previous
    section, declare one of the following:

  • Done.

  • $REASON_WHY_NO_NEED. E.g. for unreleased_changelog.md, "No
    canister behavior changes.", or for item 2, "Existing APIs
    behave as before.".

Brief Guide to "Externally Visible" Changes

"Externally visible behavior change" is very often due to some NEW canister API.

Changes to EXISTING APIs are more likely to be "breaking".

If these changes are breaking, make sure that clients know how to migrate, how to
maintain their continuity of operations.

If your changes are behind a feature flag, then, do NOT add entrie(s) to
unreleased_changelog.md in this PR! But rather, add entrie(s) later, in the PR
that enables these changes in production.

Reference(s)

For a more comprehensive checklist, see here.

GOVERNANCE_CHECKLIST_REMINDER_DEDUP

@zeropath-ai

zeropath-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 92b2b9b.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/embedders/src/wasm_utils/instrumentation.rs
    Add Types import, extend injections to account for locals and arguments costs, compute local_cost, pass func_signature to inject_metering, adjust cost accumulation for locals and arguments
► rs/embedders/tests/instrumentation.rs
    Update expectations for metering cost due to added locals cost
► rs/embedders/tests/snapshots/instrumentation__app.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__app2.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__basic.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__basic_import.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__basic_import_call.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__control_flow.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__element.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__export_mutable_globals.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__fac.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__fizzbuzz.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__memory_fill.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__memory_grow.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__nested_ifs.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__recursive.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__simple_loop.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__start.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/embedders/tests/snapshots/instrumentation__zero_cost_ops.snap
    Update assertion_line and instruction costs to reflect new local cost adjustments
► rs/execution_environment/benches/system_api/execute_inspect_message.rs
    Adjust expected benchmark costs (offsets) for enabled/disabled wasm32/wasm64 scenarios
► rs/execution_environment/benches/system_api/execute_query.rs
    Adjust expected benchmark costs (offsets) for enabled/disabled wasm32/wasm64 scenarios
► rs/execution_environment/benches/system_api/execute_update.rs
    Adjust expected benchmark costs (offsets) for various benchmarks across wasm32/wasm64 and tracker overhead
► rs/execution_environment/benches/system_api/../ (multiple benchmark files in this diff)

@michael-weigelt michael-weigelt added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Jul 20, 2026
@michael-weigelt
michael-weigelt added this pull request to the merge queue Aug 7, 2026
@michael-weigelt
michael-weigelt removed this pull request from the merge queue due to a manual request Aug 7, 2026
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.

3 participants