comparison src/hotspot/share/runtime/vframe_hp.hpp @ 52291:35a6956f4243

8209976: Improve iteration over non-JavaThreads Summary: Add NonJavaThread and move NamedThread iteration to new class. Reviewed-by: eosterlund, coleenp, rkennke
author kbarrett
date Tue, 28 Aug 2018 16:04:54 -0400
parents 71c04702a3d5
children 2f41e4935c34
comparison
equal deleted inserted replaced
0:099cc9fa23d6 1:816ec38bc031
49 static compiledVFrame* cast(vframe* vf) { 49 static compiledVFrame* cast(vframe* vf) {
50 assert(vf == NULL || vf->is_compiled_frame(), "must be compiled frame"); 50 assert(vf == NULL || vf->is_compiled_frame(), "must be compiled frame");
51 return (compiledVFrame*) vf; 51 return (compiledVFrame*) vf;
52 } 52 }
53 53
54 void update_deferred_value(BasicType type, int index, jvalue value);
55
54 public: 56 public:
55 // Constructors 57 // Constructors
56 compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, CompiledMethod* nm); 58 compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, CompiledMethod* nm);
57 59
58 // Update a local in a compiled frame. Update happens when deopt occurs 60 // Update a local in a compiled frame. Update happens when deopt occurs
59 void update_local(BasicType type, int index, jvalue value); 61 void update_local(BasicType type, int index, jvalue value);
62
63 // Update an expression stack value in a compiled frame. Update happens when deopt occurs
64 void update_stack(BasicType type, int index, jvalue value);
65
66 // Update a lock value in a compiled frame. Update happens when deopt occurs
67 void update_monitor(int index, MonitorInfo* value);
60 68
61 // Returns the active nmethod 69 // Returns the active nmethod
62 CompiledMethod* code() const; 70 CompiledMethod* code() const;
63 71
64 // Returns the scopeDesc 72 // Returns the scopeDesc
89 // information to recognize equality with a vframe and to store 97 // information to recognize equality with a vframe and to store
90 // any updated locals. 98 // any updated locals.
91 99
92 class jvmtiDeferredLocalVariable; 100 class jvmtiDeferredLocalVariable;
93 class jvmtiDeferredLocalVariableSet : public CHeapObj<mtCompiler> { 101 class jvmtiDeferredLocalVariableSet : public CHeapObj<mtCompiler> {
102 friend class compiledVFrame;
103
94 private: 104 private:
95 105
96 Method* _method; 106 Method* _method;
97 int _bci; 107 int _bci;
98 intptr_t* _id; 108 intptr_t* _id;
99 int _vframe_id; 109 int _vframe_id;
100 GrowableArray<jvmtiDeferredLocalVariable*>* _locals; 110 GrowableArray<jvmtiDeferredLocalVariable*>* _locals;
101 111
112 void update_value(StackValueCollection* locals, BasicType type, int index, jvalue value);
113
114 void set_value_at(int idx, BasicType typ, jvalue val);
115
102 public: 116 public:
103 // JVM state 117 // JVM state
104 Method* method() const { return _method; } 118 Method* method() const { return _method; }
105 int bci() const { return _bci; } 119 int bci() const { return _bci; }
106 intptr_t* id() const { return _id; } 120 intptr_t* id() const { return _id; }
107 int vframe_id() const { return _vframe_id; } 121 int vframe_id() const { return _vframe_id; }
108 GrowableArray<jvmtiDeferredLocalVariable*>* locals() const { return _locals; } 122
109 void set_local_at(int idx, BasicType typ, jvalue val); 123 void update_locals(StackValueCollection* locals);
124 void update_stack(StackValueCollection* locals);
125 void update_monitors(GrowableArray<MonitorInfo*>* monitors);
110 126
111 // Does the vframe match this jvmtiDeferredLocalVariableSet 127 // Does the vframe match this jvmtiDeferredLocalVariableSet
112 bool matches(vframe* vf); 128 bool matches(const vframe* vf);
113 // GC 129 // GC
114 void oops_do(OopClosure* f); 130 void oops_do(OopClosure* f);
115 131
116 // constructor 132 // constructor
117 jvmtiDeferredLocalVariableSet(Method* method, int bci, intptr_t* id, int vframe_id); 133 jvmtiDeferredLocalVariableSet(Method* method, int bci, intptr_t* id, int vframe_id);