src/share/vm/runtime/vframe_hp.hpp

Thu, 24 May 2018 20:03:11 +0800

author
aoqi
date
Thu, 24 May 2018 20:03:11 +0800
changeset 8868
91ddc23482a4
parent 6876
710a3c8b516e
permissions
-rw-r--r--

Increase MaxHeapSize for better performance on MIPS

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

mercurial