Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2870ba8
build: add Go-style pclntab findfunc index
cpunion Jul 1, 2026
f365b73
ssa: emit DCE-safe function metadata
cpunion Jun 28, 2026
e81a007
runtime: add line info for stack frames
cpunion Jun 29, 2026
1e15db2
runtime: add statement line caller frames
cpunion Jun 29, 2026
407e0dd
runtime: compress funcinfo table
cpunion Jun 30, 2026
a3115cd
test: cover indirect runtime caller paths
cpunion Jun 30, 2026
c6c128a
cl: narrow runtime caller tracking
cpunion Jun 30, 2026
4692e15
runtime: add compact pc-line funcinfo table
cpunion Jun 30, 2026
b29906c
runtime: optimize FuncForPC metadata lookup
cpunion Jun 30, 2026
734368f
runtime: slim FuncForPC cache hot path
cpunion Jun 30, 2026
85b1c13
cl: make pc-line labels clone-safe
cpunion Jun 30, 2026
b33a774
runtime: guard funcinfo table initialization
cpunion Jul 1, 2026
8e6f33c
runtime: fix funcinfo entry pc line metadata
cpunion Jul 1, 2026
8eec8e0
runtime: publish funcinfo records for live stubs
cpunion Jul 1, 2026
01913f4
runtime: skip ELF stub-site records during LTO
cpunion Jul 1, 2026
6fa875b
runtime: reduce funcinfo lookup initialization cost
cpunion Jul 1, 2026
34b274c
test: cover runtime caller metadata edges
cpunion Jul 1, 2026
3b87c90
runtime: speed up funcinfo entry lookup
cpunion Jul 1, 2026
012095b
test: cover pcline metadata in dev lto coverage
cpunion Jul 1, 2026
9d90419
runtime: speed up funcinfo hot paths
cpunion Jul 1, 2026
1b8bc56
runtime: avoid FuncForPC cache thrashing
cpunion Jul 1, 2026
cf33354
runtime: use Go-style funcinfo find index
cpunion Jul 1, 2026
bb1b1a3
runtime: use static funcinfo symbol index
cpunion Jul 2, 2026
e7cffef
benchmark: add runtime funcinfo benchmark harness
cpunion Jul 2, 2026
7eed0d0
build,cl: emit funcinfo site sections on Mach-O
cpunion Jul 2, 2026
e0aefe1
runtime: cut funcinfo first-use latency and index degradation
cpunion Jul 2, 2026
7976022
runtime: memoize synthetic PCs in Caller/Callers hot paths
cpunion Jul 2, 2026
3912534
runtime: reuse FuncForPC cache in Frames.Next; document LTO inline-co…
cpunion Jul 2, 2026
878bce8
build: document why body-embedded site records resist LTO dedup
cpunion Jul 2, 2026
bdad60e
doc: design for link-phase ftab/findfunctab generation
cpunion Jul 2, 2026
23ce12b
runtime: nanosecond monotonic clock on darwin and linux
cpunion Jul 2, 2026
35b7705
build: disable funcinfo metadata emission in debug builds
cpunion Jul 2, 2026
b04b0a9
build,ssa,cl: gate only site records off in debug builds
cpunion Jul 2, 2026
ab7e17f
runtime: keep unresolved-entry frames out of the FuncForPC cache
cpunion Jul 2, 2026
8e9c921
build: add LLGO_FUNCINFO_SITES to toggle site records independently
cpunion Jul 2, 2026
82fed99
ci: make patch coverage reflect product code; cover pclntab edge paths
cpunion Jul 3, 2026
4e5d53a
ci: upload coverage from both platforms
cpunion Jul 3, 2026
ded3c74
build: sweep funcinfo emission across OS/pointer-size/content matrix
cpunion Jul 3, 2026
83edf88
ci: exclude dev tools and test scaffolding from coverage
cpunion Jul 3, 2026
386e176
chore/pclnpost: link-phase ftab prototype (P1)
cpunion Jul 2, 2026
8558798
runtime,chore/pclnpost: P2 — prebuilt table write-back and zero-copy …
cpunion Jul 2, 2026
5dcf838
build,runtime,pclnpost: P2 complete — automatic link-phase functab
cpunion Jul 2, 2026
781575a
pclnpost: resolve Mach-O bind-encoded site records into the prebuilt …
cpunion Jul 2, 2026
629a604
benchmark: add plain ordinary-code scenario to runtime_funcinfo
cpunion Jul 2, 2026
7ab0a84
doc: record P3 findings in pclntab-linkphase design
cpunion Jul 2, 2026
b8078d4
benchmark: keep full LTO from constant-folding the plain fib probe
cpunion Jul 2, 2026
64ae326
runtime: pre-warm the prebuilt function table at startup
cpunion Jul 2, 2026
2565fd0
benchmark: scale dimensions — call depth and big-method scenarios
cpunion Jul 2, 2026
5e9f6b8
pclnpost,runtime: fix two scale cliffs found by the 96x96 benchmarks
cpunion Jul 2, 2026
d9873a0
pclnpost,runtime: spill the prebuilt blob into the stub section on ov…
cpunion Jul 2, 2026
41d6be0
runtime: exact-entry FuncForPC lookup must not require pc alignment
cpunion Jul 3, 2026
3a71cac
pclnpost: never degrade to a table with stub gaps
cpunion Jul 3, 2026
aa4ef20
pclnpost: unit-test record decoding, dedupe, ELF rewrite and fixup su…
cpunion Jul 3, 2026
fc3a21b
pclnpost,build: Mach-O fixture tests; only re-sign signed binaries
cpunion Jul 3, 2026
861f443
runtime,ssa,cl: LLGo-owned frame-pointer unwinder (Stage 5)
cpunion Jul 3, 2026
699a3dd
test: goldens and probes for the FP unwinder
cpunion Jul 3, 2026
4925b82
doc: stage5 invariants, diagnostic traps and merge queue
cpunion Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ jobs:
- name: Build
run: go build -v ./...

