cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [2/6] cassandra git commit: Add missing options to cassandra-env.ps1
Date Wed, 27 Jul 2016 16:16:48 GMT
Add missing options to cassandra-env.ps1

Patch by pmotta; reviewed by jmckenzie for CASSANDRA-10939


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d6232e04
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d6232e04
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d6232e04

Branch: refs/heads/cassandra-3.9
Commit: d6232e04d79d5b0cd5cd066deee0dfc2b8199221
Parents: 01d5fa8
Author: Paulo Motta <pauloricardomg@gmail.com>
Authored: Wed Jul 27 12:12:54 2016 -0400
Committer: Josh McKenzie <jmckenzie@apache.org>
Committed: Wed Jul 27 12:15:31 2016 -0400

----------------------------------------------------------------------
 conf/cassandra-env.ps1 | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6232e04/conf/cassandra-env.ps1
----------------------------------------------------------------------
diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1
index de94f5e..f037b56 100644
--- a/conf/cassandra-env.ps1
+++ b/conf/cassandra-env.ps1
@@ -413,6 +413,9 @@ Function SetCassandraEnvironment
         }
     }
 
+    # provides hints to the JIT compiler
+    $env:JVM_OPTS = "$env:JVM_OPTS -XX:CompileCommandFile=$env:CASSANDRA_CONF\hotspot_compiler"
+
     # add the jamm javaagent
     if (($env:JVM_VENDOR -ne "OpenJDK") -or ($env:JVM_VERSION.CompareTo("1.6.0") -eq 1) -or
         (($env:JVM_VERSION -eq "1.6.0") -and ($env:JVM_PATCH_VERSION.CompareTo("22") -eq
1)))
@@ -420,6 +423,13 @@ Function SetCassandraEnvironment
         $env:JVM_OPTS = "$env:JVM_OPTS -javaagent:""$env:CASSANDRA_HOME\lib\jamm-0.3.0.jar"""
     }
 
+    # set jvm HeapDumpPath with CASSANDRA_HEAPDUMP_DIR
+    if ($env:CASSANDRA_HEAPDUMP_DIR)
+    {
+        $unixTimestamp = [int64](([datetime]::UtcNow)-(get-date "1/1/1970")).TotalSeconds
+        $env:JVM_OPTS="$env:JVM_OPTS -XX:HeapDumpPath=$env:CASSANDRA_HEAPDUMP_DIR\cassandra-$unixTimestamp-pid$pid.hprof"
+    }
+
     if ($env:JVM_VERSION.CompareTo("1.8.0") -eq -1 -or [convert]::ToInt32($env:JVM_PATCH_VERSION)
-lt 40)
     {
         echo "Cassandra 3.0 and later require Java 8u40 or later."


Mime
View raw message