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: does StartTrace belong? #9710

Closed
rsc opened this issue Jan 28, 2015 · 8 comments
Closed

runtime/pprof: does StartTrace belong? #9710

rsc opened this issue Jan 28, 2015 · 8 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jan 28, 2015

Dmitriy's new tracing has API entry points in runtime/pprof because all the other runtime tracing does. But it's not consumed by pprof and probably belongs somewhere else. Decide.

@rsc rsc self-assigned this Jan 28, 2015
@rsc rsc added this to the Go1.5 milestone Jan 28, 2015
@adg
Copy link
Contributor

adg commented Jan 28, 2015

"runtime/trace"

trace.Start ?

On 29 January 2015 at 02:59, Russ Cox notifications@github.com wrote:

Dmitriy's new tracing has API entry points in runtime/pprof because all
the other runtime tracing does. But it's not consumed by pprof and probably
belongs somewhere else. Decide.


Reply to this email directly or view it on GitHub
#9710.

@dvyukov
Copy link
Member

dvyukov commented Jan 28, 2015

I did it looking at CPU profiling support which is essentially the same.

The design doc also mentions functions that allow to emit user marks into the trace to denote scopes of something or just one-off events (a-la TraceEvent, TraceScopeBegin, TraceScopeEnd). I've already seen two inquiries about this on golang-nuts.

So StartTrace/EndTrace + TraceEvent/TraceScopeBegin/TraceScopeEnd can make a case for runtime/trace package.

@dvyukov
Copy link
Member

dvyukov commented Jul 19, 2015

Hi Russ,

We need to decide on this asap.

People continue to ask about user-emitted events in traces. Some people also proposed some options for tracing, like disable stack collection.
We don't need to decide on all that for 1.5, I am sure we will have more trace-related functions in future, so it can make sense to move all trace-related functions to runtime/trace before the release.

@rsc
Copy link
Contributor Author

rsc commented Jul 21, 2015

https://golang.org/cl/8552 does not mention this issue but should.

@dvyukov
Copy link
Member

dvyukov commented Jul 21, 2015

Humm... I can't change that change anymore:

$ git checkout master
$ git checkout -b trace_pkg
$ git fetch https://go.googlesource.com/go refs/changes/52/8552/3 && git cherry-pick FETCH_HEAD
$ git change
git rev-parse --abbrev-ref trace_pkg@{u}
fatal: no upstream configured for branch 'trace_pkg'
git-codereview: exit status 128

@josharian
Copy link
Contributor

@dvyukov try running git branch -u master trace_pkg after git checkout -b trace_pkg

@dvyukov
Copy link
Member

dvyukov commented Jul 22, 2015

I've mailed a new change https://go-review.googlesource.com/#/c/12511/ that just moves StartTrace/StopTrace to the new package.
8552 was more about new tracing APIs and is now cluttered with lots of unrelated stuff.

@gopherbot
Copy link

CL https://golang.org/cl/12511 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 5, 2016
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants