< prev index next >

src/hotspot/share/runtime/vframe.hpp

Print this page
rev 59866 : 8249192: MonitorInfo stores raw oops across safepoints
Summary: Change raw oops in MonitorInfo to Handles and update Resource/HandleMarks.
Reviewed-by: sspitsyn, dholmes, coleenp, dcubed

*** 1,7 **** /* ! * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 28,37 **** --- 28,38 ---- #include "code/debugInfo.hpp" #include "code/debugInfoRec.hpp" #include "code/location.hpp" #include "oops/oop.hpp" #include "runtime/frame.hpp" + #include "runtime/handles.inline.hpp" #include "runtime/stackValue.hpp" #include "runtime/stackValueCollection.hpp" #include "utilities/growableArray.hpp" // vframes are virtual stack frames representing source level activations.
*** 239,276 **** // A MonitorInfo is a ResourceObject that describes a the pair: // 1) the owner of the monitor // 2) the monitor lock class MonitorInfo : public ResourceObj { private: ! oop _owner; // the object owning the monitor BasicLock* _lock; ! oop _owner_klass; // klass (mirror) if owner was scalar replaced bool _eliminated; bool _owner_is_scalar_replaced; public: // Constructor ! MonitorInfo(oop owner, BasicLock* lock, bool eliminated, bool owner_is_scalar_replaced) { ! if (!owner_is_scalar_replaced) { ! _owner = owner; ! _owner_klass = NULL; ! } else { ! assert(eliminated, "monitor should be eliminated for scalar replaced object"); ! _owner = NULL; ! _owner_klass = owner; ! } ! _lock = lock; ! _eliminated = eliminated; ! _owner_is_scalar_replaced = owner_is_scalar_replaced; ! } // Accessors oop owner() const { assert(!_owner_is_scalar_replaced, "should not be called for scalar replaced object"); ! return _owner; } oop owner_klass() const { assert(_owner_is_scalar_replaced, "should not be called for not scalar replaced object"); ! return _owner_klass; } BasicLock* lock() const { return _lock; } bool eliminated() const { return _eliminated; } bool owner_is_scalar_replaced() const { return _owner_is_scalar_replaced; } }; --- 240,265 ---- // A MonitorInfo is a ResourceObject that describes a the pair: // 1) the owner of the monitor // 2) the monitor lock class MonitorInfo : public ResourceObj { private: ! Handle _owner; // the object owning the monitor BasicLock* _lock; ! Handle _owner_klass; // klass (mirror) if owner was scalar replaced bool _eliminated; bool _owner_is_scalar_replaced; public: // Constructor ! MonitorInfo(oop owner, BasicLock* lock, bool eliminated, bool owner_is_scalar_replaced); // Accessors oop owner() const { assert(!_owner_is_scalar_replaced, "should not be called for scalar replaced object"); ! return _owner(); } oop owner_klass() const { assert(_owner_is_scalar_replaced, "should not be called for not scalar replaced object"); ! return _owner_klass(); } BasicLock* lock() const { return _lock; } bool eliminated() const { return _eliminated; } bool owner_is_scalar_replaced() const { return _owner_is_scalar_replaced; } };
< prev index next >