Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alicegoldfuss/12e7238d1b387134c037e2eb5af66d87 to your computer and use it in GitHub Desktop.
Save alicegoldfuss/12e7238d1b387134c037e2eb5af66d87 to your computer and use it in GitHub Desktop.
broken code snippets :(
2. Capture a system profile on the host with something like
```
sudo perf record -F 99 -a -g -- sleep 30
```
3. From inside the container (easier to have this running already in another shell) dump the symbols for the Java process with
```
java -cp attach-main.jar:$JAVA_HOME/lib/tools.jar \
```
```
net.virtualvoid.perf.AttachOnce PID
```
3. You will now have a `perf-PID.map` file inside `/tmp` of the container. Move this file to the host (I used a mounted volume).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment