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
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- compilers, performance
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 4時間 15分
- マージ済み PR(30日)
- 106
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
area:lint-tooling bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
InauguralSystems/EigenScript#1340 ·
メンテナーはふだん 1 日以内に返信
-
area:stdlib found-by:code-review kind:silent-wrong
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
InauguralSystems/EigenScript#1338 ·
メンテナーはふだん 1 日以内に返信
-
area:lint-tooling found-by:critic kind:docs-drift
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InauguralSystems/EigenScript#1335 ·
メンテナーはふだん 1 日以内に返信
-
area:ci found-by:critic kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
InauguralSystems/EigenScript#1311 ·
メンテナーはふだん 1 日以内に返信
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetオープンarea:gates found-by:critic kind:decision
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
InauguralSystems/EigenScript#1280 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/ebpf-for-windows#5604 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
AcademySoftwareFoundation/openexr#2683 ·
メンテナーはふだん 1 日以内に返信