6976636: JVM/TI test ex03t001 fails assertion
authorsspitsyn
Mon, 17 Mar 2014 19:29:29 -0700
changeset 23447 271ad7631939
parent 23446 a8275418a69e
child 23448 0bd799a983a8
6976636: JVM/TI test ex03t001 fails assertion Summary: Relax assert in the post_class_unload for the CMS case Reviewed-by: dcubed, dsamersoff Contributed-by: serguei.spitsyn@oracle.com
hotspot/src/share/vm/prims/jvmtiExport.cpp
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp	Mon Mar 17 13:39:17 2014 -0400
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp	Mon Mar 17 19:29:29 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -993,7 +993,9 @@
         // Before we call the JVMTI agent, we have to set the state in the
         // thread for which we are proxying.
         JavaThreadState prev_state = real_thread->thread_state();
-        assert(prev_state == _thread_blocked, "JavaThread should be at safepoint");
+        assert(((Thread *)real_thread)->is_ConcurrentGC_thread() ||
+               (real_thread->is_Java_thread() && prev_state == _thread_blocked),
+               "should be ConcurrentGCThread or JavaThread at safepoint");
         real_thread->set_thread_state(_thread_in_native);
 
         jvmtiExtensionEvent callback = env->ext_callbacks()->ClassUnload;