Mercurial > hg > truffle
annotate src/share/vm/opto/macro.hpp @ 9126:bc26f978b0ce
HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
don't use the (wrong) cached value, but ask the runtime on each request.
Fixes regression on xml.* benchmarks @ specjvm2008. The problem was:
After the constructor of Object was deoptimized due to an assumption violation,
it was recompiled again after some time. However, on recompilation, the value
of hasFinalizeSubclass for the class was not updated and it was compiled again
with a, now wrong, assumption, which then triggers deoptimization again.
This was repeated until it hit the recompilation limit (defined by
PerMethodRecompilationCutoff), and therefore only executed by the interpreter
from now on, causing the performance regression.
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Mon, 15 Apr 2013 19:54:58 +0200 |
parents | b9a9ed0f8eeb |
children | 6f3fd5150b67 |
rev | line source |
---|---|
0 | 1 /* |
6842
b9a9ed0f8eeb
7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents:
6804
diff
changeset
|
2 * Copyright (c) 2005, 2012, 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:
420
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
420
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:
420
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_OPTO_MACRO_HPP |
26 #define SHARE_VM_OPTO_MACRO_HPP | |
27 | |
28 #include "opto/phase.hpp" | |
29 | |
0 | 30 class AllocateNode; |
31 class AllocateArrayNode; | |
32 class CallNode; | |
33 class Node; | |
34 class PhaseIterGVN; | |
35 | |
36 class PhaseMacroExpand : public Phase { | |
37 private: | |
38 PhaseIterGVN &_igvn; | |
39 | |
40 // Helper methods roughly modelled after GraphKit: | |
41 Node* top() const { return C->top(); } | |
42 Node* intcon(jint con) const { return _igvn.intcon(con); } | |
43 Node* longcon(jlong con) const { return _igvn.longcon(con); } | |
44 Node* makecon(const Type *t) const { return _igvn.makecon(t); } | |
45 Node* basic_plus_adr(Node* base, int offset) { | |
46 return (offset == 0)? base: basic_plus_adr(base, MakeConX(offset)); | |
47 } | |
48 Node* basic_plus_adr(Node* base, Node* ptr, int offset) { | |
49 return (offset == 0)? ptr: basic_plus_adr(base, ptr, MakeConX(offset)); | |
50 } | |
51 Node* basic_plus_adr(Node* base, Node* offset) { | |
52 return basic_plus_adr(base, base, offset); | |
53 } | |
54 Node* basic_plus_adr(Node* base, Node* ptr, Node* offset) { | |
6804
e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
kvn
parents:
4777
diff
changeset
|
55 Node* adr = new (C) AddPNode(base, ptr, offset); |
0 | 56 return transform_later(adr); |
57 } | |
58 Node* transform_later(Node* n) { | |
59 // equivalent to _gvn.transform in GraphKit, Ideal, etc. | |
60 _igvn.register_new_node_with_optimizer(n); | |
61 return n; | |
62 } | |
63 void set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr); | |
64 Node* make_load( Node* ctl, Node* mem, Node* base, int offset, | |
65 const Type* value_type, BasicType bt); | |
66 Node* make_store(Node* ctl, Node* mem, Node* base, int offset, | |
67 Node* value, BasicType bt); | |
68 | |
69 // projections extracted from a call node | |
70 ProjNode *_fallthroughproj; | |
71 ProjNode *_fallthroughcatchproj; | |
72 ProjNode *_ioproj_fallthrough; | |
73 ProjNode *_ioproj_catchall; | |
74 ProjNode *_catchallcatchproj; | |
75 ProjNode *_memproj_fallthrough; | |
76 ProjNode *_memproj_catchall; | |
77 ProjNode *_resproj; | |
78 | |
79 | |
80 void expand_allocate(AllocateNode *alloc); | |
81 void expand_allocate_array(AllocateArrayNode *alloc); | |
82 void expand_allocate_common(AllocateNode* alloc, | |
83 Node* length, | |
84 const TypeFunc* slow_call_type, | |
85 address slow_call_address); | |
73
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
86 Node *value_from_mem(Node *mem, BasicType ft, const Type *ftype, const TypeOopPtr *adr_t, Node *alloc); |
247 | 87 Node *value_from_mem_phi(Node *mem, BasicType ft, const Type *ftype, const TypeOopPtr *adr_t, Node *alloc, Node_Stack *value_phis, int level); |
73
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
88 |
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
89 bool eliminate_allocate_node(AllocateNode *alloc); |
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
90 bool can_eliminate_allocation(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints); |
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
91 bool scalar_replacement(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints_done); |
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
92 void process_users_of_allocation(AllocateNode *alloc); |
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
93 |
a8880a78d355
6259129: (Escape Analysis) scalar replacement for not escaping objects
kvn
parents:
66
diff
changeset
|
94 void eliminate_card_mark(Node *cm); |
4777 | 95 void mark_eliminated_box(Node* box, Node* obj); |
3754
642c68c75db9
7050280: assert(u->as_Unlock()->is_eliminated()) failed: sanity
kvn
parents:
1972
diff
changeset
|
96 void mark_eliminated_locking_nodes(AbstractLockNode *alock); |
66
6dbf1a175d6b
6672848: (Escape Analysis) improve lock elimination with EA
kvn
parents:
0
diff
changeset
|
97 bool eliminate_locking_node(AbstractLockNode *alock); |
0 | 98 void expand_lock_node(LockNode *lock); |
99 void expand_unlock_node(UnlockNode *unlock); | |
100 | |
101 int replace_input(Node *use, Node *oldref, Node *newref); | |
102 void copy_call_debug_info(CallNode *oldcall, CallNode * newcall); | |
420
a1980da045cc
6462850: generate biased locking code in C2 ideal graph
kvn
parents:
247
diff
changeset
|
103 Node* opt_bits_test(Node* ctrl, Node* region, int edge, Node* word, int mask, int bits, bool return_fast_path = false); |
0 | 104 void copy_predefined_input_for_runtime_call(Node * ctrl, CallNode* oldcall, CallNode* call); |
105 CallNode* make_slow_call(CallNode *oldcall, const TypeFunc* slow_call_type, address slow_call, | |
106 const char* leaf_name, Node* slow_path, Node* parm0, Node* parm1); | |
107 void extract_call_projections(CallNode *call); | |
108 | |
109 Node* initialize_object(AllocateNode* alloc, | |
110 Node* control, Node* rawmem, Node* object, | |
111 Node* klass_node, Node* length, | |
112 Node* size_in_bytes); | |
113 | |
114 Node* prefetch_allocation(Node* i_o, | |
115 Node*& needgc_false, Node*& contended_phi_rawmem, | |
116 Node* old_eden_top, Node* new_eden_top, | |
117 Node* length); | |
118 | |
119 public: | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
73
diff
changeset
|
120 PhaseMacroExpand(PhaseIterGVN &igvn) : Phase(Macro_Expand), _igvn(igvn) { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
73
diff
changeset
|
121 _igvn.set_delay_transform(true); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
73
diff
changeset
|
122 } |
4115 | 123 void eliminate_macro_nodes(); |
0 | 124 bool expand_macro_nodes(); |
125 | |
126 }; | |
1972 | 127 |
128 #endif // SHARE_VM_OPTO_MACRO_HPP |