Mercurial > hg > truffle
annotate src/share/vm/c1/c1_Canonicalizer.hpp @ 20543:e7d0505c8a30
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
author | tschatzl |
---|---|
date | Fri, 10 Oct 2014 15:51:58 +0200 |
parents | 55fb97c4c58d |
children | 4ca6dc0799b6 |
rev | line source |
---|---|
0 | 1 /* |
17467
55fb97c4c58d
8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents:
12882
diff
changeset
|
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_C1_C1_CANONICALIZER_HPP |
26 #define SHARE_VM_C1_C1_CANONICALIZER_HPP | |
27 | |
28 #include "c1/c1_Instruction.hpp" | |
29 | |
0 | 30 class Canonicalizer: InstructionVisitor { |
31 private: | |
1783 | 32 Compilation *_compilation; |
0 | 33 Instruction* _canonical; |
34 int _bci; | |
35 | |
1783 | 36 Compilation *compilation() { return _compilation; } |
0 | 37 void set_canonical(Value x); |
38 void set_bci(int bci) { _bci = bci; } | |
39 void set_constant(jint x) { set_canonical(new Constant(new IntConstant(x))); } | |
40 void set_constant(jlong x) { set_canonical(new Constant(new LongConstant(x))); } | |
41 void set_constant(jfloat x) { set_canonical(new Constant(new FloatConstant(x))); } | |
42 void set_constant(jdouble x) { set_canonical(new Constant(new DoubleConstant(x))); } | |
43 void move_const_to_right(Op2* x); | |
44 void do_Op2(Op2* x); | |
45 void do_UnsafeRawOp(UnsafeRawOp* x); | |
46 | |
47 void unsafe_raw_match(UnsafeRawOp* x, | |
48 Instruction** base, | |
49 Instruction** index, | |
50 int* scale); | |
51 | |
52 public: | |
1783 | 53 Canonicalizer(Compilation* c, Value x, int bci) : _compilation(c), _canonical(x), _bci(bci) { |
4050
34535d2cb362
7104177: Tiered: -XX:+PrintCanonicalization doesn't work with -XX:+TieredCompilation
iveresov
parents:
2166
diff
changeset
|
54 NOT_PRODUCT(x->set_printable_bci(bci)); |
1783 | 55 if (CanonicalizeNodes) x->visit(this); |
56 } | |
0 | 57 Value canonical() const { return _canonical; } |
58 int bci() const { return _bci; } | |
59 | |
60 virtual void do_Phi (Phi* x); | |
61 virtual void do_Constant (Constant* x); | |
62 virtual void do_Local (Local* x); | |
63 virtual void do_LoadField (LoadField* x); | |
64 virtual void do_StoreField (StoreField* x); | |
65 virtual void do_ArrayLength (ArrayLength* x); | |
66 virtual void do_LoadIndexed (LoadIndexed* x); | |
67 virtual void do_StoreIndexed (StoreIndexed* x); | |
68 virtual void do_NegateOp (NegateOp* x); | |
69 virtual void do_ArithmeticOp (ArithmeticOp* x); | |
70 virtual void do_ShiftOp (ShiftOp* x); | |
71 virtual void do_LogicOp (LogicOp* x); | |
72 virtual void do_CompareOp (CompareOp* x); | |
73 virtual void do_IfOp (IfOp* x); | |
74 virtual void do_IfInstanceOf (IfInstanceOf* x); | |
75 virtual void do_Convert (Convert* x); | |
76 virtual void do_NullCheck (NullCheck* x); | |
6266
1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
4966
diff
changeset
|
77 virtual void do_TypeCast (TypeCast* x); |
0 | 78 virtual void do_Invoke (Invoke* x); |
79 virtual void do_NewInstance (NewInstance* x); | |
80 virtual void do_NewTypeArray (NewTypeArray* x); | |
81 virtual void do_NewObjectArray (NewObjectArray* x); | |
82 virtual void do_NewMultiArray (NewMultiArray* x); | |
83 virtual void do_CheckCast (CheckCast* x); | |
84 virtual void do_InstanceOf (InstanceOf* x); | |
85 virtual void do_MonitorEnter (MonitorEnter* x); | |
86 virtual void do_MonitorExit (MonitorExit* x); | |
87 virtual void do_Intrinsic (Intrinsic* x); | |
88 virtual void do_BlockBegin (BlockBegin* x); | |
89 virtual void do_Goto (Goto* x); | |
90 virtual void do_If (If* x); | |
91 virtual void do_TableSwitch (TableSwitch* x); | |
92 virtual void do_LookupSwitch (LookupSwitch* x); | |
93 virtual void do_Return (Return* x); | |
94 virtual void do_Throw (Throw* x); | |
95 virtual void do_Base (Base* x); | |
96 virtual void do_OsrEntry (OsrEntry* x); | |
97 virtual void do_ExceptionObject(ExceptionObject* x); | |
98 virtual void do_RoundFP (RoundFP* x); | |
99 virtual void do_UnsafeGetRaw (UnsafeGetRaw* x); | |
100 virtual void do_UnsafePutRaw (UnsafePutRaw* x); | |
101 virtual void do_UnsafeGetObject(UnsafeGetObject* x); | |
102 virtual void do_UnsafePutObject(UnsafePutObject* x); | |
6795
7eca5de9e0b6
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
6266
diff
changeset
|
103 virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x); |
0 | 104 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x); |
105 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x); | |
106 virtual void do_ProfileCall (ProfileCall* x); | |
12882
ce0cc25bc5e2
8026054: New type profiling points: type of return values at calls
roland
parents:
9156
diff
changeset
|
107 virtual void do_ProfileReturnType (ProfileReturnType* x); |
1783 | 108 virtual void do_ProfileInvoke (ProfileInvoke* x); |
2166
403dc4c1d7f5
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
1972
diff
changeset
|
109 virtual void do_RuntimeCall (RuntimeCall* x); |
4966
701a83c86f28
7120481: storeStore barrier in constructor with final field
jiangli
parents:
4050
diff
changeset
|
110 virtual void do_MemBar (MemBar* x); |
8860 | 111 virtual void do_RangeCheckPredicate(RangeCheckPredicate* x); |
9156
acadb114c818
8011648: C1: optimized build is broken after 7153771
roland
parents:
8860
diff
changeset
|
112 #ifdef ASSERT |
8860 | 113 virtual void do_Assert (Assert* x); |
9156
acadb114c818
8011648: C1: optimized build is broken after 7153771
roland
parents:
8860
diff
changeset
|
114 #endif |
0 | 115 }; |
1972 | 116 |
117 #endif // SHARE_VM_C1_C1_CANONICALIZER_HPP |