Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tip on enabling GC log without restarting the JVM #65

Merged
merged 3 commits into from
Feb 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/content/docs/memory/gc.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ java -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:GCLogFileSize
-jar java-perf-workshop-server/target/java-perf-workshop-server-1.1.0-SNAPSHOT.jar server server.yml
```

### Enabling while JVM is running

In higher versions of the JDK (9+), you can enable GC logging without having to restart the JVM (reference: [Thomas Darimont](https://github.com/thomasdarimont)):

{{< gist thomasdarimont f89fc79491241af7a064e1b3ca2757a9 >}}

### Parsing the log

For parsing the logs, we are just going to show a simple approach using [R](https://www.r-project.org/) to parse the
Expand Down
Loading