From f78d264e4e68496328ec74b0b12c7a383448cb7d Mon Sep 17 00:00:00 2001 From: alina-yur Date: Wed, 21 Feb 2024 14:47:01 +0100 Subject: [PATCH] add monitoring --- .gitignore | 1 + README.md | 2 +- pom.xml | 34 +++++++++++++++++++++++++--------- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 2b0c1ae..1c296b5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ set_command.sh psrecord.py default.iprof .DS_Store +demo-monitored.hprof ### STS ### diff --git a/README.md b/README.md index feb4119..9fa7acc 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ There can be situations though when collecting profiles is not possible – for If you are curious about the impact if this optimization, you can disable it with `-H:-MLProfileInference`. In our measurements, this optimization provides ~6% runtime performance improvement, which is pretty cool for an optimization you automatically get out of the box. -### G1 GC 🧹 +## G1 GC 🧹 There could be different GC strategies. The default GC in Native Image, Serial GC, can be beneficial in certain scenarios, for example if you have a short-lived application or want to optimize memory usage. diff --git a/pom.xml b/pom.xml index e358ad6..a8f439e 100644 --- a/pom.xml +++ b/pom.xml @@ -31,14 +31,6 @@ - - org.graalvm.buildtools - native-maven-plugin - - - org.springframework.boot - spring-boot-maven-plugin - org.graalvm.buildtools native-maven-plugin @@ -48,6 +40,10 @@ + + org.springframework.boot + spring-boot-maven-plugin + @@ -98,9 +94,29 @@ demo-optimized - --gc=G1 + + --pgo=${project.basedir}/default.iprof + -march=native + + + + + + + + monitored + + + + org.graalvm.buildtools + native-maven-plugin + + demo-monitored + + --pgo=${project.basedir}/default.iprof -march=native + --enable-monitoring=heapdump,jfr,jvmstat