comparison src/share/vm/runtime/synchronizer.cpp @ 7643:3ac7d10a6572

Merge with hsx25/hotspot.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 31 Jan 2013 15:42:25 +0100
parents 291ffc492eb6 f3184f32ce0b
children 5fc51c1ecdeb
comparison
equal deleted inserted replaced
7573:17b6a63fe7c2 7643:3ac7d10a6572
1 /* 1 /*
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
331 331
332 // NOTE: must use heavy weight monitor to handle jni monitor exit 332 // NOTE: must use heavy weight monitor to handle jni monitor exit
333 void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) { 333 void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) {
334 TEVENT (jni_exit) ; 334 TEVENT (jni_exit) ;
335 if (UseBiasedLocking) { 335 if (UseBiasedLocking) {
336 BiasedLocking::revoke_and_rebias(obj, false, THREAD); 336 Handle h_obj(THREAD, obj);
337 BiasedLocking::revoke_and_rebias(h_obj, false, THREAD);
338 obj = h_obj();
337 } 339 }
338 assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); 340 assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now");
339 341
340 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj); 342 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj);
341 // If this thread has locked the object, exit the monitor. Note: can't use 343 // If this thread has locked the object, exit the monitor. Note: can't use