equal
deleted
inserted
replaced
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 |