You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Profile: mention kill -s SIGUSR1 julia_pid for Linux (#56441)
currentlu this route is mentioned in docs
https://docs.julialang.org/en/v1/stdlib/Profile/#Triggered-During-Execution
but missing from the module docstring, this should help users who have
little idea how to "send a kernel signal to a process" to get started
---------
Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
Copy file name to clipboardExpand all lines: stdlib/Profile/src/Profile.jl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Profiling support.
9
9
- `@profile foo()` to profile a specific call.
10
10
- `Profile.print()` to print the report. Paths are clickable links in supported terminals and specialized for JULIA_EDITOR etc.
11
11
- `Profile.clear()` to clear the buffer.
12
-
- Send a $(Sys.isbsd() ?"SIGINFO (ctrl-t)":"SIGUSR1") signal to the process to automatically trigger a profile and print.
12
+
- Send a SIGUSR1 (on linux) or SIGINFO (on macOS/BSD) signal to the process to automatically trigger a profile and print. i.e. `kill -s SIGUSR1/SIGINFO 1234`, where 1234 is the pid of the julia process. On macOS & BSD platforms `ctrl-t` can be used directly.
13
13
14
14
## Memory profiling
15
15
- `Profile.Allocs.@profile [sample_rate=0.1] foo()` to sample allocations within a specific call. A sample rate of 1.0 will record everything; 0.0 will record nothing.
0 commit comments