This application is a converter from JFR file produced by Async-profiler in wall-clock mode to collapsed stack files:
- CPU collapsed stack
- Wall-clock collapsed stack
- Lock collapsed stack (Async-profiler 2.0+)
- Alloc count collapsed stack (Async-profiler 2.0+)
- Alloc size collapsed stack (Async-profiler 2.0+)
This tool works with Async-profiler in 1.* and 2.* versions. It works with the Async-profiler in multiple event mode, like wall,alloc,lock
.
java -jar collapse-jfr-full.jar -d <dir>
- will merge all files with .jfr extensions to cpu/wall collapsed stack files
java -jar collapse-jfr-full.jar -f <file>
- will convert one file to cpu/wall collapsed stack files
Output files:
cpu.collapsed
wall.collapsed
lock.collapsed
- if lock events are presentalloc.count.collapsed
- if alloc events are presentalloc.size.collapsed
- if alloc events are present
will be created in the directory you started process.
Collapse-jfr can filter your stack with
- end date
- duration
- thread id
It is design for access log/common log format.
Usage:
java -jar collapse-jfr-full.jar -d <dir> -al <end date> <duration>
java -jar collapse-jfr-full.jar -d <dir> -al <end date> <duration> -t <thread>
java -jar collapse-jfr-full.jar -f <file> -al <end date> <duration>
java -jar collapse-jfr-full.jar -f <file> -al <end date> <duration> -t <thread>
Example: For access log entry:
[17/Sep/2020:13:03:23 +0200] [POST /app/request HTTP/1.1] [302] [- bytes] [23513 ms] [http-nio-8080-exec-250]
You can run:
java -jar collapse-jfr-full.jar -d . -al "17/Sep/2020:13:03:23 +0200" 23513 -t http-nio-8080-exec-250