Skip to content

Commit bb4fe4a

Browse files
Add tip on enabling GC log without restarting the JVM (#65)
* add gc log tip * Moving Gist to be an embedded content with ref * Removing whitespace --------- Co-authored-by: cchesser <cchesser@gmail.com>
1 parent 9240403 commit bb4fe4a

File tree

1 file changed

+6
-0
lines changed
  • docs/content/docs/memory

1 file changed

+6
-0
lines changed

docs/content/docs/memory/gc.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ java -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:GCLogFileSize
184184
-jar java-perf-workshop-server/target/java-perf-workshop-server-1.1.0-SNAPSHOT.jar server server.yml
185185
```
186186

187+
### Enabling while JVM is running
188+
189+
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)):
190+
191+
{{< gist thomasdarimont f89fc79491241af7a064e1b3ca2757a9 >}}
192+
187193
### Parsing the log
188194

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

0 commit comments

Comments
 (0)