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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "memory/allocation.inline.hpp"
27 #include "oops/constantPool.hpp"
28 #include "oops/method.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "runtime/handles.inline.hpp"
31 #include "runtime/thread.inline.hpp"
32
33 #ifdef ASSERT
34 oop* HandleArea::allocate_handle(oop obj) {
35 assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
36 assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
37 assert(oopDesc::is_oop(obj), "not an oop: " INTPTR_FORMAT, p2i(obj));
38 return real_allocate_handle(obj);
39 }
40 #endif
41
42 // Copy constructors and destructors for metadata handles
43 // These do too much to inline.
44 #define DEF_METADATA_HANDLE_FN_NOINLINE(name, type) \
45 name##Handle::name##Handle(const name##Handle &h) { \
46 _value = h._value; \
47 if (_value != NULL) { \
48 assert(_value->is_valid(), "obj is valid"); \
49 if (h._thread != NULL) { \
|
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "memory/allocation.inline.hpp"
27 #include "oops/constantPool.hpp"
28 #include "oops/method.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "oops/inlineKlass.hpp"
31 #include "runtime/atomic.hpp"
32 #include "runtime/handles.inline.hpp"
33 #include "runtime/thread.inline.hpp"
34
35 #ifdef ASSERT
36 oop* HandleArea::allocate_handle(oop obj) {
37 assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
38 assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
39 assert(oopDesc::is_oop(obj), "not an oop: " INTPTR_FORMAT, p2i(obj));
40 return real_allocate_handle(obj);
41 }
42 #endif
43
44 // Copy constructors and destructors for metadata handles
45 // These do too much to inline.
46 #define DEF_METADATA_HANDLE_FN_NOINLINE(name, type) \
47 name##Handle::name##Handle(const name##Handle &h) { \
48 _value = h._value; \
49 if (_value != NULL) { \
50 assert(_value->is_valid(), "obj is valid"); \
51 if (h._thread != NULL) { \
|