Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/pprof, runtime/trace: stub some additional functions #3117

Merged
merged 1 commit into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 13 additions & 2 deletions src/runtime/pprof/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import (

var ErrUnimplemented = errors.New("runtime/pprof: unimplemented")

type Profile struct {
}
type Profile struct{}

func StartCPUProfile(w io.Writer) error {
return nil
Expand All @@ -28,6 +27,18 @@ func Lookup(name string) *Profile {
return nil
}

func (p *Profile) Name() string {
return ""
}

func (p *Profile) Count() int {
return 0
}

func (p *Profile) WriteTo(w io.Writer, debug int) error {
return ErrUnimplemented
}

func Profiles() []*Profile {
return nil
}
13 changes: 13 additions & 0 deletions src/runtime/trace/trace.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Stubs for the runtime/trace package
package trace

import (
"errors"
"io"
)

func Start(w io.Writer) error {
return errors.New("not implemented")
}

func Stop() {}