Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/runtime/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4642,7 +4642,8 @@ func setcpuprofileconfig(eventId cpuEvent, profConfig *cpuProfileConfig) {
// Restore SIGPROF only if all events are stopped
eventsRunning := false
for i := _CPUPROF_FIRST_EVENT; i < _CPUPROF_EVENTS_MAX; i++ {
if prof[i].config != nil {
// If the current event is the last event to be stopped, we should also restore SIGPROF too.
if prof[i].config != nil && i != eventId {
eventsRunning = true
break
}
Expand Down