Mercurial > hg > graal-jvmci-8
annotate src/share/vm/runtime/vframe_hp.hpp @ 24227:b5a90e4a6c26 jvmci-0.34
make internal_vm_info_string() consistent with java.vm.version
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 25 Aug 2017 14:25:06 +0200 |
parents | 1ceab3d13eb8 |
children |
rev | line source |
---|---|
0 | 1 /* |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
2 * Copyright (c) 1997, 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:
948
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
948
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:
948
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_RUNTIME_VFRAME_HP_HPP |
26 #define SHARE_VM_RUNTIME_VFRAME_HP_HPP | |
27 | |
28 #include "runtime/vframe.hpp" | |
29 | |
0 | 30 class compiledVFrame: public javaVFrame { |
31 public: | |
32 // JVM state | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
33 Method* method() const; |
900
9987d9d5eb0e
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
0
diff
changeset
|
34 int bci() const; |
9987d9d5eb0e
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
0
diff
changeset
|
35 bool should_reexecute() const; |
9987d9d5eb0e
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
0
diff
changeset
|
36 StackValueCollection* locals() const; |
9987d9d5eb0e
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
0
diff
changeset
|
37 StackValueCollection* expressions() const; |
9987d9d5eb0e
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
0
diff
changeset
|
38 GrowableArray<MonitorInfo*>* monitors() const; |
23731
1ceab3d13eb8
Add a vframe_id to jvmtiDeferredLocalVariable to properly track vframe identity
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
8151
diff
changeset
|
39 int vframe_id() const { return _vframe_id; } |
0 | 40 |
41 void set_locals(StackValueCollection* values) const; | |
42 | |
43 // Virtuals defined in vframe | |
44 bool is_compiled_frame() const { return true; } | |
45 vframe* sender() const; | |
46 bool is_top() const; | |
47 | |
48 // Casting | |
49 static compiledVFrame* cast(vframe* vf) { | |
50 assert(vf == NULL || vf->is_compiled_frame(), "must be compiled frame"); | |
51 return (compiledVFrame*) vf; | |
52 } | |
53 | |
54 public: | |
55 // Constructors | |
56 compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, nmethod* nm); | |
57 | |
58 // Update a local in a compiled frame. Update happens when deopt occurs | |
59 void update_local(BasicType type, int index, jvalue value); | |
60 | |
61 // Returns the active nmethod | |
62 nmethod* code() const; | |
63 | |
64 // Returns the scopeDesc | |
65 ScopeDesc* scope() const { return _scope; } | |
66 | |
67 // Returns SynchronizationEntryBCI or bci() (used for synchronization) | |
68 int raw_bci() const; | |
69 | |
8151
b8f261ba79c6
Minimize diff to plain HotSpot version.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
6948
diff
changeset
|
70 protected: |
0 | 71 ScopeDesc* _scope; |
23731
1ceab3d13eb8
Add a vframe_id to jvmtiDeferredLocalVariable to properly track vframe identity
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
8151
diff
changeset
|
72 int _vframe_id; |
0 | 73 |
74 //StackValue resolve(ScopeValue* sv) const; | |
75 BasicLock* resolve_monitor_lock(Location location) const; | |
76 StackValue *create_stack_value(ScopeValue *sv) const; | |
77 | |
78 private: | |
23731
1ceab3d13eb8
Add a vframe_id to jvmtiDeferredLocalVariable to properly track vframe identity
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
8151
diff
changeset
|
79 compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, ScopeDesc* scope, int vframe_id); |
0 | 80 |
81 #ifndef PRODUCT | |
82 public: | |
83 void verify() const; | |
84 #endif | |
85 }; | |
86 | |
87 // In order to implement set_locals for compiled vframes we must | |
88 // store updated locals in a data structure that contains enough | |
89 // information to recognize equality with a vframe and to store | |
90 // any updated locals. | |
91 | |
92 class jvmtiDeferredLocalVariable; | |
6197 | 93 class jvmtiDeferredLocalVariableSet : public CHeapObj<mtCompiler> { |
0 | 94 private: |
95 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
96 Method* _method; |
0 | 97 int _bci; |
98 intptr_t* _id; | |
23731
1ceab3d13eb8
Add a vframe_id to jvmtiDeferredLocalVariable to properly track vframe identity
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
8151
diff
changeset
|
99 int _vframe_id; |
0 | 100 GrowableArray<jvmtiDeferredLocalVariable*>* _locals; |
101 | |
102 public: | |
103 // JVM state | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
104 Method* method() const { return _method; } |
0 | 105 int bci() const { return _bci; } |
106 intptr_t* id() const { return _id; } | |
23731
1ceab3d13eb8
Add a vframe_id to jvmtiDeferredLocalVariable to properly track vframe identity
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
8151
diff
changeset
|
107 int vframe_id() const { return _vframe_id; } |
0 | 108 GrowableArray<jvmtiDeferredLocalVariable*>* locals() const { return _locals; } |
109 void set_local_at(int idx, BasicType typ, jvalue val); | |
110 | |
111 // Does the vframe match this jvmtiDeferredLocalVariableSet | |
112 bool matches(vframe* vf); | |
113 // GC | |
114 void oops_do(OopClosure* f); | |
115 | |
116 // constructor | |
23731
1ceab3d13eb8
Add a vframe_id to jvmtiDeferredLocalVariable to properly track vframe identity
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
8151
diff
changeset
|
117 jvmtiDeferredLocalVariableSet(Method* method, int bci, intptr_t* id, int vframe_id); |
0 | 118 |
119 // destructor | |
120 ~jvmtiDeferredLocalVariableSet(); | |
121 | |
122 | |
123 }; | |
124 | |
6197 | 125 class jvmtiDeferredLocalVariable : public CHeapObj<mtCompiler> { |
0 | 126 public: |
127 | |
128 jvmtiDeferredLocalVariable(int index, BasicType type, jvalue value); | |
129 | |
130 BasicType type(void) { return _type; } | |
131 int index(void) { return _index; } | |
132 jvalue value(void) { return _value; } | |
133 // Only mutator is for value as only it can change | |
134 void set_value(jvalue value) { _value = value; } | |
135 // For gc | |
136 oop* oop_addr(void) { return (oop*) &_value.l; } | |
137 | |
138 private: | |
139 | |
140 BasicType _type; | |
141 jvalue _value; | |
142 int _index; | |
143 | |
144 }; | |
1972 | 145 |
146 #endif // SHARE_VM_RUNTIME_VFRAME_HP_HPP |