changeset 23447:271ad7631939

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
author sspitsyn
date Mon, 17 Mar 2014 19:29:29 -0700
parents a8275418a69e
children 0bd799a983a8
files hotspot/src/share/vm/prims/jvmtiExport.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;