-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
runsc: add global profile collection flags #6579
Conversation
91419a5
to
1548f5a
Compare
1548f5a
to
4cc534c
Compare
Thanks for doing this! Being able to directly profile for the duration of a container execution will be really useful. Also @zkoopmans you might be interested in this change, afaik the current benchmarking library uses runsc debug and parallely runs the container. This might be a better way of collecting profiles. |
4cc534c
to
ad052b7
Compare
@ayushr2 updating the website is a good idea. I'll send another PR for that. |
Add global flags -profile-{block,cpu,heap,mutex} and -trace which enable collection of the specified profile for the entire duration of a container execution. This provides a way to definitively start profiling before that application starts, rather than attempting to race with an out-of-band `runsc debug`. Note that only the main boot process is profiled. Fixes #220 FUTURE_COPYBARA_INTEGRATE_REVIEW=#6579 from prattmic:runsc_do_profile ad052b71469658032cff5f8a95f482156976c66f PiperOrigin-RevId: 396660344
Add global flags -profile-{block,cpu,heap,mutex} and -trace which enable collection of the specified profile for the entire duration of a container execution. This provides a way to definitively start profiling before that application starts, rather than attempting to race with an out-of-band `runsc debug`. Note that only the main boot process is profiled. This exposed a bug in Task.traceExecEvent: a crash when tracing and -race are enabled. traceExecEvent is called off of the task goroutine, but uses the Task as a context, which is a violation of the Task contract. Switching to the AsyncContext fixes the issue. Fixes google#220
ad052b7
to
bd296e7
Compare
Add global flags -profile-{block,cpu,heap,mutex} and -trace which
enable collection of the specified profile for the entire duration of a
container execution. This provides a way to definitively start profiling
before that application starts, rather than attempting to race with an
out-of-band
runsc debug
.Note that only the main boot process is profiled.
Fixes #220