You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2020/09/15 15:41:31 UTC
[lucene-solr] 06/08: JFR off by default, enable with -jfr flag,
writes to /tmp/jfr/ dir by default unless overridden by JFR_DIR env
var
This is an automated email from the ASF dual-hosted git repository.
thelabdude pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 9c0615f097f570e778865a81b503f399ad99416b
Author: Timothy Potter <th...@gmail.com>
AuthorDate: Mon Sep 14 14:29:51 2020 -0600
JFR off by default, enable with -jfr flag, writes to /tmp/jfr/ dir by default unless overridden by JFR_DIR env var
---
solr/bin/solr | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/solr/bin/solr b/solr/bin/solr
index 0b99846..339fa14 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -2140,10 +2140,14 @@ if [ -z "$SOLR_TIMEZONE" ]; then
SOLR_TIMEZONE='UTC'
fi
-if [ -z "$JFR_ON" ]; then
+if [ -n "$JFR_ON" ]; then
+ if [ -v ${JFR_DIR+x} ]; then
+ JFR_DIR="/tmp/jfr"
+ mkdir -p "$JFR_DIR"
+ fi
JFR_ON=("-XX:+FlightRecorder")
SOLR_OPTS+=($JFR_ON)
- JFR_ON=("-XX:StartFlightRecording=filename=${HOME}/jfr/jfr_results-${SOLR_PORT}-$(date +%s).jfr,dumponexit=true,settings=profile,path-to-gc-roots=true")
+ JFR_ON=("-XX:StartFlightRecording=filename=${JFR_DIR}/jfr_results-${SOLR_PORT}-$(date +%s).jfr,dumponexit=true,settings=profile,path-to-gc-roots=true")
SOLR_OPTS+=($JFR_ON)
fi