Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b2bbb47
ssa: emit DCE-safe function metadata
cpunion Jun 28, 2026
94b2350
runtime: add line info for stack frames
cpunion Jun 29, 2026
a7f0383
runtime: add statement line caller frames
cpunion Jun 29, 2026
7de6c56
runtime: compress funcinfo table
cpunion Jun 30, 2026
29164c0
test: cover indirect runtime caller paths
cpunion Jun 30, 2026
300e8bb
test: yield during makefunc GC stress
cpunion Jun 30, 2026
3f905e9
cl: narrow runtime caller tracking
cpunion Jun 30, 2026
c9286be
runtime: add compact pc-line funcinfo table
cpunion Jun 30, 2026
0a7b3f4
runtime: optimize FuncForPC metadata lookup
cpunion Jun 30, 2026
4237d69
runtime: slim FuncForPC cache hot path
cpunion Jun 30, 2026
5a78b12
cl: make pc-line labels clone-safe
cpunion Jun 30, 2026
cffaa09
ci: extend macos coverage timeout
cpunion Jun 30, 2026
9d0f94b
runtime: guard funcinfo table initialization
cpunion Jul 1, 2026
e804579
runtime: fix funcinfo entry pc line metadata
cpunion Jul 1, 2026
0635667
runtime: publish funcinfo records for live stubs
cpunion Jul 1, 2026
7f3c051
runtime: skip ELF stub-site records during LTO
cpunion Jul 1, 2026
e93b232
runtime: reduce funcinfo lookup initialization cost
cpunion Jul 1, 2026
7b24442
test: cover runtime caller metadata edges
cpunion Jul 1, 2026
3323f2e
runtime: speed up funcinfo entry lookup
cpunion Jul 1, 2026
1f48fc3
test: cover pcline metadata in dev lto coverage
cpunion Jul 1, 2026
f8cf01e
runtime: speed up funcinfo hot paths
cpunion Jul 1, 2026
1f26921
benchmark: add runtime funcinfo comparison runner
cpunion Jul 1, 2026
89837e4
runtime: avoid FuncForPC cache thrashing
cpunion Jul 1, 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
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:

- name: Test with coverage
if: startsWith(matrix.os, 'macos')
run: go test -timeout 30m -coverprofile="coverage.txt" -covermode=atomic ./...
run: go test -timeout 45m -coverprofile="coverage.txt" -covermode=atomic ./...

- name: Test with embedded emulator env
env:
Expand Down
1 change: 1 addition & 0 deletions benchmark/runtime_funcinfo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
out/
52 changes: 52 additions & 0 deletions benchmark/runtime_funcinfo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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.
- a stdlib-heavy program with `encoding/json`, `text/template`, `regexp`,
`go/parser`, `go/token`, and `net/netip` imports.

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. 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, and `multipkg`/`stdlib` use one twentieth 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.
Loading
Loading