Skip to content

Commit 9af0dea

Browse files
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 <[email protected]>
1 parent 9e99ed5 commit 9af0dea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/Profile/src/Profile.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Profiling support.
99
- `@profile foo()` to profile a specific call.
1010
- `Profile.print()` to print the report. Paths are clickable links in supported terminals and specialized for JULIA_EDITOR etc.
1111
- `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.
1313
1414
## Memory profiling
1515
- `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

Comments
 (0)