Skip to content

add Running and LastSched to debug=3 - #15

Draft
srosenberg wants to merge 1 commit into
cockroach-go1.25.5from
sr/add_running_nanos_to_profile_record
Draft

add Running and LastSched to debug=3#15
srosenberg wants to merge 1 commit into
cockroach-go1.25.5from
sr/add_running_nanos_to_profile_record

Conversation

@srosenberg

Copy link
Copy Markdown
Member

In [1], StackRecord was extended with
extra fields for goroutine profiles
in conjunction with debug=3.

To facilitate troubleshooting
scheduling delays, it's instructive
to include both Running and LastSched.
The latter is the time since the goroutine's
last transition to the running state; the former
is an approximate time spent in the running state. Both fields are in g and thus require no computation.

Since the above are in nanos, we also modify WaitSince to be in nanos. Previous caller, i.e., goroutineheader is updated to keep the minutes resolution.

[1] #12

extra fields for goroutine profiles
in conjunction with debug=3.

To facilitate troubleshooting
scheduling delays, it's instructive
to include both `Running` and `LastSched`.
The latter is the time since the goroutine's
last transition to the running state; the former
is an approximate time spent in the running state.
Both fields are in `g` and thus require no computation.

Since the above are in nanos, we also modify `WaitSince`
to be in nanos. Previous caller, i.e., `goroutineheader`
is updated to keep the minutes resolution.

[1] #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant