From c9f69f7b25975baecdaf5f399d3be81cef162dc8 Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Wed, 1 Mar 2017 13:20:51 +0300 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 112de32..2772242 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ - [Collect blocks](#collect-blocks) - [Collect via network](#collect-via-network) - [Collect via file](#collect-via-file) + - [Note about context-switch](#note-about-context-switch) 4. [Build](#build) - [Linux](#linux) - [Windows](#windows) @@ -151,6 +152,17 @@ int main() } ``` +### Note about context-switch + +To capture a thread context-switch event you need: + +- On Windows: run profiling application "as administrator" +- On linux: you can run special `systemtap` script with root privileges as follow (example on Fedora): +```bash +#stap -o /tmp/cs_profiling_info.log scripts/context_switch_logger.stp name APPLICATION_NAME +``` +APPLICATION_NAME - name of profiling application + # Build ## Prerequisites