-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignals_windows.go
More file actions
25 lines (19 loc) · 876 Bytes
/
signals_windows.go
File metadata and controls
25 lines (19 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//go:build windows
package main
import "fmt"
// Windows does not support SIGUSR1 signal as linux does
// to get dump of running goroutines to file: goroutines.prof
// so in windows we do nothing here
// This is a placeholder function to maintain compatibility with other platforms.
// It is safe to call this function on Windows, but it will not perform any action.
// It is recommended to use the '-prof and/or -profweb' cmdline flag'
// to analyze CPU and memory profiles on Windows.
func setupSigusr1Dump() {
if runProf || webProf != "" {
fmt.Println("Pprof CPU/MEM profiling is enabled.")
fmt.Printf("If started with -profweb open your browser to %s to view the profile in a web browser.\n", webProf)
} else {
fmt.Println("SIGUSR1 signal is not supported on Windows. Use -prof and/or -profweb cmdline flags to analyze CPU and memory profiles.")
}
return
}