Skip to content

Bye AB(B)A and friends!#5

Open
maurycy wants to merge 4 commits into
mainfrom
maurycy/bye-abba
Open

Bye AB(B)A and friends!#5
maurycy wants to merge 4 commits into
mainfrom
maurycy/bye-abba

Conversation

@maurycy

@maurycy maurycy commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Scripts below:

2026-06-20T01:22:43.241452000+0200 maurycy@gimel /Users/maurycy/Desktop/pr (main ab88e3e*) % ll
total 40
drwxr-xr-x@  8 maurycy  staff   256B Jun 20 01:22 .
drwxrwxr-x@ 21 maurycy  staff   672B Jun 20 01:22 ..
drwxr-xr-x@ 12 maurycy  staff   384B Jun 20 01:04 .git
-rw-r--r--@  1 maurycy  staff   1.1K Jun 20 01:22 01_interchunk.py
-rw-r--r--@  1 maurycy  staff   1.1K Jun 20 01:22 02_gi_iframe.py
-rw-r--r--@  1 maurycy  staff   3.4K Jun 20 01:22 03_pr151614.py
-rw-r--r--@  1 maurycy  staff   1.9K Jun 20 01:20 04_sharedleaf.py
-rwxr-xr-x@  1 maurycy  staff   329B Jun 20 00:38 run.sh

Basic harness run.sh:

#!/bin/sh
py=${1:?usage: ./run.sh /path/to/python.exe}
"$py" -VV
cd "$(dirname "$0")" || exit 1
for f in [0-9]*.py; do
    printf '\n=== %s ===\n' "$f"
    sudo "$py" "$f"
done

Inter{page,chunk} repro:

import subprocess, sys, time, random
from _remote_debugging import RemoteUnwinder

CODE = """
print("ready", flush=True)
def leaf():
    t = 0
    for i in range(40): t += i
def a(n): return a(n-1) if n else leaf()
def b(n): return b(n-1) if n else leaf()
while True:
    a(300); b(300)
"""

N = next((int(a) for a in sys.argv[1:] if a.isdigit()), 100000)
JITTER = 0.0004  # seconds; per-sample uniform jitter to break phase-locking
p = subprocess.Popen([sys.executable, "-c", CODE], stdout=subprocess.PIPE, text=True)
p.stdout.readline()  # "ready"
unw = RemoteUnwinder(p.pid, all_threads=True, cache_frames=False, stats=True)
seen = cross = 0
for _ in range(N):
    time.sleep(random.uniform(0, JITTER))
    try: traces = unw.get_stack_trace()
    except (OSError, RuntimeError, UnicodeDecodeError): continue
    for th in (t for it in traces for t in it.threads):
        names = {f.funcname for f in th.frame_info}
        if not names & {"a", "b"}: continue
        seen += 1
        cross += "a" in names and "b" in names
p.kill()
print(f"seen={seen} cross={cross} ({100*cross/max(seen,1):.2f}%)")
print(unw.get_stats())

gi_iframe repro:

import subprocess, sys, time, random
from _remote_debugging import RemoteUnwinder

CODE = """
def agen(n):
    t=0
    for i in range(n): t+=i; yield i
def bgen(n):
    t=0
    for i in range(n): t+=i; yield i
def drv_a():
    for _ in agen(60): pass
def drv_b():
    for _ in bgen(60): pass
while True: drv_a(); drv_b()
"""

N = next((int(a) for a in sys.argv[1:] if a.isdigit()), 100000)
JITTER = 0.0004
p = subprocess.Popen([sys.executable, "-c", CODE]); time.sleep(0.7)
unw = RemoteUnwinder(p.pid, all_threads=True, cache_frames=("off" not in sys.argv), stats=True)
seen = imp = 0
for _ in range(N):
    time.sleep(random.uniform(0, JITTER))
    try: traces = unw.get_stack_trace()
    except (OSError, RuntimeError, UnicodeDecodeError): continue
    for th in (t for it in traces for t in it.threads):
        ns = {f.funcname for f in th.frame_info}
        if not ns & {"agen", "bgen"}: continue
        seen += 1
        imp += ("agen" in ns and "drv_b" in ns) or ("bgen" in ns and "drv_a" in ns)
p.kill()
print(f"cache={'off' not in sys.argv} seen={seen} impossible={imp} ({100*imp/max(seen,1):.1f}%)")
print(unw.get_stats())

