summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Robbins <brianrob@microsoft.com>2016-06-17 16:04:10 -0700
committerBrian Robbins <brianrob@microsoft.com>2016-06-20 14:13:11 -0700
commitf5f41ae0baa783fae5c63a85f2bb53758ae55632 (patch)
treeaf628ae9ad97a64209f262148f0c54c52ae69a99
parentee3ad560653dc74e2a98642b2bdf4115f9d208f1 (diff)
downloadcoreclr-f5f41ae0baa783fae5c63a85f2bb53758ae55632.tar.gz
coreclr-f5f41ae0baa783fae5c63a85f2bb53758ae55632.tar.bz2
coreclr-f5f41ae0baa783fae5c63a85f2bb53758ae55632.zip
Update Linux tracing instructions for Docker containers.
-rw-r--r--Documentation/project-docs/linux-performance-tracing.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/Documentation/project-docs/linux-performance-tracing.md b/Documentation/project-docs/linux-performance-tracing.md
index 8a7adf53f1..1313ed12cb 100644
--- a/Documentation/project-docs/linux-performance-tracing.md
+++ b/Documentation/project-docs/linux-performance-tracing.md
@@ -81,6 +81,19 @@ Follow these steps to prepare your machine to collect a performance trace.
The compressed trace file is now stored in the current working directory.
+#Collecting in a Docker Container#
+Perfcollect can be used to collect data for an application running inside a Docker container. The main thing to know is that collecting a trace requires elevated privileges because the [default seccomp profile](https://docs.docker.com/engine/security/seccomp/) blocks a required syscall - perf_events_open.
+
+In order to use the instructions in this document to collect a trace, spawn a new shell inside the container that is privileged.
+
+>```bash
+>docker exec -it --privileged <container_name> /bin/bash
+>```
+
+Even though the application hosted in the container isn't privileged, this new shell is, and it will have all the privileges it needs to collect trace data. Now, simply follow the instructions in [Collecting a Trace](#collecting-a-trace) using the privileged shell.
+
+If you want to try tracing in a container, we've written a [demo Dockerfile](https://raw.githubusercontent.com/dotnet/corefx-tools/master/src/performance/perfcollect/docker-demo/Dockerfile) that installs all of the performance tracing pre-requisites, sets the environment up for tracing, and starts a sample CPU-bound app.
+
#Viewing a Trace#
Traces are best viewed using PerfView on Windows. Note that we're currently looking into porting the analysis pieces of PerfView to Linux so that the entire investigation can occur on Linux.
@@ -89,7 +102,7 @@ Traces are best viewed using PerfView on Windows. Note that we're currently loo
2. Download PerfView from <http://aka.ms/perfview>.
3. Run PerfView.exe
- > ```bash
+ > ```cmd
> PerfView.exe <path to trace.zip file>
> ```