Skip to content

chore(Core): Update instrumentation#10725

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

chore(Core): Update instrumentation#10725
michael-weigelt wants to merge 12 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 0d4f4d1.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/embedders/src/wasm_utils/instrumentation.rs
    Charge locals cost at start of reentrant block; propagate locals and arguments cost into metering; add local_cost helper; pass func_signature to inject_metering
Enhancement ► rs/embedders/tests/instrumentation.rs
    Update expected instruction counting to include locals cost (per byte)
Enhancement ► rs/embedders/tests/snapshots/instrumentation__app.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__app2.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__basic.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__basic_import.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__basic_import_call.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__control_flow.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__element.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__export_mutable_globals.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__fac.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__fizzbuzz.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__memory_fill.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__memory_grow.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__nested_ifs.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__recursive.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__simple_loop.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__start.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/embedders/tests/snapshots/instrumentation__zero_cost_ops.snap
    Adjust expected constants to reflect updated metering costs for locals/args
Enhancement ► rs/execution_environment/benches/system_api/execute_inspect_message.rs
    Update benchmark expected values for various ic0* operations (offsets changed)
Enhancement ► rs/execution_environment/benches/system_api/execute_query.rs
    Update benchmark expected values for ic0_* data/certificate/arg ops (offsets changed)
Enhancement ► rs/execution_environment/benches/system_api/execute_update.rs
    Update benchmark expected values across many ic0_* benchmarks (offsets changed)

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