Repro from python#151614

import contextlib
import os
import random
import socket
import subprocess
import sys
import tempfile
import textwrap
import time

from _remote_debugging import PROCESS_VM_READV_SUPPORTED, RemoteUnwinder

TRANSIENT_ERRORS = (OSError, RuntimeError, UnicodeDecodeError)


def find_free_port():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
        sock.bind(("localhost", 0))
        return sock.getsockname()[1]


def wait_for(sock, expected):
    sock.settimeout(10.0)
    data = b""
    while expected not in data:
        chunk = sock.recv(4096)
        if not chunk:
            raise RuntimeError(f"target exited before {expected!r}")
        data += chunk


port = find_free_port()
target = f"""\
import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("localhost", {port}))
sock.sendall(b"ready")

def burn_a():
    total = 0
    for i in range(20000):
        total += i
    return total

def burn_b():
    total = 0
    for i in range(20000):
        total += i
    return total

def a_leaf():
    return burn_a()

def b_leaf():
    return burn_b()

def a_parent():
    return a_leaf()

def b_parent():
    return b_leaf()

while True:
    a_parent()
    b_parent()
"""

with tempfile.TemporaryDirectory() as tmp:
    script = os.path.join(tmp, "target.py")
    with open(script, "w", encoding="utf-8") as f:
        f.write(textwrap.dedent(target))

    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    server.bind(("localhost", port))
    server.listen(1)
    server.settimeout(10.0)

    proc = subprocess.Popen([sys.executable, script])
    conn = None
    try:
        conn, _ = server.accept()
        wait_for(conn, b"ready")
        unwinder = RemoteUnwinder(
            proc.pid, all_threads=True, cache_frames=True, stats=True
        )
        branch_a = {"a_parent", "a_leaf", "burn_a"}
        branch_b = {"b_parent", "b_leaf", "burn_b"}

        # Rate detector (not stop-on-first): jittered sampling over N samples so
        # the result is a stable rate, not a bursty present/absent coin flip.
        N = next((int(a) for a in sys.argv[1:] if a.isdigit()), 100000)
        JITTER = 0.0004
        seen = mixed = 0
        example = None
        for _ in range(N):
            time.sleep(random.uniform(0, JITTER))
            with contextlib.suppress(*TRANSIENT_ERRORS):
                traces = unwinder.get_stack_trace()
                for interp in traces:
                    for thread in interp.threads:
                        funcs = [frame.funcname for frame in thread.frame_info]
                        names = set(funcs)
                        if not (branch_a & names or branch_b & names):
                            continue
                        seen += 1
                        if branch_a & names and branch_b & names:
                            mixed += 1
                            if example is None:
                                example = funcs

        print(f"seen={seen} mixed={mixed} ({100*mixed/max(seen,1):.2f}%)")
        if example:
            print("example mixed:", example)
        print(unwinder.get_stats())
    finally:
        if conn is not None:
            conn.close()
        server.close()
        proc.kill()
        proc.wait(timeout=10.0)

Shared leaf repro:

import subprocess, sys, time, random
from _remote_debugging import RemoteUnwinder

CODE = '''
print("ready", flush=True)
def shared_leaf(long_run):
    total = 0
    if long_run:
        for i in range(20000):
            total += i          # LONG
    else:
        for i in range(20000):
            total += i          # SHORT
def a_wrapper(): return shared_leaf(False)
def b_wrapper(): return shared_leaf(True)
while True:
    a_wrapper(); b_wrapper()
'''

src = CODE.split("\n")
LONG  = next(i for i, l in enumerate(src, 1) if "# LONG" in l)
SHORT = next(i for i, l in enumerate(src, 1) if "# SHORT" in l)
long_lines, short_lines = {LONG, LONG - 1}, {SHORT, SHORT - 1}   # body + 'for' header
def _ln(loc): return loc[0] if isinstance(loc, (tuple, list)) else getattr(loc, "lineno", loc)

