comparison src/share/vm/runtime/vframe.hpp @ 818:b109e761e927

6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14 Summary: Disable escape analysis when jvmti/debugger is used. Add support for EA ibto SA. Reviewed-by: never
author kvn
date Tue, 09 Jun 2009 16:19:10 -0700
parents d1605aabd0a1
children bd02caa94611 9987d9d5eb0e
comparison
equal deleted inserted replaced
3:da9f89b1e9c6 4:040c8f02e2ee
228 // 2) the monitor lock 228 // 2) the monitor lock
229 class MonitorInfo : public ResourceObj { 229 class MonitorInfo : public ResourceObj {
230 private: 230 private:
231 oop _owner; // the object owning the monitor 231 oop _owner; // the object owning the monitor
232 BasicLock* _lock; 232 BasicLock* _lock;
233 oop _owner_klass; // klass if owner was scalar replaced
233 bool _eliminated; 234 bool _eliminated;
235 bool _owner_is_scalar_replaced;
234 public: 236 public:
235 // Constructor 237 // Constructor
236 MonitorInfo(oop owner, BasicLock* lock, bool eliminated) { 238 MonitorInfo(oop owner, BasicLock* lock, bool eliminated, bool owner_is_scalar_replaced) {
237 _owner = owner; 239 if (!owner_is_scalar_replaced) {
240 _owner = owner;
241 _owner_klass = NULL;
242 } else {
243 assert(eliminated, "monitor should be eliminated for scalar replaced object");
244 _owner = NULL;
245 _owner_klass = owner;
246 }
238 _lock = lock; 247 _lock = lock;
239 _eliminated = eliminated; 248 _eliminated = eliminated;
249 _owner_is_scalar_replaced = owner_is_scalar_replaced;
240 } 250 }
241 // Accessors 251 // Accessors
242 oop owner() const { return _owner; } 252 oop owner() const {
253 assert(!_owner_is_scalar_replaced, "should not be called for scalar replaced object");
254 return _owner;
255 }
256 klassOop owner_klass() const {
257 assert(_owner_is_scalar_replaced, "should not be called for not scalar replaced object");
258 return (klassOop)_owner_klass;
259 }
243 BasicLock* lock() const { return _lock; } 260 BasicLock* lock() const { return _lock; }
244 bool eliminated() const { return _eliminated; } 261 bool eliminated() const { return _eliminated; }
262 bool owner_is_scalar_replaced() const { return _owner_is_scalar_replaced; }
245 }; 263 };
246 264
247 class vframeStreamCommon : StackObj { 265 class vframeStreamCommon : StackObj {
248 protected: 266 protected:
249 // common 267 // common