Skip to content

Commit

Permalink
Add tip on enabling GC log without restarting the JVM (#65)
Browse files Browse the repository at this point in the history
* add gc log tip

* Moving Gist to be an embedded content with ref

* Removing whitespace

---------

Co-authored-by: cchesser <[email protected]>
  • Loading branch information
AnEmortalKid and cchesser authored Feb 25, 2024
1 parent 9240403 commit bb4fe4a
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit bb4fe4a

Please sign in to comment.