Repository navigation
Commit e7c35d8
committed
phx_ptr_array.h + inliner.cpp: P2 per-site attribution counters (3 M1 sites)
P2 per-site attribution substrate per sup 22:10:51Z PICK (α) +
theologian 22:00:54Z + 22:09:00Z per-site disposition framework +
testkeeper 22:08:07Z (P1) empirical validation. Three per-site
extern counters for M1 inliner.cpp sites (excess_args / to_delete /
ends), bumped at each site after capacity-change detection at the
push call. Distinguishes which specific M1 site fired vs the global
phx_ptr_array_resize_count.
Pythia python#476 + shepard 21:48:50Z attribution-gap empirically closed:
testkeeper 22:08:07Z (P1) controlled-revert revealed only Site C
(ends, delta=15 of baseline 10 on Step 2.5) contributes; Sites A
(excess_args) + B (to_delete) contribute 0 on the fixture. Step 3
JIT suite measurement (testkeeper 21:59:22Z+22:08:07Z) confirmed Site
A delta=0 even across 1001-test suite — real coverage gap per
theologian 22:09:00Z disposition.
Three changes:
1. phx_ptr_array.h: extern decl for 3 per-site counters (substrate-
M1-only scope per testkeeper 22:10:23Z; M2 sites add own externs
incrementally per-commit).
2. builder.cpp: single-def for 3 per-site counters alongside existing
global phx_ptr_array_resize_count + phx_framestate_parent_resize_count.
3. inliner.cpp: capacity-before/after detection at each of 3 M1 push
sites (excess_args inside *args branch, to_delete inside
tryEliminateBeginEnd with 3 push locations all instrumented, ends
inside BeginInlinedFunctionElimination::Run). Pattern: read .capacity
before push, compare after, bump per-site counter on change.
4. gate_phoenix.sh Step 2.5: extend ctypes probe to read all 3 per-site
counters pre/post; print per-site deltas alongside global counter.
Forward use per theologian 22:09:00Z M2 protocol:
- M2 builder.cpp 7-site cascade adds own per-site externs per commit
- Each commit measures under Step 3 JIT suite + categorizes per site:
delta>0 (covered, proceed) / delta=0 + structurally bounded ≤ initial-cap
(Site B class accept-with-rationale) / delta=0 + unbounded (Site A class
real gap, need test)
- Per-site instrumentation pattern from this commit is reusable template
Site A test addition + Site B accept-with-rationale comment in follow-up
per testkeeper bandwidth (testkeeper 22:09:32Z + sup 22:10:51Z
sequence step 2).
numstat:
Python/jit/hir/builder.cpp +10/-0 (3 per-site single-defs + comment)
Python/jit/hir/inliner.cpp +24/-0 (capacity-detect at 6 push call-sites:
1 excess_args + 4 to_delete + 1 ends)
Python/jit/hir/phx_ptr_array.h +11/-0 (3 extern decls + comment)
scripts/gate_phoenix.sh +22/-7 (per-site counter probe + delta report)1 parent ab3fd73 commit e7c35d8
4 files changed
Lines changed: 67 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
326 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
327 | 331 | | |
| 332 | + | |
328 | 333 | | |
329 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
330 | 338 | | |
331 | 339 | | |
332 | 340 | | |
| |||
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
| 386 | + | |
378 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
379 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
380 | 396 | | |
381 | 397 | | |
382 | 398 | | |
383 | 399 | | |
| 400 | + | |
384 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
385 | 405 | | |
386 | 406 | | |
387 | 407 | | |
| |||
714 | 734 | | |
715 | 735 | | |
716 | 736 | | |
| 737 | + | |
717 | 738 | | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
718 | 742 | | |
719 | 743 | | |
720 | 744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
531 | 539 | | |
532 | 540 | | |
533 | 541 | | |
534 | 542 | | |
535 | 543 | | |
| 544 | + | |
536 | 545 | | |
537 | 546 | | |
538 | 547 | | |
| |||
575 | 584 | | |
576 | 585 | | |
577 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
578 | 590 | | |
579 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
580 | 595 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
587 | 602 | | |
588 | 603 | | |
589 | 604 | | |
590 | | - | |
| 605 | + | |
591 | 606 | | |
592 | 607 | | |
593 | 608 | | |
| |||
0 commit comments