annotate src/share/vm/runtime/vframe_hp.hpp @ 4731:1f114331df92

8023730: new hotspot build - hs24-b57 Reviewed-by: jcoomes
author amurillo
date Mon, 26 Aug 2013 12:06:09 -0700
parents f95d63e2154a
children
rev   line source
duke@0 1 /*
stefank@1869 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
duke@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 *
duke@0 5 * This code is free software; you can redistribute it and/or modify it
duke@0 6 * under the terms of the GNU General Public License version 2 only, as
duke@0 7 * published by the Free Software Foundation.
duke@0 8 *
duke@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 * accompanied this code).
duke@0 14 *
duke@0 15 * You should have received a copy of the GNU General Public License version
duke@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 *
trims@1489 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1489 20 * or visit www.oracle.com if you need additional information or have any
trims@1489 21 * questions.
duke@0 22 *
duke@0 23 */
duke@0 24
stefank@1869 25 #ifndef SHARE_VM_RUNTIME_VFRAME_HP_HPP
stefank@1869 26 #define SHARE_VM_RUNTIME_VFRAME_HP_HPP
stefank@1869 27
stefank@1869 28 #include "runtime/vframe.hpp"
stefank@1869 29
duke@0 30 class compiledVFrame: public javaVFrame {
duke@0 31 public:
duke@0 32 // JVM state
cfang@866 33 methodOop method() const;
cfang@866 34 int bci() const;
cfang@866 35 bool should_reexecute() const;
cfang@866 36 StackValueCollection* locals() const;
cfang@866 37 StackValueCollection* expressions() const;
cfang@866 38 GrowableArray<MonitorInfo*>* monitors() const;
duke@0 39
duke@0 40 void set_locals(StackValueCollection* values) const;
duke@0 41
duke@0 42 // Virtuals defined in vframe
duke@0 43 bool is_compiled_frame() const { return true; }
duke@0 44 vframe* sender() const;
duke@0 45 bool is_top() const;
duke@0 46
duke@0 47 // Casting
duke@0 48 static compiledVFrame* cast(vframe* vf) {
duke@0 49 assert(vf == NULL || vf->is_compiled_frame(), "must be compiled frame");
duke@0 50 return (compiledVFrame*) vf;
duke@0 51 }
duke@0 52
duke@0 53 public:
duke@0 54 // Constructors
duke@0 55 compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, nmethod* nm);
duke@0 56
duke@0 57 // Update a local in a compiled frame. Update happens when deopt occurs
duke@0 58 void update_local(BasicType type, int index, jvalue value);
duke@0 59
duke@0 60 // Returns the active nmethod
duke@0 61 nmethod* code() const;
duke@0 62
duke@0 63 // Returns the scopeDesc
duke@0 64 ScopeDesc* scope() const { return _scope; }
duke@0 65
duke@0 66 // Returns SynchronizationEntryBCI or bci() (used for synchronization)
duke@0 67 int raw_bci() const;
duke@0 68
duke@0 69 protected:
duke@0 70 ScopeDesc* _scope;
duke@0 71
duke@0 72
duke@0 73 //StackValue resolve(ScopeValue* sv) const;
duke@0 74 BasicLock* resolve_monitor_lock(Location location) const;
duke@0 75 StackValue *create_stack_value(ScopeValue *sv) const;
duke@0 76
duke@0 77 private:
duke@0 78 compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, ScopeDesc* scope);
duke@0 79
duke@0 80 #ifndef PRODUCT
duke@0 81 public:
duke@0 82 void verify() const;
duke@0 83 #endif
duke@0 84 };
duke@0 85
duke@0 86 // In order to implement set_locals for compiled vframes we must
duke@0 87 // store updated locals in a data structure that contains enough
duke@0 88 // information to recognize equality with a vframe and to store
duke@0 89 // any updated locals.
duke@0 90
duke@0 91 class jvmtiDeferredLocalVariable;
zgu@3465 92 class jvmtiDeferredLocalVariableSet : public CHeapObj<mtCompiler> {
duke@0 93 private:
duke@0 94
duke@0 95 methodOop _method; // must be GC'd
duke@0 96 int _bci;
duke@0 97 intptr_t* _id;
duke@0 98 GrowableArray<jvmtiDeferredLocalVariable*>* _locals;
duke@0 99
duke@0 100 public:
duke@0 101 // JVM state
duke@0 102 methodOop method() const { return _method; }
duke@0 103 int bci() const { return _bci; }
duke@0 104 intptr_t* id() const { return _id; }
duke@0 105 GrowableArray<jvmtiDeferredLocalVariable*>* locals() const { return _locals; }
duke@0 106 void set_local_at(int idx, BasicType typ, jvalue val);
duke@0 107
duke@0 108 // Does the vframe match this jvmtiDeferredLocalVariableSet
duke@0 109 bool matches(vframe* vf);
duke@0 110 // GC
duke@0 111 void oops_do(OopClosure* f);
duke@0 112
duke@0 113 // constructor
duke@0 114 jvmtiDeferredLocalVariableSet(methodOop method, int bci, intptr_t* id);
duke@0 115
duke@0 116 // destructor
duke@0 117 ~jvmtiDeferredLocalVariableSet();
duke@0 118
duke@0 119
duke@0 120 };
duke@0 121
zgu@3465 122 class jvmtiDeferredLocalVariable : public CHeapObj<mtCompiler> {
duke@0 123 public:
duke@0 124
duke@0 125 jvmtiDeferredLocalVariable(int index, BasicType type, jvalue value);
duke@0 126
duke@0 127 BasicType type(void) { return _type; }
duke@0 128 int index(void) { return _index; }
duke@0 129 jvalue value(void) { return _value; }
duke@0 130 // Only mutator is for value as only it can change
duke@0 131 void set_value(jvalue value) { _value = value; }
duke@0 132 // For gc
duke@0 133 oop* oop_addr(void) { return (oop*) &_value.l; }
duke@0 134
duke@0 135 private:
duke@0 136
duke@0 137 BasicType _type;
duke@0 138 jvalue _value;
duke@0 139 int _index;
duke@0 140
duke@0 141 };
stefank@1869 142
stefank@1869 143 #endif // SHARE_VM_RUNTIME_VFRAME_HP_HPP