- name: Test
if: ${{!startsWith(matrix.os, 'macos')}}
run: go test -timeout 30m ./...

# Both platforms upload coverage: OS-specific paths (ELF vs Mach-O
# emission, per-OS runtime shims) are otherwise invisible to
# codecov/patch and fail it on lines only the other OS executes.
- name: Test with coverage
if: startsWith(matrix.os, 'macos')
run: go test -timeout 30m -coverprofile="coverage.txt" -covermode=atomic ./...

- name: Test with embedded emulator env
Expand Down
2 changes: 2 additions & 0 deletions benchmark/runtime_funcinfo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
out/
out-*
62 changes: 62 additions & 0 deletions benchmark/runtime_funcinfo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Runtime Funcinfo Benchmark

This benchmark keeps runtime funcinfo measurements comparable across branches by
generating the same probe programs and rebuilding them with each compiler/root
pair in one run.

It covers:

- hot runtime metadata calls: `Caller`, `Callers`, `CallersFrames`,
`FuncForPC`, and `Func.FileLine`.
- deep stacks through direct calls, interface calls, and closures.
- many packages and methods, generated from configurable package/method counts.
- cold first-use runtime metadata paths, including lazy table initialization.
- a stdlib-heavy program with `encoding/json`, `text/template`, `regexp`,
`go/parser`, `go/token`, and `net/netip` imports.
- ordinary code (`plain`): pure-compute probes (recursive `fib`, JSON
round-trip, `sort.Ints`, map churn) with no runtime introspection at all,
measuring what the funcinfo machinery costs code that never asks for it.

Generated modules use `example.com/llgo-bench/...` import paths. This is
intentional: LLGo does not enable caller-frame tracking for stdlib-shaped paths
without a dot, and that would benchmark the fallback path instead of normal
third-party package behavior.

Example:

```sh
go run ./benchmark/runtime_funcinfo \
-runs=11 \
-llgo-opt=2 \
-variant go=go \
-variant main=llgo,/path/to/llgo-main,/path/to/llgo-main-root \
-variant 2002=llgo,/path/to/llgo-2002,/path/to/llgo-2002-root \
-variant 2009=llgo,/path/to/llgo-2009,/path/to/llgo-2009-root \
-variant 2010=llgo,/path/to/llgo-2010,/path/to/llgo-2010-root
```

Add `-include-lto` to build an additional `+lto` variant for every LLGo
compiler. LLGo builds use `-O2` by default; pass `-llgo-opt=` to omit the
optimization flag. Add `-scales=6x6,12x12,24x24` to generate separate
`multipkg_*` and `cold_*` scenarios for several package/function counts in one
run. Output is written to `benchmark/runtime_funcinfo/out` by default:

- `summary.md`: markdown performance and size tables.
- `results.json`: raw build and run data.
- `work/`: generated probe modules.
- `bin/`: generated executables.

Performance cells are `best/trimmed avg` from process-level runs. The trimmed
average drops one minimum and one maximum when at least three runs are present.
`-iters` is a base iteration count: `hot` uses the full count, `deep` uses a
quarter, `multipkg`/`stdlib` use one twentieth, and `plain` uses 1/2000
because each operation does substantially more work.

`multipkg.FuncForPCMany` and `multipkg.FileLineMany` are batch metrics over all
generated target functions (`-packages * -methods`, 144 targets with the default
settings), not single-lookup timings.

`cold.First*` metrics are single measurements from a fresh process and include
lazy runtime initialization that has not already happened in that process.
`cold.WarmFuncForPCMany` and `cold.WarmFileLineMany` use the same batch target
count as `multipkg`.
Loading
Loading