Skip to content

runtime, runtime/pprof: add Func.Entry and goroutine-label stubs - #5646

Open
0pcom wants to merge 1 commit into
tinygo-org:devfrom
0magnet:runtime-entry-pprof-stubs
Open

runtime, runtime/pprof: add Func.Entry and goroutine-label stubs#5646
0pcom wants to merge 1 commit into
tinygo-org:devfrom
0magnet:runtime-entry-pprof-stubs

Conversation

@0pcom

@0pcom 0pcom commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Two source-compatibility fills, surfaced compiling larger Go programs under TinyGo:

  • runtime.Func.Entry: stubbed like the rest of runtime.Func; testify's mock package calls FileLine(f.Entry()).
  • runtime/pprof goroutine-label API (Labels, Label, ForLabels, WithLabels, SetGoroutineLabels, Do): inert stubs alongside the existing pprof stubs; google.golang.org/grpc references them. Do still calls f — labels are simply not attached.

Verified on linux/amd64: a program exercising all of the above builds and runs (Entry returns 0 like its siblings, Do invokes its function, Label reports absent).

🤖 Generated with Claude Code

https://claude.ai/code/session_01C3X3gvq8ZggMRvzVzWm66i

Two source-compatibility fills, surfaced compiling larger Go programs
under TinyGo:

- runtime.Func.Entry: stubbed like the rest of runtime.Func; testify's
  mock package calls FileLine(f.Entry()).
- runtime/pprof goroutine-label API (Labels, Label, ForLabels,
  WithLabels, SetGoroutineLabels, Do): inert stubs alongside the existing
  pprof stubs; google.golang.org/grpc references them. Do still calls f,
  labels are simply not attached.
@0pcom
0pcom force-pushed the runtime-entry-pprof-stubs branch from c2a7a18 to b96d520 Compare September 2, 2026 08:15
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