JIT: the EIGS_JIT_HOT 'native-byte share' metric weights chunks by frame entries, ignoring back-edges and OSR — reads 100% on a program that is ~0% native by that measure
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- compilers, performance
Direzione di ricerca
Reproduce the EIGS_JIT_HOT output with tests/bench_dmg_shape.eigs, then trace the aggregate’s use of exec_count, advance, back_edge_count, and OSR coverage. Establish whether the metric can defensibly represent executed native and total bytes, including loop back-edges and OSR thunks, and verify that the resulting report no longer gives the documented misleading share or that the metric is removed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The native-byte share aggregate at the foot of the EIGS_JIT_HOT dump weights every chunk by exec_count — frame entries — when the quantity it claims to report is executed bytecode bytes:
bytes_native += r->exec_count * (uint64_t)r->advance;
bytes_total += r->exec_count * (uint64_t)r->code_len;
A chunk entered once that then runs a hot loop for 565k back-edges contributes 1 * code_len. On tests/bench_dmg_shape.eigs that is the whole program:
<module> 1 ? 0.0% 0 636 0.0% 565536 yes 61 56 <end>
native-byte share (top 9 hot): 100.0% (all 9 chunks): 100.0%
The 100% is an artifact — the module's 565k loop iterations count as 636 bytes against 17.6M from the opN callees, so the one chunk that dominates the run is rounded out of the metric.
Two errors compound:
- Back-edges are not counted.
back_edge_countis tracked per chunk and ignored by the aggregate. - OSR coverage is not counted. The
advanceterm usesjit_advanceonly. A chunk whose work is entirely inside an OSR thunk (osr=yes,oadv=61above) scores 0% native while running native.
So the number that should answer "would extending the JIT prefix pay?" understates loop-heavy programs and overstates call-heavy ones. On DMG it reads 46.0% — and perf says 9.9% of samples are actually in JIT'd code, so it is not usable as a proxy for time either.
A defensible version weights each chunk's native/total bytes by an estimate of bytes actually executed (entries for straight-line prefixes, back-edges for loop bodies, and the OSR thunk's advance where an OSR slot is live), or the metric is dropped in favour of the perf attribution it is trying to approximate.
Context: the dump itself only started producing output again in #1176 — this metric has never been read against a real workload.
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 4h 7m
- PR unite (30g)
- 112
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InauguralSystems/EigenScript
-
area:embed kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#1387 ·
I maintainer di solito rispondono entro 1 giorno
-
area:stdlib kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
InauguralSystems/EigenScript#1378 ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates kind:gate-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#1374 ·
I maintainer di solito rispondono entro 1 giorno
-
Error carets pad multi-byte UTF-8 byte-for-byte, so the ^ lands right of the token on a terminalApertaarea:lint-tooling kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
InauguralSystems/EigenScript#1373 ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates kind:docs-drift
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
InauguralSystems/EigenScript#1372 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
BasedHardware/omi#19711 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
microsoft/ebpf-for-windows#5604 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
trezor/trezor-firmware#7985 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 2 giorni