Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 52E2B200B5C for ; Wed, 27 Jul 2016 18:16:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 51BB9160A6F; Wed, 27 Jul 2016 16:16:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A0129160A90 for ; Wed, 27 Jul 2016 18:16:48 +0200 (CEST) Received: (qmail 34972 invoked by uid 500); 27 Jul 2016 16:16:47 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 34940 invoked by uid 99); 27 Jul 2016 16:16:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 16:16:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8474DE02E4; Wed, 27 Jul 2016 16:16:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jmckenzie@apache.org To: commits@cassandra.apache.org Date: Wed, 27 Jul 2016 16:16:48 -0000 Message-Id: <9dd94e8d96204c24ba595726b7b44fca@git.apache.org> In-Reply-To: <45dd5cf0f0994e2c97c7602143899b36@git.apache.org> References: <45dd5cf0f0994e2c97c7602143899b36@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/6] cassandra git commit: Add missing options to cassandra-env.ps1 archived-at: Wed, 27 Jul 2016 16:16:49 -0000 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 Authored: Wed Jul 27 12:12:54 2016 -0400 Committer: Josh McKenzie 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."