# HG changeset patch # User coleenp # Date 1391718728 0 # Node ID 260ff1b7679045bfa2495e3f722799f2e3c15763 # Parent c09d6af75fd930e4ef550c9e48fc7139d7e2cc50# Parent 2c2a99f6cf834aa075fad26a515b94d404a09200 Merge diff -r 2c2a99f6cf83 -r 260ff1b76790 src/share/vm/runtime/synchronizer.cpp --- a/src/share/vm/runtime/synchronizer.cpp Thu Feb 06 14:28:35 2014 -0500 +++ b/src/share/vm/runtime/synchronizer.cpp Thu Feb 06 20:32:08 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, 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 @@ -373,23 +373,24 @@ // ----------------------------------------------------------------------------- // Wait/Notify/NotifyAll // NOTE: must use heavy weight monitor to handle wait() -void ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) { +int ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) { if (UseBiasedLocking) { BiasedLocking::revoke_and_rebias(obj, false, THREAD); assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); } if (millis < 0) { TEVENT (wait - throw IAX) ; - THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); } ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); DTRACE_MONITOR_WAIT_PROBE(monitor, obj(), THREAD, millis); monitor->wait(millis, true, THREAD); - /* This dummy call is in place to get around dtrace bug 6254741. Once - that's fixed we can uncomment the following line and remove the call */ + // This dummy call is in place to get around dtrace bug 6254741. Once + // that's fixed we can uncomment the following line, remove the call + // and change this function back into a "void" func. // DTRACE_MONITOR_PROBE(waited, monitor, obj(), THREAD); - dtrace_waited_probe(monitor, obj, THREAD); + return dtrace_waited_probe(monitor, obj, THREAD); } void ObjectSynchronizer::waitUninterruptibly (Handle obj, jlong millis, TRAPS) { diff -r 2c2a99f6cf83 -r 260ff1b76790 src/share/vm/runtime/synchronizer.hpp --- a/src/share/vm/runtime/synchronizer.hpp Thu Feb 06 14:28:35 2014 -0500 +++ b/src/share/vm/runtime/synchronizer.hpp Thu Feb 06 20:32:08 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, 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 @@ -68,7 +68,7 @@ static void jni_exit (oop obj, Thread* THREAD); // Handle all interpreter, compiler and jni cases - static void wait (Handle obj, jlong millis, TRAPS); + static int wait (Handle obj, jlong millis, TRAPS); static void notify (Handle obj, TRAPS); static void notifyall (Handle obj, TRAPS); diff -r 2c2a99f6cf83 -r 260ff1b76790 test/runtime/RedefineObject/Agent.java --- a/test/runtime/RedefineObject/Agent.java Thu Feb 06 14:28:35 2014 -0500 +++ b/test/runtime/RedefineObject/Agent.java Thu Feb 06 20:32:08 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, 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 @@ -65,8 +65,8 @@ public static void main(String[] args) { byte[] ba = new byte[0]; - // If it survives 1000 GC's, it's good. - for (int i = 0; i < 1000 ; i++) { + // If it survives 100 GC's, it's good. + for (int i = 0; i < 100 ; i++) { System.gc(); ba.clone(); }