src/share/vm/gc_implementation/g1/g1AllocationContext.hpp

Fri, 10 Oct 2014 15:51:58 +0200

author
tschatzl
date
Fri, 10 Oct 2014 15:51:58 +0200
changeset 7257
e7d0505c8a30
parent 7164
fa6c442c59ee
child 7370
8d27d6113625
permissions
-rw-r--r--

8059758: Footprint regressions with JDK-8038423
Summary: Changes in JDK-8038423 always initialize (zero out) virtual memory used for auxiliary data structures. This causes a footprint regression for G1 in startup benchmarks. This is because they do not touch that memory at all, so the operating system does not actually commit these pages. The fix is to, if the initialization value of the data structures matches the default value of just committed memory (=0), do not do anything.
Reviewed-by: jwilhelm, brutisso

sjohanss@7118 1 /*
sjohanss@7118 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
sjohanss@7118 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
sjohanss@7118 4 *
sjohanss@7118 5 * This code is free software; you can redistribute it and/or modify it
sjohanss@7118 6 * under the terms of the GNU General Public License version 2 only, as
sjohanss@7118 7 * published by the Free Software Foundation.
sjohanss@7118 8 *
sjohanss@7118 9 * This code is distributed in the hope that it will be useful, but WITHOUT
sjohanss@7118 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
sjohanss@7118 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
sjohanss@7118 12 * version 2 for more details (a copy is included in the LICENSE file that
sjohanss@7118 13 * accompanied this code).
sjohanss@7118 14 *
sjohanss@7118 15 * You should have received a copy of the GNU General Public License version
sjohanss@7118 16 * 2 along with this work; if not, write to the Free Software Foundation,
sjohanss@7118 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
sjohanss@7118 18 *
sjohanss@7118 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
sjohanss@7118 20 * or visit www.oracle.com if you need additional information or have any
sjohanss@7118 21 * questions.
sjohanss@7118 22 *
sjohanss@7118 23 */
sjohanss@7118 24
sjohanss@7118 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP
sjohanss@7118 26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP
sjohanss@7118 27
sjohanss@7118 28 #include "memory/allocation.hpp"
sjohanss@7118 29
sjohanss@7118 30 typedef unsigned char AllocationContext_t;
sjohanss@7118 31
sjohanss@7118 32 class AllocationContext : AllStatic {
sjohanss@7118 33 public:
sjohanss@7118 34 // Currently used context
sjohanss@7118 35 static AllocationContext_t current() {
sjohanss@7118 36 return 0;
sjohanss@7118 37 }
sjohanss@7118 38 // System wide default context
sjohanss@7118 39 static AllocationContext_t system() {
sjohanss@7118 40 return 0;
sjohanss@7118 41 }
sjohanss@7118 42 };
sjohanss@7118 43
jcoomes@7159 44 class AllocationContextStats: public StackObj {
jcoomes@7159 45 public:
jcoomes@7159 46 inline void clear() { }
jcoomes@7159 47 inline void update(bool full_gc) { }
jcoomes@7159 48 inline void update_at_remark() { }
jcoomes@7164 49 inline bool available() { return false; }
jcoomes@7159 50 };
jcoomes@7159 51
sjohanss@7118 52 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP

mercurial