From patchwork Tue Jul 8 18:05:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Nevill X-Patchwork-Id: 33244 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 147FF2070A for ; Tue, 8 Jul 2014 18:05:20 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id v10sf40611121pde.11 for ; Tue, 08 Jul 2014 11:05:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=ZZIRI8sZWmTVulrbbz3O5uWM0spanN3LYbKXuGelbkw=; b=ZLa19zOG4xR90FlcZLkg6xz0qdnicZaBp7tR2Lm6UX3vZvXfHmbUFSrSmfK3+fmgYO Ux3gHVfF/Y4w2NGyTnpfzU8c5ikyAgOQmoqUQoyASxxxKHkQQTHIgPuJbgppREpelV/2 hAvmCfaIo0DkJMmkDEBIObeitzsyFeFQOiR/7/pobBM/W0OoXmxTTva0Op2Wp3xR1l6Q c1lhwpj7MppbTJIcT/uVdn2JEC7szDmNnkCOk7MGPqHLr1i/LzRN/2r+dLHRqMmMaqvW 5jy77755mdbViFNCX8m36RN+WnYyWcVi8PwwmteUZh1omfioNcDKf5UwT8u8Bw5RqO+P 97yQ== X-Gm-Message-State: ALoCoQmvRmQ1HUAX64NezB6/NQlBjYaz7Hs4tnWKnmJx4SMUaxvNWsw325sp9nZzoDYKIj0OY801 X-Received: by 10.66.230.226 with SMTP id tb2mr16421412pac.41.1404842719295; Tue, 08 Jul 2014 11:05:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.198 with SMTP id 64ls2264825qgn.8.gmail; Tue, 08 Jul 2014 11:05:19 -0700 (PDT) X-Received: by 10.220.183.4 with SMTP id ce4mr1641592vcb.54.1404842719191; Tue, 08 Jul 2014 11:05:19 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id ft1si2467875vec.94.2014.07.08.11.05.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 11:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id i13so6006355veh.36 for ; Tue, 08 Jul 2014 11:05:19 -0700 (PDT) X-Received: by 10.52.189.161 with SMTP id gj1mr29336018vdc.2.1404842719075; Tue, 08 Jul 2014 11:05:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp793325vcb; Tue, 8 Jul 2014 11:05:18 -0700 (PDT) X-Received: by 10.224.137.193 with SMTP id x1mr64405915qat.0.1404842718420; Tue, 08 Jul 2014 11:05:18 -0700 (PDT) Received: from mail-qc0-f175.google.com (mail-qc0-f175.google.com [209.85.216.175]) by mx.google.com with ESMTPS id w4si53197601qap.69.2014.07.08.11.05.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 11:05:18 -0700 (PDT) Received-SPF: pass (google.com: domain of edward.nevill@linaro.org designates 209.85.216.175 as permitted sender) client-ip=209.85.216.175; Received: by mail-qc0-f175.google.com with SMTP id i8so5624642qcq.34 for ; Tue, 08 Jul 2014 11:05:18 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.140.29.66 with SMTP id a60mr58482799qga.76.1404842718071; Tue, 08 Jul 2014 11:05:18 -0700 (PDT) Received: by 10.140.80.231 with HTTP; Tue, 8 Jul 2014 11:05:17 -0700 (PDT) In-Reply-To: <53BBBD3D.901@redhat.com> References: <1404812123.11399.18.camel@localhost.localdomain> <53BBBD3D.901@redhat.com> Date: Tue, 8 Jul 2014 19:05:17 +0100 Message-ID: Subject: Re: [aarch64-port-dev ] Restrict ReservedCodeCache to 128M From: Edward Nevill To: Andrew Haley Cc: "aarch64-port-dev@openjdk.java.net" , Patch Tracking X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: edward.nevill@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 8 July 2014 10:43, Andrew Haley wrote: > On 07/08/2014 10:35 AM, Edward Nevill wrote: > > I have chosen to only restrict the default code cache size so it can > still be overridden with -XX:ReservedCodeCacheSize > > Err, this should at least be conditionalized on AARCH64. > Yes, sorry. > > Couldn't we do it in the back end? > I can see no obvious way to do it in the back end. The code in vm_version_aarch64.cpp where other arch dependant stuff is done like UseCRC32 is called too late, IE. it is called after ReservedCodeCacheSize has already been used to initialise the code heap. Patch below conditionalises on AARCH_ONLY The alternative would be to set ReservedCodeCacheSize to 25M in c2_globals instead of 48M so that 5*ReservedCodeCacheSize < 128M. This would mean however that -XX:-TieredCompilation would only get a heap of 25M. Which is best? Ed. --- CUT HERE --- # HG changeset patch # User Edward Nevill edward.nevill@linaro.org # Date 1404842629 -3600 # Tue Jul 08 19:03:49 2014 +0100 # Node ID 6c07d806085bdc65a6a99a8e1394d1890a66c6cb # Parent 5ed1bb528b990f293f6abbef834f7c4bf0dea406 Restrict default ReservedCodeCacheSize to 128M Tier3InvokeNotifyFreqLog = 0; --- CUT HERE --- diff -r 5ed1bb528b99 -r 6c07d806085b src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Tue Jul 08 08:29:51 2014 -0400 +++ b/src/share/vm/runtime/arguments.cpp Tue Jul 08 19:03:49 2014 +0100 @@ -1131,6 +1131,7 @@ // Increase the code cache size - tiered compiles a lot more. if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 5); + AARCH64_ONLY(FLAG_SET_DEFAULT(ReservedCodeCacheSize, MIN2(ReservedCodeCacheSize, 128*M))); } if (!UseInterpreter) { // -Xcomp