Sun, 02 Mar 2008 16:10:12 -0800
6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
Summary: Default values set by cms ergonomics are set with FLAG_SET_DEFAULT so down stream the values look like the default values and affect how later parameters are set. Set these values with FLAG_SET_ERGO instead and adjust how later parameters are interpreted.
Reviewed-by: iveresov, apetrusenko, pbk, ysr
duke@435 | 1 | /* |
duke@435 | 2 | * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. |
duke@435 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | * |
duke@435 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | * under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | * published by the Free Software Foundation. |
duke@435 | 8 | * |
duke@435 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | * accompanied this code). |
duke@435 | 14 | * |
duke@435 | 15 | * You should have received a copy of the GNU General Public License version |
duke@435 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | * |
duke@435 | 19 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
duke@435 | 20 | * CA 95054 USA or visit www.sun.com if you need additional information or |
duke@435 | 21 | * have any questions. |
duke@435 | 22 | * |
duke@435 | 23 | */ |
duke@435 | 24 | |
duke@435 | 25 | // vframes are virtual stack frames representing source level activations. |
duke@435 | 26 | // A single frame may hold several source level activations in the case of |
duke@435 | 27 | // optimized code. The debugging stored with the optimized code enables |
duke@435 | 28 | // us to unfold a frame as a stack of vframes. |
duke@435 | 29 | // A cVFrame represents an activation of a non-java method. |
duke@435 | 30 | |
duke@435 | 31 | // The vframe inheritance hierarchy: |
duke@435 | 32 | // - vframe |
duke@435 | 33 | // - javaVFrame |
duke@435 | 34 | // - interpretedVFrame |
duke@435 | 35 | // - compiledVFrame ; (used for both compiled Java methods and native stubs) |
duke@435 | 36 | // - externalVFrame |
duke@435 | 37 | // - entryVFrame ; special frame created when calling Java from C |
duke@435 | 38 | |
duke@435 | 39 | // - BasicLock |
duke@435 | 40 | |
duke@435 | 41 | class vframe: public ResourceObj { |
duke@435 | 42 | protected: |
duke@435 | 43 | frame _fr; // Raw frame behind the virtual frame. |
duke@435 | 44 | RegisterMap _reg_map; // Register map for the raw frame (used to handle callee-saved registers). |
duke@435 | 45 | JavaThread* _thread; // The thread owning the raw frame. |
duke@435 | 46 | |
duke@435 | 47 | vframe(const frame* fr, const RegisterMap* reg_map, JavaThread* thread); |
duke@435 | 48 | vframe(const frame* fr, JavaThread* thread); |
duke@435 | 49 | public: |
duke@435 | 50 | // Factory method for creating vframes |
duke@435 | 51 | static vframe* new_vframe(const frame* f, const RegisterMap *reg_map, JavaThread* thread); |
duke@435 | 52 | |
duke@435 | 53 | // Accessors |
duke@435 | 54 | frame fr() const { return _fr; } |
duke@435 | 55 | CodeBlob* cb() const { return _fr.cb(); } |
duke@435 | 56 | nmethod* nm() const { |
duke@435 | 57 | assert( cb() != NULL && cb()->is_nmethod(), "usage"); |
duke@435 | 58 | return (nmethod*) cb(); |
duke@435 | 59 | } |
duke@435 | 60 | |
duke@435 | 61 | // ???? Does this need to be a copy? |
duke@435 | 62 | frame* frame_pointer() { return &_fr; } |
duke@435 | 63 | const RegisterMap* register_map() const { return &_reg_map; } |
duke@435 | 64 | JavaThread* thread() const { return _thread; } |
duke@435 | 65 | |
duke@435 | 66 | // Returns the sender vframe |
duke@435 | 67 | virtual vframe* sender() const; |
duke@435 | 68 | |
duke@435 | 69 | // Returns the next javaVFrame on the stack (skipping all other kinds of frame) |
duke@435 | 70 | javaVFrame *java_sender() const; |
duke@435 | 71 | |
duke@435 | 72 | // Answers if the this is the top vframe in the frame, i.e., if the sender vframe |
duke@435 | 73 | // is in the caller frame |
duke@435 | 74 | virtual bool is_top() const { return true; } |
duke@435 | 75 | |
duke@435 | 76 | // Returns top vframe within same frame (see is_top()) |
duke@435 | 77 | virtual vframe* top() const; |
duke@435 | 78 | |
duke@435 | 79 | // Type testing operations |
duke@435 | 80 | virtual bool is_entry_frame() const { return false; } |
duke@435 | 81 | virtual bool is_java_frame() const { return false; } |
duke@435 | 82 | virtual bool is_interpreted_frame() const { return false; } |
duke@435 | 83 | virtual bool is_compiled_frame() const { return false; } |
duke@435 | 84 | |
duke@435 | 85 | #ifndef PRODUCT |
duke@435 | 86 | // printing operations |
duke@435 | 87 | virtual void print_value() const; |
duke@435 | 88 | virtual void print(); |
duke@435 | 89 | #endif |
duke@435 | 90 | }; |
duke@435 | 91 | |
duke@435 | 92 | |
duke@435 | 93 | class javaVFrame: public vframe { |
duke@435 | 94 | public: |
duke@435 | 95 | // JVM state |
duke@435 | 96 | virtual methodOop method() const = 0; |
duke@435 | 97 | virtual int bci() const = 0; |
duke@435 | 98 | virtual StackValueCollection* locals() const = 0; |
duke@435 | 99 | virtual StackValueCollection* expressions() const = 0; |
duke@435 | 100 | // the order returned by monitors() is from oldest -> youngest#4418568 |
duke@435 | 101 | virtual GrowableArray<MonitorInfo*>* monitors() const = 0; |
duke@435 | 102 | |
duke@435 | 103 | // Debugging support via JVMTI. |
duke@435 | 104 | // NOTE that this is not guaranteed to give correct results for compiled vframes. |
duke@435 | 105 | // Deoptimize first if necessary. |
duke@435 | 106 | virtual void set_locals(StackValueCollection* values) const = 0; |
duke@435 | 107 | |
duke@435 | 108 | // Test operation |
duke@435 | 109 | bool is_java_frame() const { return true; } |
duke@435 | 110 | |
duke@435 | 111 | protected: |
duke@435 | 112 | javaVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : vframe(fr, reg_map, thread) {} |
duke@435 | 113 | javaVFrame(const frame* fr, JavaThread* thread) : vframe(fr, thread) {} |
duke@435 | 114 | |
duke@435 | 115 | public: |
duke@435 | 116 | // casting |
duke@435 | 117 | static javaVFrame* cast(vframe* vf) { |
duke@435 | 118 | assert(vf == NULL || vf->is_java_frame(), "must be java frame"); |
duke@435 | 119 | return (javaVFrame*) vf; |
duke@435 | 120 | } |
duke@435 | 121 | |
duke@435 | 122 | // Return an array of monitors locked by this frame in the youngest to oldest order |
duke@435 | 123 | GrowableArray<MonitorInfo*>* locked_monitors(); |
duke@435 | 124 | |
duke@435 | 125 | // printing used during stack dumps |
duke@435 | 126 | void print_lock_info_on(outputStream* st, int frame_count); |
duke@435 | 127 | void print_lock_info(int frame_count) { print_lock_info_on(tty, frame_count); } |
duke@435 | 128 | |
duke@435 | 129 | #ifndef PRODUCT |
duke@435 | 130 | public: |
duke@435 | 131 | // printing operations |
duke@435 | 132 | void print(); |
duke@435 | 133 | void print_value() const; |
duke@435 | 134 | void print_activation(int index) const; |
duke@435 | 135 | |
duke@435 | 136 | // verify operations |
duke@435 | 137 | virtual void verify() const; |
duke@435 | 138 | |
duke@435 | 139 | // Structural compare |
duke@435 | 140 | bool structural_compare(javaVFrame* other); |
duke@435 | 141 | #endif |
duke@435 | 142 | friend class vframe; |
duke@435 | 143 | }; |
duke@435 | 144 | |
duke@435 | 145 | class interpretedVFrame: public javaVFrame { |
duke@435 | 146 | public: |
duke@435 | 147 | // JVM state |
duke@435 | 148 | methodOop method() const; |
duke@435 | 149 | int bci() const; |
duke@435 | 150 | StackValueCollection* locals() const; |
duke@435 | 151 | StackValueCollection* expressions() const; |
duke@435 | 152 | GrowableArray<MonitorInfo*>* monitors() const; |
duke@435 | 153 | |
duke@435 | 154 | void set_locals(StackValueCollection* values) const; |
duke@435 | 155 | |
duke@435 | 156 | // Test operation |
duke@435 | 157 | bool is_interpreted_frame() const { return true; } |
duke@435 | 158 | |
duke@435 | 159 | protected: |
duke@435 | 160 | interpretedVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : javaVFrame(fr, reg_map, thread) {}; |
duke@435 | 161 | |
duke@435 | 162 | public: |
duke@435 | 163 | // Accessors for Byte Code Pointer |
duke@435 | 164 | u_char* bcp() const; |
duke@435 | 165 | void set_bcp(u_char* bcp); |
duke@435 | 166 | |
duke@435 | 167 | // casting |
duke@435 | 168 | static interpretedVFrame* cast(vframe* vf) { |
duke@435 | 169 | assert(vf == NULL || vf->is_interpreted_frame(), "must be interpreted frame"); |
duke@435 | 170 | return (interpretedVFrame*) vf; |
duke@435 | 171 | } |
duke@435 | 172 | |
duke@435 | 173 | private: |
duke@435 | 174 | static const int bcp_offset; |
duke@435 | 175 | intptr_t* locals_addr_at(int offset) const; |
duke@435 | 176 | |
duke@435 | 177 | // returns where the parameters starts relative to the frame pointer |
duke@435 | 178 | int start_of_parameters() const; |
duke@435 | 179 | |
duke@435 | 180 | #ifndef PRODUCT |
duke@435 | 181 | public: |
duke@435 | 182 | // verify operations |
duke@435 | 183 | void verify() const; |
duke@435 | 184 | #endif |
duke@435 | 185 | friend class vframe; |
duke@435 | 186 | }; |
duke@435 | 187 | |
duke@435 | 188 | |
duke@435 | 189 | class externalVFrame: public vframe { |
duke@435 | 190 | protected: |
duke@435 | 191 | externalVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : vframe(fr, reg_map, thread) {} |
duke@435 | 192 | |
duke@435 | 193 | #ifndef PRODUCT |
duke@435 | 194 | public: |
duke@435 | 195 | // printing operations |
duke@435 | 196 | void print_value() const; |
duke@435 | 197 | void print(); |
duke@435 | 198 | #endif |
duke@435 | 199 | friend class vframe; |
duke@435 | 200 | }; |
duke@435 | 201 | |
duke@435 | 202 | class entryVFrame: public externalVFrame { |
duke@435 | 203 | public: |
duke@435 | 204 | bool is_entry_frame() const { return true; } |
duke@435 | 205 | |
duke@435 | 206 | protected: |
duke@435 | 207 | entryVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread); |
duke@435 | 208 | |
duke@435 | 209 | public: |
duke@435 | 210 | // casting |
duke@435 | 211 | static entryVFrame* cast(vframe* vf) { |
duke@435 | 212 | assert(vf == NULL || vf->is_entry_frame(), "must be entry frame"); |
duke@435 | 213 | return (entryVFrame*) vf; |
duke@435 | 214 | } |
duke@435 | 215 | |
duke@435 | 216 | #ifndef PRODUCT |
duke@435 | 217 | public: |
duke@435 | 218 | // printing |
duke@435 | 219 | void print_value() const; |
duke@435 | 220 | void print(); |
duke@435 | 221 | #endif |
duke@435 | 222 | friend class vframe; |
duke@435 | 223 | }; |
duke@435 | 224 | |
duke@435 | 225 | |
duke@435 | 226 | // A MonitorInfo is a ResourceObject that describes a the pair: |
duke@435 | 227 | // 1) the owner of the monitor |
duke@435 | 228 | // 2) the monitor lock |
duke@435 | 229 | class MonitorInfo : public ResourceObj { |
duke@435 | 230 | private: |
duke@435 | 231 | oop _owner; // the object owning the monitor |
duke@435 | 232 | BasicLock* _lock; |
duke@435 | 233 | public: |
duke@435 | 234 | // Constructor |
duke@435 | 235 | MonitorInfo(oop owner, BasicLock* lock) { |
duke@435 | 236 | _owner = owner; |
duke@435 | 237 | _lock = lock; |
duke@435 | 238 | } |
duke@435 | 239 | // Accessors |
duke@435 | 240 | oop owner() const { return _owner; } |
duke@435 | 241 | BasicLock* lock() const { return _lock; } |
duke@435 | 242 | }; |
duke@435 | 243 | |
duke@435 | 244 | class vframeStreamCommon : StackObj { |
duke@435 | 245 | protected: |
duke@435 | 246 | // common |
duke@435 | 247 | frame _frame; |
duke@435 | 248 | JavaThread* _thread; |
duke@435 | 249 | RegisterMap _reg_map; |
duke@435 | 250 | enum { interpreted_mode, compiled_mode, at_end_mode } _mode; |
duke@435 | 251 | |
duke@435 | 252 | int _sender_decode_offset; |
duke@435 | 253 | |
duke@435 | 254 | // Cached information |
duke@435 | 255 | methodOop _method; |
duke@435 | 256 | int _bci; |
duke@435 | 257 | |
duke@435 | 258 | // Should VM activations be ignored or not |
duke@435 | 259 | bool _stop_at_java_call_stub; |
duke@435 | 260 | |
duke@435 | 261 | bool fill_in_compiled_inlined_sender(); |
duke@435 | 262 | void fill_from_compiled_frame(int decode_offset); |
duke@435 | 263 | void fill_from_compiled_native_frame(); |
duke@435 | 264 | |
duke@435 | 265 | void found_bad_method_frame(); |
duke@435 | 266 | |
duke@435 | 267 | void fill_from_interpreter_frame(); |
duke@435 | 268 | bool fill_from_frame(); |
duke@435 | 269 | |
duke@435 | 270 | // Helper routine for security_get_caller_frame |
duke@435 | 271 | void skip_prefixed_method_and_wrappers(); |
duke@435 | 272 | |
duke@435 | 273 | public: |
duke@435 | 274 | // Constructor |
duke@435 | 275 | vframeStreamCommon(JavaThread* thread) : _reg_map(thread, false) { |
duke@435 | 276 | _thread = thread; |
duke@435 | 277 | } |
duke@435 | 278 | |
duke@435 | 279 | // Accessors |
duke@435 | 280 | methodOop method() const { return _method; } |
duke@435 | 281 | int bci() const { return _bci; } |
duke@435 | 282 | intptr_t* frame_id() const { return _frame.id(); } |
duke@435 | 283 | address frame_pc() const { return _frame.pc(); } |
duke@435 | 284 | |
duke@435 | 285 | CodeBlob* cb() const { return _frame.cb(); } |
duke@435 | 286 | nmethod* nm() const { |
duke@435 | 287 | assert( cb() != NULL && cb()->is_nmethod(), "usage"); |
duke@435 | 288 | return (nmethod*) cb(); |
duke@435 | 289 | } |
duke@435 | 290 | |
duke@435 | 291 | // Frame type |
duke@435 | 292 | bool is_interpreted_frame() const { return _frame.is_interpreted_frame(); } |
duke@435 | 293 | bool is_entry_frame() const { return _frame.is_entry_frame(); } |
duke@435 | 294 | |
duke@435 | 295 | // Iteration |
duke@435 | 296 | void next() { |
duke@435 | 297 | // handle frames with inlining |
duke@435 | 298 | if (_mode == compiled_mode && fill_in_compiled_inlined_sender()) return; |
duke@435 | 299 | |
duke@435 | 300 | // handle general case |
duke@435 | 301 | do { |
duke@435 | 302 | _frame = _frame.sender(&_reg_map); |
duke@435 | 303 | } while (!fill_from_frame()); |
duke@435 | 304 | } |
duke@435 | 305 | |
duke@435 | 306 | bool at_end() const { return _mode == at_end_mode; } |
duke@435 | 307 | |
duke@435 | 308 | // Implements security traversal. Skips depth no. of frame including |
duke@435 | 309 | // special security frames and prefixed native methods |
duke@435 | 310 | void security_get_caller_frame(int depth); |
duke@435 | 311 | |
duke@435 | 312 | // Helper routine for JVM_LatestUserDefinedLoader -- needed for 1.4 |
duke@435 | 313 | // reflection implementation |
duke@435 | 314 | void skip_reflection_related_frames(); |
duke@435 | 315 | }; |
duke@435 | 316 | |
duke@435 | 317 | class vframeStream : public vframeStreamCommon { |
duke@435 | 318 | public: |
duke@435 | 319 | // Constructors |
duke@435 | 320 | vframeStream(JavaThread* thread, bool stop_at_java_call_stub = false) |
duke@435 | 321 | : vframeStreamCommon(thread) { |
duke@435 | 322 | _stop_at_java_call_stub = stop_at_java_call_stub; |
duke@435 | 323 | |
duke@435 | 324 | if (!thread->has_last_Java_frame()) { |
duke@435 | 325 | _mode = at_end_mode; |
duke@435 | 326 | return; |
duke@435 | 327 | } |
duke@435 | 328 | |
duke@435 | 329 | _frame = _thread->last_frame(); |
duke@435 | 330 | while (!fill_from_frame()) { |
duke@435 | 331 | _frame = _frame.sender(&_reg_map); |
duke@435 | 332 | } |
duke@435 | 333 | } |
duke@435 | 334 | |
duke@435 | 335 | // top_frame may not be at safepoint, start with sender |
duke@435 | 336 | vframeStream(JavaThread* thread, frame top_frame, bool stop_at_java_call_stub = false); |
duke@435 | 337 | }; |
duke@435 | 338 | |
duke@435 | 339 | |
duke@435 | 340 | inline bool vframeStreamCommon::fill_in_compiled_inlined_sender() { |
duke@435 | 341 | if (_sender_decode_offset == DebugInformationRecorder::serialized_null) { |
duke@435 | 342 | return false; |
duke@435 | 343 | } |
duke@435 | 344 | fill_from_compiled_frame(_sender_decode_offset); |
duke@435 | 345 | return true; |
duke@435 | 346 | } |
duke@435 | 347 | |
duke@435 | 348 | |
duke@435 | 349 | inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) { |
duke@435 | 350 | _mode = compiled_mode; |
duke@435 | 351 | |
duke@435 | 352 | // Range check to detect ridiculous offsets. |
duke@435 | 353 | if (decode_offset == DebugInformationRecorder::serialized_null || |
duke@435 | 354 | decode_offset < 0 || |
duke@435 | 355 | decode_offset >= nm()->scopes_data_size()) { |
duke@435 | 356 | // 6379830 AsyncGetCallTrace sometimes feeds us wild frames. |
duke@435 | 357 | // If we attempt to read nmethod::scopes_data at serialized_null (== 0), |
duke@435 | 358 | // or if we read some at other crazy offset, |
duke@435 | 359 | // we will decode garbage and make wild references into the heap, |
duke@435 | 360 | // leading to crashes in product mode. |
duke@435 | 361 | // (This isn't airtight, of course, since there are internal |
duke@435 | 362 | // offsets which are also crazy.) |
duke@435 | 363 | #ifdef ASSERT |
duke@435 | 364 | if (WizardMode) { |
duke@435 | 365 | tty->print_cr("Error in fill_from_frame: pc_desc for " |
duke@435 | 366 | INTPTR_FORMAT " not found or invalid at %d", |
duke@435 | 367 | _frame.pc(), decode_offset); |
duke@435 | 368 | nm()->print(); |
duke@435 | 369 | nm()->method()->print_codes(); |
duke@435 | 370 | nm()->print_code(); |
duke@435 | 371 | nm()->print_pcs(); |
duke@435 | 372 | } |
duke@435 | 373 | #endif |
duke@435 | 374 | // Provide a cheap fallback in product mode. (See comment above.) |
duke@435 | 375 | found_bad_method_frame(); |
duke@435 | 376 | fill_from_compiled_native_frame(); |
duke@435 | 377 | return; |
duke@435 | 378 | } |
duke@435 | 379 | |
duke@435 | 380 | // Decode first part of scopeDesc |
duke@435 | 381 | DebugInfoReadStream buffer(nm(), decode_offset); |
duke@435 | 382 | _sender_decode_offset = buffer.read_int(); |
duke@435 | 383 | _method = methodOop(buffer.read_oop()); |
duke@435 | 384 | _bci = buffer.read_bci(); |
duke@435 | 385 | |
duke@435 | 386 | assert(_method->is_method(), "checking type of decoded method"); |
duke@435 | 387 | } |
duke@435 | 388 | |
duke@435 | 389 | // The native frames are handled specially. We do not rely on ScopeDesc info |
duke@435 | 390 | // since the pc might not be exact due to the _last_native_pc trick. |
duke@435 | 391 | inline void vframeStreamCommon::fill_from_compiled_native_frame() { |
duke@435 | 392 | _mode = compiled_mode; |
duke@435 | 393 | _sender_decode_offset = DebugInformationRecorder::serialized_null; |
duke@435 | 394 | _method = nm()->method(); |
duke@435 | 395 | _bci = 0; |
duke@435 | 396 | } |
duke@435 | 397 | |
duke@435 | 398 | inline bool vframeStreamCommon::fill_from_frame() { |
duke@435 | 399 | // Interpreted frame |
duke@435 | 400 | if (_frame.is_interpreted_frame()) { |
duke@435 | 401 | fill_from_interpreter_frame(); |
duke@435 | 402 | return true; |
duke@435 | 403 | } |
duke@435 | 404 | |
duke@435 | 405 | // Compiled frame |
duke@435 | 406 | |
duke@435 | 407 | if (cb() != NULL && cb()->is_nmethod()) { |
duke@435 | 408 | if (nm()->is_native_method()) { |
duke@435 | 409 | // Do not rely on scopeDesc since the pc might be unprecise due to the _last_native_pc trick. |
duke@435 | 410 | fill_from_compiled_native_frame(); |
duke@435 | 411 | } else { |
duke@435 | 412 | PcDesc* pc_desc = nm()->pc_desc_at(_frame.pc()); |
duke@435 | 413 | int decode_offset; |
duke@435 | 414 | if (pc_desc == NULL) { |
duke@435 | 415 | // Should not happen, but let fill_from_compiled_frame handle it. |
duke@435 | 416 | decode_offset = DebugInformationRecorder::serialized_null; |
duke@435 | 417 | } else { |
duke@435 | 418 | decode_offset = pc_desc->scope_decode_offset(); |
duke@435 | 419 | } |
duke@435 | 420 | fill_from_compiled_frame(decode_offset); |
duke@435 | 421 | } |
duke@435 | 422 | return true; |
duke@435 | 423 | } |
duke@435 | 424 | |
duke@435 | 425 | // End of stack? |
duke@435 | 426 | if (_frame.is_first_frame() || (_stop_at_java_call_stub && _frame.is_entry_frame())) { |
duke@435 | 427 | _mode = at_end_mode; |
duke@435 | 428 | return true; |
duke@435 | 429 | } |
duke@435 | 430 | |
duke@435 | 431 | return false; |
duke@435 | 432 | } |
duke@435 | 433 | |
duke@435 | 434 | |
duke@435 | 435 | inline void vframeStreamCommon::fill_from_interpreter_frame() { |
duke@435 | 436 | methodOop method = _frame.interpreter_frame_method(); |
duke@435 | 437 | intptr_t bcx = _frame.interpreter_frame_bcx(); |
duke@435 | 438 | int bci = method->validate_bci_from_bcx(bcx); |
duke@435 | 439 | // 6379830 AsyncGetCallTrace sometimes feeds us wild frames. |
duke@435 | 440 | if (bci < 0) { |
duke@435 | 441 | found_bad_method_frame(); |
duke@435 | 442 | bci = 0; // pretend it's on the point of entering |
duke@435 | 443 | } |
duke@435 | 444 | _mode = interpreted_mode; |
duke@435 | 445 | _method = method; |
duke@435 | 446 | _bci = bci; |
duke@435 | 447 | } |