Skip to content

Comments

Normalize hex addresses in zjit_diff stat keys#484

Merged
rwstauner merged 1 commit intomainfrom
rwstauner/zjit-diff-stat-keys-addrs
Feb 19, 2026
Merged

Normalize hex addresses in zjit_diff stat keys#484
rwstauner merged 1 commit intomainfrom
rwstauner/zjit-diff-stat-keys-addrs

Conversation

@rwstauner
Copy link
Contributor

Strip memory addresses (0x...) from stat keys so entries that differ only by object address (e.g. "#Module:0x00007f1a#foo") are collapsed and their values summed for comparison.

$ jq . data/output_272.json | grep -E Module.+object_id
          "not_inlined_cfuncs_#<Module:0x000000012a3521c0>#object_id": 26,
          "not_annotated_cfuncs_#<Module:0x000000012a3521c0>#object_id": 26,
          "ccall_#<Module:0x000000012a3521c0>#object_id": 26,
          "not_inlined_cfuncs_#<Module:0x000000010ff26240>#object_id": 25,
          "not_annotated_cfuncs_#<Module:0x000000010ff26240>#object_id": 25,
          "ccall_#<Module:0x000000010ff26240>#object_id": 25,

$ misc/zjit_diff.rb data/output_272.json -a | grep -E Module.+object_id
    #<Module:0x…>#object_id                           26 →             25 ▼   -3.8%
    #<Module:0x…>#object_id                           26 →             25 ▼   -3.8%
    #<Module:0x…>#object_id                           26 →             25 ▼   -3.8%

Strip memory addresses (0x...) from stat keys so entries that differ
only by object address (e.g. "#<Module:0x00007f1a>#foo") are collapsed
and their values summed for comparison.

$ jq . data/output_272.json | grep -E Module.+object_id
          "not_inlined_cfuncs_#<Module:0x000000012a3521c0>#object_id": 26,
          "not_annotated_cfuncs_#<Module:0x000000012a3521c0>#object_id": 26,
          "ccall_#<Module:0x000000012a3521c0>#object_id": 26,
          "not_inlined_cfuncs_#<Module:0x000000010ff26240>#object_id": 25,
          "not_annotated_cfuncs_#<Module:0x000000010ff26240>#object_id": 25,
          "ccall_#<Module:0x000000010ff26240>#object_id": 25,

$ misc/zjit_diff.rb data/output_272.json -a | grep -E Module.+object_id
    #<Module:0x…>#object_id                           26 →             25 ▼   -3.8%
    #<Module:0x…>#object_id                           26 →             25 ▼   -3.8%
    #<Module:0x…>#object_id                           26 →             25 ▼   -3.8%
@rwstauner rwstauner merged commit 92d98e5 into main Feb 19, 2026
11 checks passed
@rwstauner rwstauner deleted the rwstauner/zjit-diff-stat-keys-addrs branch February 19, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants