From 4806f28091d3282435d4d0c07f93fe328121ee82 Mon Sep 17 00:00:00 2001 From: Moelf Date: Mon, 4 Nov 2024 12:17:24 -0500 Subject: [PATCH 1/4] mention `kill -s SIGUSR1 julia_pid` for Linux --- stdlib/Profile/src/Profile.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index bea8f288937d0..dfd5300da2622 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -9,7 +9,7 @@ Profiling support. - `@profile foo()` to profile a specific call. - `Profile.print()` to print the report. Paths are clickable links in supported terminals and specialized for JULIA_EDITOR etc. - `Profile.clear()` to clear the buffer. -- Send a $(Sys.isbsd() ? "SIGINFO (ctrl-t)" : "SIGUSR1") signal to the process to automatically trigger a profile and print. +- Send a $(Sys.isbsd() ? "SIGINFO (ctrl-t)" : "SIGUSR1") signal to the process to automatically trigger a profile and print. On Linux it can be done with `kill -s SIGUSR1 $julia_pid`. ## Memory profiling - `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. From dd2a6c0330dd95567fbcf91ed504e1aaf2de19f1 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Mon, 4 Nov 2024 13:14:13 -0500 Subject: [PATCH 2/4] Update stdlib/Profile/src/Profile.jl Co-authored-by: Ian Butterworth --- stdlib/Profile/src/Profile.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index dfd5300da2622..7889ca49b7ba7 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -9,7 +9,7 @@ Profiling support. - `@profile foo()` to profile a specific call. - `Profile.print()` to print the report. Paths are clickable links in supported terminals and specialized for JULIA_EDITOR etc. - `Profile.clear()` to clear the buffer. -- Send a $(Sys.isbsd() ? "SIGINFO (ctrl-t)" : "SIGUSR1") signal to the process to automatically trigger a profile and print. On Linux it can be done with `kill -s SIGUSR1 $julia_pid`. +- Send a SIGUSR1 (on linux) or SIGINFO (on macOS) signal to the process to automatically trigger a profile and print. i.e. `kill -s SIGUSR1/SIGINFO $julia_pid`. On macOS & BSD platforms `ctrl-t` can be used directly. ## Memory profiling - `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. From ee03e23e16a4c2052369b85e83e773b177a29c6e Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Mon, 4 Nov 2024 16:00:27 -0500 Subject: [PATCH 3/4] Update stdlib/Profile/src/Profile.jl Co-authored-by: Ian Butterworth --- stdlib/Profile/src/Profile.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index 7889ca49b7ba7..0de602dfee025 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -9,7 +9,7 @@ Profiling support. - `@profile foo()` to profile a specific call. - `Profile.print()` to print the report. Paths are clickable links in supported terminals and specialized for JULIA_EDITOR etc. - `Profile.clear()` to clear the buffer. -- Send a SIGUSR1 (on linux) or SIGINFO (on macOS) signal to the process to automatically trigger a profile and print. i.e. `kill -s SIGUSR1/SIGINFO $julia_pid`. On macOS & BSD platforms `ctrl-t` can be used directly. +- Send a SIGUSR1 (on linux) or SIGINFO (on macOS) 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. ## Memory profiling - `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. From b1084c3f225c208bd8fcb941e57d9e5a9ecd49e8 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 4 Nov 2024 17:53:40 -0500 Subject: [PATCH 4/4] Update Profile.jl --- stdlib/Profile/src/Profile.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index 0de602dfee025..694d1292b02ab 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -9,7 +9,7 @@ Profiling support. - `@profile foo()` to profile a specific call. - `Profile.print()` to print the report. Paths are clickable links in supported terminals and specialized for JULIA_EDITOR etc. - `Profile.clear()` to clear the buffer. -- Send a SIGUSR1 (on linux) or SIGINFO (on macOS) 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. +- 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. ## Memory profiling - `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.