N = next((int(a) for a in sys.argv[1:] if a.isdigit()), 100000)
JITTER = 0.0004
p = subprocess.Popen([sys.executable, "-c", CODE], stdout=subprocess.PIPE, text=True)
p.stdout.readline()  # "ready"
unw = RemoteUnwinder(p.pid, all_threads=True, cache_frames=("off" not in sys.argv), stats=True)
seen = imp = 0
for _ in range(N):
    time.sleep(random.uniform(0, JITTER))
    try: traces = unw.get_stack_trace()
    except (OSError, RuntimeError, UnicodeDecodeError): continue
    for th in (t for it in traces for t in it.threads):
        names = [f.funcname for f in th.frame_info]
        if "shared_leaf" not in names: continue
        line = _ln(th.frame_info[names.index("shared_leaf")].location)
        parent = "a_wrapper" if "a_wrapper" in names else ("b_wrapper" if "b_wrapper" in names else None)
        if parent is None: continue
        seen += 1
        imp += (line in long_lines and parent == "a_wrapper") or (line in short_lines and parent == "b_wrapper")
p.kill()
print(f"cache={'off' not in sys.argv} seen={seen} impossible={imp} ({100*imp/max(seen,1):.2f}%)")
print(unw.get_stats())

pablogsal and others added 2 commits June 17, 2026 23:06
Fixes python#151613.

The remote debugging frame cache previously used only the last_profiled_frame address as its cache anchor. If a frame returned and a later frame reused the same _PyInterpreterFrame address, the profiler could accept a stale cache entry and splice parent frames from a different call chain into the current stack.

This adds a last_profiled_frame_seq counter next to last_profiled_frame, increments it when the anchor advances, stores it in frame cache entries, and validates cache hits against both the frame address and the sequence. Cache miss walks now copy stack chunks before storing new cache entries so stored continuations come from a stable snapshot. The new regression test exercises alternating call chains and checks that cached stacks never contain frames from both branches.
@maurycy maurycy self-assigned this Jun 19, 2026
@maurycy maurycy changed the title Bye, ABBA! Bye, AB(B)A! Jun 19, 2026
@maurycy maurycy changed the title Bye, AB(B)A! Bye, AB(B)A and friends! Jun 19, 2026
@maurycy maurycy changed the title Bye, AB(B)A and friends! Bye AB(B)A and friends! Jun 19, 2026
@maurycy

maurycy commented Jun 20, 2026

Copy link
Copy Markdown
Owner Author
# repro main a8d74c062fe pablo fc9fafd bye-abba b792693 bye-abba 6024fc7
01 inter-chunk skew 25.66% (n=45776) 29.36% (n=44294) 26.79% (n=42947) 0.13% (n=6084)
02 gi_iframe (gen) 8.8% (n=60448) 10.2% (n=60052) 5.2% (n=61453) 25.3% (n=190)
03 pr-151614 (cache-ABA) 0.85% (n=99944) 0.61% (n=99963) 0.00% (n=99964) 0.67% (n=99953)
04 shared-leaf (cache-ABA, balanced) 0.89% (n=99940) 0.58% (n=99957) 0.00% (n=99960) 0.64% (n=99971)
2026-06-20T01:59:23.784612000+0200 maurycy@gimel /Users/maurycy/Desktop/pr (main a9ad18d) % ./run.sh ~/work/cpython-main/python.exe ~/work/cpython-pablo/python.exe ~/work/cpython-b792693/python.exe ~/work/cpython/python.exe

########## /Users/maurycy/work/cpython-main/python.exe ##########
Python 3.16.0a0 (heads/main:a8d74c062fe, Jun 19 2026, 15:26:24) [Clang 21.0.0 (clang-2100.1.1.101)]

