diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-09-16 10:37:45 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-16 10:37:45 -0700 |
commit | eb07b91e61ca47ecf6b9b3122a5527817cc74211 (patch) | |
tree | 33e01231ca302605a9b1399aa998a26a5fb754ff /pkg/sentry/kernel/task_log.go | |
parent | 477d7e5e10378e2f80f21ac9f536d12c4b94d7ce (diff) | |
parent | bd296e799bd3eceaa3c3f3db1227f9dba62bb1a1 (diff) |
Merge pull request #6579 from prattmic:runsc_do_profile
PiperOrigin-RevId: 397114051
Diffstat (limited to 'pkg/sentry/kernel/task_log.go')
-rw-r--r-- | pkg/sentry/kernel/task_log.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/task_log.go b/pkg/sentry/kernel/task_log.go index 8de08151a..c5b099559 100644 --- a/pkg/sentry/kernel/task_log.go +++ b/pkg/sentry/kernel/task_log.go @@ -249,5 +249,9 @@ func (t *Task) traceExecEvent(image *TaskImage) { return } defer file.DecRef(t) - trace.Logf(t.traceContext, traceCategory, "exec: %s", file.PathnameWithDeleted(t)) + + // traceExecEvent function may be called before the task goroutine + // starts, so we must use the async context. + name := file.PathnameWithDeleted(t.AsyncContext()) + trace.Logf(t.traceContext, traceCategory, "exec: %s", name) } |