diff agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java @ 2195:bf8517f4e4d0

6766644: Redefinition of compiled method fails with assertion "Can not load classes with the Compiler thread" Summary: Defer posting events from the compiler thread: use service thread Reviewed-by: coleenp, dholmes, never, dcubed
author kamg
date Wed, 02 Feb 2011 14:38:01 -0500
parents c18cbe5936b8
children f08d439fab8c
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java	Wed Feb 02 18:38:40 2011 -0500
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java	Wed Feb 02 14:38:01 2011 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -107,14 +107,14 @@
         // for now, use JavaThread itself. fix it later with appropriate class if needed
         virtualConstructor.addMapping("SurrogateLockerThread", JavaThread.class);
         virtualConstructor.addMapping("JvmtiAgentThread", JvmtiAgentThread.class);
-        virtualConstructor.addMapping("LowMemoryDetectorThread", LowMemoryDetectorThread.class);
+        virtualConstructor.addMapping("ServiceThread", ServiceThread.class);
     }
 
     public Threads() {
     }
 
     /** NOTE: this returns objects of type JavaThread, CompilerThread,
-      JvmtiAgentThread, and LowMemoryDetectorThread.
+      JvmtiAgentThread, and ServiceThread.
       The latter four are subclasses of the former. Most operations
       (fetching the top frame, etc.) are only allowed to be performed on
       a "pure" JavaThread. For this reason, {@link
@@ -143,7 +143,7 @@
             return thread;
         } catch (Exception e) {
             throw new RuntimeException("Unable to deduce type of thread from address " + threadAddr +
-            " (expected type JavaThread, CompilerThread, LowMemoryDetectorThread, JvmtiAgentThread, or SurrogateLockerThread)", e);
+            " (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, or SurrogateLockerThread)", e);
         }
     }