From 2407358fe06935f5f8df7e634a16bc9bb9ac33d5 Mon Sep 17 00:00:00 2001 From: Benjamin Trent Date: Mon, 16 Jun 2025 15:14:03 -0400 Subject: [PATCH] Adding profiling option to checkVec task (#129502) Adds simple profiling to checkVec. ``` DO_PROFILING=true ./gradlew :qa:vector:checkVec --args=/path/to/config.json ``` --- qa/vector/build.gradle | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qa/vector/build.gradle b/qa/vector/build.gradle index 533b14363bee..951efabedbae 100644 --- a/qa/vector/build.gradle +++ b/qa/vector/build.gradle @@ -42,9 +42,12 @@ tasks.register("checkVec", JavaExec) { systemProperty "es.logger.out", "console" systemProperty "es.logger.level", "INFO" // Change to DEBUG if needed systemProperty 'es.nativelibs.path', TestUtil.getTestLibraryPath(file("../../libs/native/libraries/build/platform/").toString()) - + jvmArgs '-Xms4g', '-Xmx4g', '-Djava.util.concurrent.ForkJoinPool.common.parallelism=8', '-XX:+UnlockDiagnosticVMOptions', '-XX:+DebugNonSafepoints', '-XX:+HeapDumpOnOutOfMemoryError' if (buildParams.getRuntimeJavaVersion().map { it.majorVersion.toInteger() }.get() >= 21) { - jvmArgs '-Xms4g', '-Xmx4g', '--add-modules=jdk.incubator.vector', '--enable-native-access=ALL-UNNAMED', '-Djava.util.concurrent.ForkJoinPool.common.parallelism=8', '-XX:+UnlockDiagnosticVMOptions', '-XX:+DebugNonSafepoints', '-XX:+HeapDumpOnOutOfMemoryError' + jvmArgs '--add-modules=jdk.incubator.vector', '--enable-native-access=ALL-UNNAMED' + } + if (System.getenv("DO_PROFILING") != null) { + jvmArgs '-XX:StartFlightRecording=dumponexit=true,maxsize=250M,filename=knn.jfr,settings=profile.jfc' } }