Skip to content

[Based on #101] debug: add LLDB goroutine views - #103

Open
cpunion wants to merge 2 commits into
codex/lldb-map-chan-20260801from
codex/lldb-goroutines-20260801
Open

[Based on #101] debug: add LLDB goroutine views#103
cpunion wants to merge 2 commits into
codex/lldb-map-chan-20260801from
codex/lldb-goroutines-20260801

Conversation

@cpunion

@cpunion cpunion commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • add llgo goroutines, backed by a versioned live-G list read by LLDB without executing inferior code
  • report each live goroutine state, parent ID, and G/M/P ownership
  • keep O(1) registration/removal correct for runtime-owned and lazily-created G lifecycles
  • read every goroutine field and status name from the common debugger schema
  • fix G/M/P ID allocation for the old-value semantics of LLGo atomic fetch-add

Advances xgo-dev#2164 and xgo-dev#2154. Goroutine backtraces remain in the dependent #106. Based on #101.

Tests

  • macOS arm64, Apple LLDB 1703: 275/275
  • macOS and Linux amd64: runtime G/M/P and live-G lifecycle tests
  • macOS and Linux amd64: go test ./cmd/internal/lldb ./cmd/llgo
  • cmd/internal/lldb coverage: 87.5%
  • Python syntax check and git diff --check

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

53b1e7c82063 | workflow run | long-term charts

Program measurements

Platform Workload File size vs main Build vs main Run vs main
Linux cprintf 18640 B +0.5% (worse) 345.491 ms -16.2% (better) 1.299 ms -16.3% (better)
Linux fmtprintf 2218464 B +0.2% (worse) 3.345 s -13.2% (better) 2.453 ms -25.4% (better)
Linux println 72088 B -0.8% (better) 352.633 ms -11.9% (better) 1.632 ms -2.5% (better)
macOS cprintf 84672 B +0.0% 304.068 ms -26.6% (better) 2.281 ms -36.4% (better)
macOS fmtprintf 2361632 B +0.7% (worse) 2.599 s -34.0% (better) 17.959 ms -23.2% (better)
macOS println 125824 B -1.0% (better) 293.627 ms -29.2% (better) 3.182 ms -56.2% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs main
Linux BenchmarkLookupPCRandom 13.230 ns/op -1.9% (better)
Linux BenchmarkMergeCompilerFlags 154.600 ns/op +0.1% (worse)
Linux BenchmarkMergeLinkerFlags 99.730 ns/op -1.5% (better)
Linux BenchmarkChannelBuffered 35.210 ns/op +1.3% (worse)
Linux BenchmarkChannelHandoff 27993 ns/op -12.6% (better)
Linux BenchmarkDefer 43.630 ns/op -22.5% (better)
Linux BenchmarkDirectCall 1.556 ns/op -0.4% (better)
Linux BenchmarkGlobalRead 1.556 ns/op -0.3% (better)
Linux BenchmarkGlobalWrite 2.481 ns/op -0.5% (better)
Linux BenchmarkGoroutine 31879 ns/op -57.8% (better)
Linux BenchmarkInterfaceCall 8.096 ns/op +3.9% (worse)
Linux BenchmarkRuntimeGetG 2.177 ns/op -59.0% (better)
macOS BenchmarkLookupPCRandom 11.220 ns/op -9.8% (better)
macOS BenchmarkMergeCompilerFlags 127.500 ns/op +2.4% (worse)
macOS BenchmarkMergeLinkerFlags 74.920 ns/op +8.0% (worse)
macOS BenchmarkChannelBuffered 20.550 ns/op -25.9% (better)
macOS BenchmarkChannelHandoff 6530 ns/op -6.8% (better)
macOS BenchmarkDefer 24.940 ns/op -33.4% (better)
macOS BenchmarkDirectCall 0.945 ns/op -35.0% (better)
macOS BenchmarkGlobalRead 0.988 ns/op -18.4% (better)
macOS BenchmarkGlobalWrite 1.035 ns/op -30.4% (better)
macOS BenchmarkGoroutine 22325 ns/op -29.5% (better)
macOS BenchmarkInterfaceCall 4.081 ns/op -24.4% (better)
macOS BenchmarkRuntimeGetG 1.889 ns/op -26.7% (better)

Compared only with the latest matching platform in the main series.

Warning

  • Persistent publishing is unavailable because no data token is configured.

@cpunion
cpunion force-pushed the codex/lldb-map-chan-20260801 branch from 46b4987 to d80af74 Compare August 1, 2026 22:29
@cpunion
cpunion force-pushed the codex/lldb-goroutines-20260801 branch from a556c58 to 619bdd3 Compare August 1, 2026 23:34
@cpunion
cpunion force-pushed the codex/lldb-map-chan-20260801 branch from d80af74 to d25ed33 Compare August 2, 2026 07:05
@cpunion
cpunion force-pushed the codex/lldb-goroutines-20260801 branch from 53b1e7c to 843ea17 Compare August 2, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant