-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
profiler: not collecting CPU data for Go code in a c-archive #993
Comments
@jqll FYI |
After reading more about signal.Notify (and how it chains vs. replaces), I was able to remedy my immediate problem by putting this code immediately before the call to profiler.Start:
I don't know if that's the correct way or if there's some way that you want to address this in the profiler library. I just didn't realize the behavior of signal.Notify. |
Does the code inside of the goroutine here ever execute? I have a feeling that SIGPROF is handled by the runtime so just |
Honestly, I didn't know and didn't want something to block unnecessarily, so I was being super cautious. I will change it to your code. Thanks! (Maybe this should make it into the docs as to how to properly do this for this case?) |
@aalexand Your proposed change works just fine. A lot simpler! |
Client
Profiler
Describe Your Environment
Ubuntu on GKE, Go code is built with
-buildmode=c-archive
. C++ program is calling the built Go archive.Expected Behavior
I expect to be able to see, for my Go code: CPU, Heap, Contention, and Threads profiles.
Actual Behavior
I see, for my Go code: Heap, Contention, and Threads profiles. The CPU profile is missing.
I know that the docs for pprof note that:
I'm happy with those limitations. I just need to know how to turn this on in the context of using the stackdriver profiler.
The text was updated successfully, but these errors were encountered: