diff --git a/README.md b/README.md index 3a7198d6..a2e2f25d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ samply record ./my-application my-arguments On Linux, samply uses perf events. You can grant temporary access by running: ```sh -echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid +echo '-1' | sudo tee /proc/sys/kernel/perf_event_paranoid ``` ## Installation diff --git a/samply/README.md b/samply/README.md index 9f14edac..e2f3b8ac 100644 --- a/samply/README.md +++ b/samply/README.md @@ -13,7 +13,7 @@ samply record ./my-application my-arguments On Linux, samply uses perf events. You can grant temporary access by running: ```sh -echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid +echo '-1' | sudo tee /proc/sys/kernel/perf_event_paranoid ``` Visit [the git repository](https://github.com/mstange/samply/) for more information. diff --git a/samply/src/linux/profiler.rs b/samply/src/linux/profiler.rs index ddf8644e..9e294db9 100644 --- a/samply/src/linux/profiler.rs +++ b/samply/src/linux/profiler.rs @@ -405,7 +405,7 @@ fn init_profiler( eprintln!("In order for samply to work with a non-root user, this level needs"); eprintln!("to be set to 1 or lower."); eprintln!("You can execute the following command and then try again:"); - eprintln!(" echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid"); + eprintln!(" echo '-1' | sudo tee /proc/sys/kernel/perf_event_paranoid"); eprintln!(); std::process::exit(1); }