annotate src/share/vm/opto/runtime.hpp @ 196:d1605aabd0a1 jdk7-b30

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:16 -0700
parents a61af66fc99e
children 37f87013dfd8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 //------------------------------OptoRuntime------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
26 // Opto compiler runtime routines
a61af66fc99e Initial load
duke
parents:
diff changeset
27 //
a61af66fc99e Initial load
duke
parents:
diff changeset
28 // These are all generated from Ideal graphs. They are called with the
a61af66fc99e Initial load
duke
parents:
diff changeset
29 // Java calling convention. Internally they call C++. They are made once at
a61af66fc99e Initial load
duke
parents:
diff changeset
30 // startup time and Opto compiles calls to them later.
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // Things are broken up into quads: the signature they will be called with,
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // the address of the generated code, the corresponding C++ code and an
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // nmethod.
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // The signature (returned by "xxx_Type()") is used at startup time by the
a61af66fc99e Initial load
duke
parents:
diff changeset
36 // Generator to make the generated code "xxx_Java". Opto compiles calls
a61af66fc99e Initial load
duke
parents:
diff changeset
37 // to the generated code "xxx_Java". When the compiled code gets executed,
a61af66fc99e Initial load
duke
parents:
diff changeset
38 // it calls the C++ code "xxx_C". The generated nmethod is saved in the
a61af66fc99e Initial load
duke
parents:
diff changeset
39 // CodeCache. Exception handlers use the nmethod to get the callee-save
a61af66fc99e Initial load
duke
parents:
diff changeset
40 // register OopMaps.
a61af66fc99e Initial load
duke
parents:
diff changeset
41 class CallInfo;
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 //
a61af66fc99e Initial load
duke
parents:
diff changeset
44 // NamedCounters are tagged counters which can be used for profiling
a61af66fc99e Initial load
duke
parents:
diff changeset
45 // code in various ways. Currently they are used by the lock coarsening code
a61af66fc99e Initial load
duke
parents:
diff changeset
46 //
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48 class NamedCounter : public CHeapObj {
a61af66fc99e Initial load
duke
parents:
diff changeset
49 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
50 enum CounterTag {
a61af66fc99e Initial load
duke
parents:
diff changeset
51 NoTag,
a61af66fc99e Initial load
duke
parents:
diff changeset
52 LockCounter,
a61af66fc99e Initial load
duke
parents:
diff changeset
53 EliminatedLockCounter,
a61af66fc99e Initial load
duke
parents:
diff changeset
54 BiasedLockingCounter
a61af66fc99e Initial load
duke
parents:
diff changeset
55 };
a61af66fc99e Initial load
duke
parents:
diff changeset
56
a61af66fc99e Initial load
duke
parents:
diff changeset
57 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
58 const char * _name;
a61af66fc99e Initial load
duke
parents:
diff changeset
59 int _count;
a61af66fc99e Initial load
duke
parents:
diff changeset
60 CounterTag _tag;
a61af66fc99e Initial load
duke
parents:
diff changeset
61 NamedCounter* _next;
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
64 NamedCounter(const char *n, CounterTag tag = NoTag):
a61af66fc99e Initial load
duke
parents:
diff changeset
65 _name(n),
a61af66fc99e Initial load
duke
parents:
diff changeset
66 _count(0),
a61af66fc99e Initial load
duke
parents:
diff changeset
67 _next(NULL),
a61af66fc99e Initial load
duke
parents:
diff changeset
68 _tag(tag) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
69
a61af66fc99e Initial load
duke
parents:
diff changeset
70 const char * name() const { return _name; }
a61af66fc99e Initial load
duke
parents:
diff changeset
71 int count() const { return _count; }
a61af66fc99e Initial load
duke
parents:
diff changeset
72 address addr() { return (address)&_count; }
a61af66fc99e Initial load
duke
parents:
diff changeset
73 CounterTag tag() const { return _tag; }
a61af66fc99e Initial load
duke
parents:
diff changeset
74 void set_tag(CounterTag tag) { _tag = tag; }
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 NamedCounter* next() const { return _next; }
a61af66fc99e Initial load
duke
parents:
diff changeset
77 void set_next(NamedCounter* next) {
a61af66fc99e Initial load
duke
parents:
diff changeset
78 assert(_next == NULL, "already set");
a61af66fc99e Initial load
duke
parents:
diff changeset
79 _next = next;
a61af66fc99e Initial load
duke
parents:
diff changeset
80 }
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82 };
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 class BiasedLockingNamedCounter : public NamedCounter {
a61af66fc99e Initial load
duke
parents:
diff changeset
85 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
86 BiasedLockingCounters _counters;
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
89 BiasedLockingNamedCounter(const char *n) :
a61af66fc99e Initial load
duke
parents:
diff changeset
90 NamedCounter(n, BiasedLockingCounter), _counters() {}
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 BiasedLockingCounters* counters() { return &_counters; }
a61af66fc99e Initial load
duke
parents:
diff changeset
93 };
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 typedef const TypeFunc*(*TypeFunc_generator)();
a61af66fc99e Initial load
duke
parents:
diff changeset
96
a61af66fc99e Initial load
duke
parents:
diff changeset
97 class OptoRuntime : public AllStatic {
a61af66fc99e Initial load
duke
parents:
diff changeset
98 friend class Matcher; // allow access to stub names
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
101 // define stubs
a61af66fc99e Initial load
duke
parents:
diff changeset
102 static address generate_stub(ciEnv* ci_env, TypeFunc_generator gen, address C_function, const char *name, int is_fancy_jump, bool pass_tls, bool save_arguments, bool return_pc);
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 // References to generated stubs
a61af66fc99e Initial load
duke
parents:
diff changeset
105 static address _new_instance_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
106 static address _new_array_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
107 static address _multianewarray2_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
108 static address _multianewarray3_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
109 static address _multianewarray4_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
110 static address _multianewarray5_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
111 static address _vtable_must_compile_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
112 static address _complete_monitor_locking_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
113 static address _rethrow_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
114
a61af66fc99e Initial load
duke
parents:
diff changeset
115 static address _slow_arraycopy_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
116 static address _register_finalizer_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 # ifdef ENABLE_ZAP_DEAD_LOCALS
a61af66fc99e Initial load
duke
parents:
diff changeset
119 static address _zap_dead_Java_locals_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
120 static address _zap_dead_native_locals_Java;
a61af66fc99e Initial load
duke
parents:
diff changeset
121 # endif
a61af66fc99e Initial load
duke
parents:
diff changeset
122
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124 //
a61af66fc99e Initial load
duke
parents:
diff changeset
125 // Implementation of runtime methods
a61af66fc99e Initial load
duke
parents:
diff changeset
126 // =================================
a61af66fc99e Initial load
duke
parents:
diff changeset
127
a61af66fc99e Initial load
duke
parents:
diff changeset
128 // Allocate storage for a Java instance.
a61af66fc99e Initial load
duke
parents:
diff changeset
129 static void new_instance_C(klassOopDesc* instance_klass, JavaThread *thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
130
a61af66fc99e Initial load
duke
parents:
diff changeset
131 // Allocate storage for a objArray or typeArray
a61af66fc99e Initial load
duke
parents:
diff changeset
132 static void new_array_C(klassOopDesc* array_klass, int len, JavaThread *thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 // Post-allocation step for implementing ReduceInitialCardMarks:
a61af66fc99e Initial load
duke
parents:
diff changeset
135 static void do_eager_card_mark(JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 // Allocate storage for a multi-dimensional arrays
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // Note: needs to be fixed for arbitrary number of dimensions
a61af66fc99e Initial load
duke
parents:
diff changeset
139 static void multianewarray2_C(klassOopDesc* klass, int len1, int len2, JavaThread *thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
140 static void multianewarray3_C(klassOopDesc* klass, int len1, int len2, int len3, JavaThread *thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
141 static void multianewarray4_C(klassOopDesc* klass, int len1, int len2, int len3, int len4, JavaThread *thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
142 static void multianewarray5_C(klassOopDesc* klass, int len1, int len2, int len3, int len4, int len5, JavaThread *thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
145 // Slow-path Locking and Unlocking
a61af66fc99e Initial load
duke
parents:
diff changeset
146 static void complete_monitor_locking_C(oopDesc* obj, BasicLock* lock, JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
147 static void complete_monitor_unlocking_C(oopDesc* obj, BasicLock* lock);
a61af66fc99e Initial load
duke
parents:
diff changeset
148
a61af66fc99e Initial load
duke
parents:
diff changeset
149 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 // Implicit exception support
a61af66fc99e Initial load
duke
parents:
diff changeset
152 static void throw_null_exception_C(JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
153
a61af66fc99e Initial load
duke
parents:
diff changeset
154 // Exception handling
a61af66fc99e Initial load
duke
parents:
diff changeset
155 static address handle_exception_C (JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
156 static address handle_exception_C_helper(JavaThread* thread, nmethod*& nm);
a61af66fc99e Initial load
duke
parents:
diff changeset
157 static address rethrow_C (oopDesc* exception, JavaThread *thread, address return_pc );
a61af66fc99e Initial load
duke
parents:
diff changeset
158 static void deoptimize_caller_frame (JavaThread *thread, bool doit);
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 // CodeBlob support
a61af66fc99e Initial load
duke
parents:
diff changeset
161 // ===================================================================
a61af66fc99e Initial load
duke
parents:
diff changeset
162
a61af66fc99e Initial load
duke
parents:
diff changeset
163 static ExceptionBlob* _exception_blob;
a61af66fc99e Initial load
duke
parents:
diff changeset
164 static void generate_exception_blob();
a61af66fc99e Initial load
duke
parents:
diff changeset
165
a61af66fc99e Initial load
duke
parents:
diff changeset
166 static void register_finalizer(oopDesc* obj, JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
167
a61af66fc99e Initial load
duke
parents:
diff changeset
168 // zaping dead locals, either from Java frames or from native frames
a61af66fc99e Initial load
duke
parents:
diff changeset
169 # ifdef ENABLE_ZAP_DEAD_LOCALS
a61af66fc99e Initial load
duke
parents:
diff changeset
170 static void zap_dead_Java_locals_C( JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
171 static void zap_dead_native_locals_C( JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
172
a61af66fc99e Initial load
duke
parents:
diff changeset
173 static void zap_dead_java_or_native_locals( JavaThread*, bool (*)(frame*));
a61af66fc99e Initial load
duke
parents:
diff changeset
174
a61af66fc99e Initial load
duke
parents:
diff changeset
175 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
176 static int ZapDeadCompiledLocals_count;
a61af66fc99e Initial load
duke
parents:
diff changeset
177
a61af66fc99e Initial load
duke
parents:
diff changeset
178 # endif
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180
a61af66fc99e Initial load
duke
parents:
diff changeset
181 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
182
a61af66fc99e Initial load
duke
parents:
diff changeset
183 static bool is_callee_saved_register(MachRegisterNumbers reg);
a61af66fc99e Initial load
duke
parents:
diff changeset
184
a61af66fc99e Initial load
duke
parents:
diff changeset
185 // One time only generate runtime code stubs
a61af66fc99e Initial load
duke
parents:
diff changeset
186 static void generate(ciEnv* env);
a61af66fc99e Initial load
duke
parents:
diff changeset
187
a61af66fc99e Initial load
duke
parents:
diff changeset
188 // Returns the name of a stub
a61af66fc99e Initial load
duke
parents:
diff changeset
189 static const char* stub_name(address entry);
a61af66fc99e Initial load
duke
parents:
diff changeset
190
a61af66fc99e Initial load
duke
parents:
diff changeset
191 // access to runtime stubs entry points for java code
a61af66fc99e Initial load
duke
parents:
diff changeset
192 static address new_instance_Java() { return _new_instance_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
193 static address new_array_Java() { return _new_array_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
194 static address multianewarray2_Java() { return _multianewarray2_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
195 static address multianewarray3_Java() { return _multianewarray3_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
196 static address multianewarray4_Java() { return _multianewarray4_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
197 static address multianewarray5_Java() { return _multianewarray5_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
198 static address vtable_must_compile_stub() { return _vtable_must_compile_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
199 static address complete_monitor_locking_Java() { return _complete_monitor_locking_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
200
a61af66fc99e Initial load
duke
parents:
diff changeset
201 static address slow_arraycopy_Java() { return _slow_arraycopy_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
202 static address register_finalizer_Java() { return _register_finalizer_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
203
a61af66fc99e Initial load
duke
parents:
diff changeset
204
a61af66fc99e Initial load
duke
parents:
diff changeset
205 # ifdef ENABLE_ZAP_DEAD_LOCALS
a61af66fc99e Initial load
duke
parents:
diff changeset
206 static address zap_dead_locals_stub(bool is_native) { return is_native
a61af66fc99e Initial load
duke
parents:
diff changeset
207 ? _zap_dead_native_locals_Java
a61af66fc99e Initial load
duke
parents:
diff changeset
208 : _zap_dead_Java_locals_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
209 static MachNode* node_to_call_zap_dead_locals(Node* n, int block_num, bool is_native);
a61af66fc99e Initial load
duke
parents:
diff changeset
210 # endif
a61af66fc99e Initial load
duke
parents:
diff changeset
211
a61af66fc99e Initial load
duke
parents:
diff changeset
212 static ExceptionBlob* exception_blob() { return _exception_blob; }
a61af66fc99e Initial load
duke
parents:
diff changeset
213
a61af66fc99e Initial load
duke
parents:
diff changeset
214 // Leaf routines helping with method data update
a61af66fc99e Initial load
duke
parents:
diff changeset
215 static void profile_receiver_type_C(DataLayout* data, oopDesc* receiver);
a61af66fc99e Initial load
duke
parents:
diff changeset
216
a61af66fc99e Initial load
duke
parents:
diff changeset
217 // Implicit exception support
a61af66fc99e Initial load
duke
parents:
diff changeset
218 static void throw_div0_exception_C (JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
219 static void throw_stack_overflow_error_C(JavaThread* thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
220
a61af66fc99e Initial load
duke
parents:
diff changeset
221 // Exception handling
a61af66fc99e Initial load
duke
parents:
diff changeset
222 static address rethrow_stub() { return _rethrow_Java; }
a61af66fc99e Initial load
duke
parents:
diff changeset
223
a61af66fc99e Initial load
duke
parents:
diff changeset
224
a61af66fc99e Initial load
duke
parents:
diff changeset
225 // Type functions
a61af66fc99e Initial load
duke
parents:
diff changeset
226 // ======================================================
a61af66fc99e Initial load
duke
parents:
diff changeset
227
a61af66fc99e Initial load
duke
parents:
diff changeset
228 static const TypeFunc* new_instance_Type(); // object allocation (slow case)
a61af66fc99e Initial load
duke
parents:
diff changeset
229 static const TypeFunc* new_array_Type (); // [a]newarray (slow case)
a61af66fc99e Initial load
duke
parents:
diff changeset
230 static const TypeFunc* multianewarray_Type(int ndim); // multianewarray
a61af66fc99e Initial load
duke
parents:
diff changeset
231 static const TypeFunc* multianewarray2_Type(); // multianewarray
a61af66fc99e Initial load
duke
parents:
diff changeset
232 static const TypeFunc* multianewarray3_Type(); // multianewarray
a61af66fc99e Initial load
duke
parents:
diff changeset
233 static const TypeFunc* multianewarray4_Type(); // multianewarray
a61af66fc99e Initial load
duke
parents:
diff changeset
234 static const TypeFunc* multianewarray5_Type(); // multianewarray
a61af66fc99e Initial load
duke
parents:
diff changeset
235 static const TypeFunc* complete_monitor_enter_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
236 static const TypeFunc* complete_monitor_exit_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
237 static const TypeFunc* uncommon_trap_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
238 static const TypeFunc* athrow_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
239 static const TypeFunc* rethrow_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
240 static const TypeFunc* Math_D_D_Type(); // sin,cos & friends
a61af66fc99e Initial load
duke
parents:
diff changeset
241 static const TypeFunc* Math_DD_D_Type(); // mod,pow & friends
a61af66fc99e Initial load
duke
parents:
diff changeset
242 static const TypeFunc* modf_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
243 static const TypeFunc* l2f_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
244 static const TypeFunc* current_time_millis_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
245
a61af66fc99e Initial load
duke
parents:
diff changeset
246 static const TypeFunc* flush_windows_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
247
a61af66fc99e Initial load
duke
parents:
diff changeset
248 // arraycopy routine types
a61af66fc99e Initial load
duke
parents:
diff changeset
249 static const TypeFunc* fast_arraycopy_Type(); // bit-blasters
a61af66fc99e Initial load
duke
parents:
diff changeset
250 static const TypeFunc* checkcast_arraycopy_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
251 static const TypeFunc* generic_arraycopy_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
252 static const TypeFunc* slow_arraycopy_Type(); // the full routine
a61af66fc99e Initial load
duke
parents:
diff changeset
253
a61af66fc99e Initial load
duke
parents:
diff changeset
254 // leaf on stack replacement interpreter accessor types
a61af66fc99e Initial load
duke
parents:
diff changeset
255 static const TypeFunc* osr_end_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
256
a61af66fc99e Initial load
duke
parents:
diff changeset
257 // leaf methodData routine types
a61af66fc99e Initial load
duke
parents:
diff changeset
258 static const TypeFunc* profile_receiver_type_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
259
a61af66fc99e Initial load
duke
parents:
diff changeset
260 // leaf on stack replacement interpreter accessor types
a61af66fc99e Initial load
duke
parents:
diff changeset
261 static const TypeFunc* fetch_int_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
262 static const TypeFunc* fetch_long_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
263 static const TypeFunc* fetch_float_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
264 static const TypeFunc* fetch_double_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
265 static const TypeFunc* fetch_oop_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
266 static const TypeFunc* fetch_monitor_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
267
a61af66fc99e Initial load
duke
parents:
diff changeset
268 static const TypeFunc* register_finalizer_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
269
a61af66fc99e Initial load
duke
parents:
diff changeset
270 // Dtrace support
a61af66fc99e Initial load
duke
parents:
diff changeset
271 static const TypeFunc* dtrace_method_entry_exit_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
272 static const TypeFunc* dtrace_object_alloc_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
273
a61af66fc99e Initial load
duke
parents:
diff changeset
274 # ifdef ENABLE_ZAP_DEAD_LOCALS
a61af66fc99e Initial load
duke
parents:
diff changeset
275 static const TypeFunc* zap_dead_locals_Type();
a61af66fc99e Initial load
duke
parents:
diff changeset
276 # endif
a61af66fc99e Initial load
duke
parents:
diff changeset
277
a61af66fc99e Initial load
duke
parents:
diff changeset
278 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
279 static NamedCounter * volatile _named_counters;
a61af66fc99e Initial load
duke
parents:
diff changeset
280
a61af66fc99e Initial load
duke
parents:
diff changeset
281 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
282 // helper function which creates a named counter labeled with the
a61af66fc99e Initial load
duke
parents:
diff changeset
283 // if they are available
a61af66fc99e Initial load
duke
parents:
diff changeset
284 static NamedCounter* new_named_counter(JVMState* jvms, NamedCounter::CounterTag tag);
a61af66fc99e Initial load
duke
parents:
diff changeset
285
a61af66fc99e Initial load
duke
parents:
diff changeset
286 // dumps all the named counters
a61af66fc99e Initial load
duke
parents:
diff changeset
287 static void print_named_counters();
a61af66fc99e Initial load
duke
parents:
diff changeset
288
a61af66fc99e Initial load
duke
parents:
diff changeset
289 };