=== 01_interchunk.py ===
seen=45776 cross=11748 (25.66%)
{'total_samples': 100000, 'frame_cache_hits': 0, 'frame_cache_misses': 0, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 0, 'frames_read_from_memory': 0, 'memory_reads': 908228, 'memory_bytes_read': 159124064, 'code_object_cache_hits': 4477835, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.0, 'code_object_cache_hit_rate': 99.99991067119653, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 02_gi_iframe.py ===
cache=True seen=60448 impossible=5306 (8.8%)
{'total_samples': 100000, 'frame_cache_hits': 53, 'frame_cache_misses': 83325, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 0, 'frames_read_from_memory': 224227, 'memory_reads': 342006, 'memory_bytes_read': 109296528, 'code_object_cache_hits': 320157, 'code_object_cache_misses': 170, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.06356592866223704, 'code_object_cache_hit_rate': 99.94692923169137, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 03_pr151614.py ===
seen=99944 mixed=846 (0.85%)
example mixed: ['burn_b', 'a_leaf', 'a_parent', '<module>']
{'total_samples': 100000, 'frame_cache_hits': 22993, 'frame_cache_misses': 76975, 'frame_cache_partial_hits': 9, 'frames_read_from_cache': 68994, 'frames_read_from_memory': 330762, 'memory_reads': 276943, 'memory_bytes_read': 103570984, 'code_object_cache_hits': 407729, 'code_object_cache_misses': 7, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 23.00729167708573, 'code_object_cache_hit_rate': 99.99828320285675, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 04_sharedleaf.py ===
cache=True seen=99940 impossible=893 (0.89%)
{'total_samples': 100000, 'frame_cache_hits': 22420, 'frame_cache_misses': 77560, 'frame_cache_partial_hits': 4, 'frames_read_from_cache': 44844, 'frames_read_from_memory': 255037, 'memory_reads': 277542, 'memory_bytes_read': 103623696, 'code_object_cache_hits': 332592, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 22.427588414146264, 'code_object_cache_hit_rate': 99.99879733971545, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

########## /Users/maurycy/work/cpython-pablo/python.exe ##########
Python 3.16.0a0 (heads/gh-151613-remote-debugging-frame-cache-aba:fc9fafd7699, Jun 20 2026, 00:31) [Clang 21.0.0 (clang-2100.1.1.101)]

=== 01_interchunk.py ===
seen=44294 cross=13004 (29.36%)
{'total_samples': 100000, 'frame_cache_hits': 0, 'frame_cache_misses': 0, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 0, 'frames_read_from_memory': 0, 'memory_reads': 986327, 'memory_bytes_read': 166796776, 'code_object_cache_hits': 4285518, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.0, 'code_object_cache_hit_rate': 99.99990666247892, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 02_gi_iframe.py ===
cache=True seen=60052 impossible=6154 (10.2%)
{'total_samples': 100000, 'frame_cache_hits': 74, 'frame_cache_misses': 83547, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 3, 'frames_read_from_memory': 223858, 'memory_reads': 341807, 'memory_bytes_read': 110079016, 'code_object_cache_hits': 319599, 'code_object_cache_misses': 177, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.08849451692756605, 'code_object_cache_hit_rate': 99.94464875412788, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 03_pr151614.py ===
seen=99963 mixed=609 (0.61%)
example mixed: ['burn_b', 'a_leaf', 'a_parent', '<module>']
{'total_samples': 100000, 'frame_cache_hits': 21826, 'frame_cache_misses': 78152, 'frame_cache_partial_hits': 6, 'frames_read_from_cache': 65488, 'frames_read_from_memory': 334356, 'memory_reads': 278526, 'memory_bytes_read': 104510288, 'code_object_cache_hits': 412882, 'code_object_cache_misses': 7, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 21.835493678988637, 'code_object_cache_hit_rate': 99.99830462908918, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 04_sharedleaf.py ===
cache=True seen=99957 impossible=576 (0.58%)
{'total_samples': 100000, 'frame_cache_hits': 21738, 'frame_cache_misses': 78239, 'frame_cache_partial_hits': 8, 'frames_read_from_cache': 43484, 'frames_read_from_memory': 256430, 'memory_reads': 278642, 'memory_bytes_read': 104520496, 'code_object_cache_hits': 335070, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 21.749262389358403, 'code_object_cache_hit_rate': 99.99880623384685, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

########## /Users/maurycy/work/cpython-b792693/python.exe ##########
Python 3.16.0a0 (heads/gh-151613-remote-debugging-frame-cache-aba-1-gb792693cde2-dirty:b792693cde) [Clang 21.0.0 (clang-2100.1.1.101)]

=== 01_interchunk.py ===
seen=42947 cross=11504 (26.79%)
{'total_samples': 100000, 'frame_cache_hits': 0, 'frame_cache_misses': 0, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 0, 'frames_read_from_memory': 0, 'memory_reads': 815694, 'memory_bytes_read': 151781072, 'code_object_cache_hits': 4028906, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.0, 'code_object_cache_hit_rate': 99.9999007175638, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 02_gi_iframe.py ===
cache=True seen=61453 impossible=3172 (5.2%)
{'total_samples': 100000, 'frame_cache_hits': 0, 'frame_cache_misses': 83471, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 0, 'frames_read_from_memory': 225035, 'memory_reads': 343117, 'memory_bytes_read': 110194296, 'code_object_cache_hits': 320925, 'code_object_cache_misses': 148, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.0, 'code_object_cache_hit_rate': 99.95390456375965, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 03_pr151614.py ===
seen=99964 mixed=0 (0.00%)
{'total_samples': 100000, 'frame_cache_hits': 22483, 'frame_cache_misses': 77491, 'frame_cache_partial_hits': 3, 'frames_read_from_cache': 67452, 'frames_read_from_memory': 332400, 'memory_reads': 277862, 'memory_bytes_read': 104451856, 'code_object_cache_hits': 410265, 'code_object_cache_misses': 7, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 22.49117296978305, 'code_object_cache_hit_rate': 99.99829381483504, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 04_sharedleaf.py ===
cache=True seen=99960 impossible=1 (0.00%)
{'total_samples': 100000, 'frame_cache_hits': 21883, 'frame_cache_misses': 78102, 'frame_cache_partial_hits': 2, 'frames_read_from_cache': 43768, 'frames_read_from_memory': 256150, 'memory_reads': 278488, 'memory_bytes_read': 104506944, 'code_object_cache_hits': 334643, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 21.887845419904586, 'code_object_cache_hit_rate': 99.99880471063538, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

########## /Users/maurycy/work/cpython/python.exe ##########
Python 3.16.0a0 (heads/maurycy/bye-abba:6024fc7edf6, Jun 20 2026, 00:27:45) [Clang 21.0.0 (clang-2100.1.1.101)]

=== 01_interchunk.py ===
seen=6084 cross=8 (0.13%)
{'total_samples': 100000, 'frame_cache_hits': 0, 'frame_cache_misses': 0, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 0, 'frames_read_from_memory': 0, 'memory_reads': 2671907, 'memory_bytes_read': 315127816, 'code_object_cache_hits': 10596616, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.0, 'code_object_cache_hit_rate': 99.99996225211436, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 02_gi_iframe.py ===
cache=True seen=190 impossible=48 (25.3%)
{'total_samples': 100000, 'frame_cache_hits': 24, 'frame_cache_misses': 209481, 'frame_cache_partial_hits': 0, 'frames_read_from_cache': 48, 'frames_read_from_memory': 563809, 'memory_reads': 710092, 'memory_bytes_read': 142488096, 'code_object_cache_hits': 803475, 'code_object_cache_misses': 431, 'stale_cache_invalidations': 42, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 0.011455573852652681, 'code_object_cache_hit_rate': 99.94638676661202, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 03_pr151614.py ===
seen=99953 mixed=671 (0.67%)
example mixed: ['burn_a', 'b_leaf', 'b_parent', '<module>']
{'total_samples': 100000, 'frame_cache_hits': 26187, 'frame_cache_misses': 76146, 'frame_cache_partial_hits': 6, 'frames_read_from_cache': 78569, 'frames_read_from_memory': 330690, 'memory_reads': 278986, 'memory_bytes_read': 104550768, 'code_object_cache_hits': 407309, 'code_object_cache_misses': 7, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 25.59434819570252, 'code_object_cache_hit_rate': 99.99828143259779, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}

=== 04_sharedleaf.py ===
cache=True seen=99971 impossible=644 (0.64%)
{'total_samples': 100000, 'frame_cache_hits': 25033, 'frame_cache_misses': 77207, 'frame_cache_partial_hits': 6, 'frames_read_from_cache': 50072, 'frames_read_from_memory': 256636, 'memory_reads': 279896, 'memory_bytes_read': 104630848, 'code_object_cache_hits': 334279, 'code_object_cache_misses': 4, 'stale_cache_invalidations': 0, 'batched_read_attempts': 0, 'batched_read_successes': 0, 'batched_read_misses': 0, 'batched_read_segments_requested': 0, 'batched_read_segments_completed': 0, 'frame_cache_hit_rate': 24.48897756391448, 'code_object_cache_hit_rate': 99.99880340908751, 'batched_read_success_rate': 0.0, 'batched_read_segment_completion_rate': 0.0}
2026-06-20T02:06:42.145696000+0200 maurycy@gimel /Users/maurycy/Desktop/pr (main a9ad18d) % 

This reverts commit 6024fc7.
@maurycy maurycy marked this pull request as ready for review June 20, 2026 08:38
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