Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,179 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
compilers, performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:jit found-by:critic kind:gate-defect

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:

  1. Back-edges are not counted. back_edge_count is tracked per chunk and ignored by the aggregate.
  2. OSR coverage is not counted. The advance term uses jit_advance only. A chunk whose work is entirely inside an OSR thunk (osr=yes, oadv=61 above) 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.

Ngôn ngữ chính
C
Star
3
Fork
7
Merge trung bình
4 giờ 15 phút
Pull request đã merge (30 ngày)
106

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của InauguralSystems/EigenScript

Tất cả issue của InauguralSystems/EigenScript

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.