aboutsummaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authorkamg <none@none>2011-02-02 14:38:01 -0500
committerkamg <none@none>2011-02-02 14:38:01 -0500
commit4f0374a12abebe336b73a96afa91282bc07c8da2 (patch)
tree234a9ac2155f0f532cbc1a5b002bbf9ec4f8f84b /agent
parent643d5e0a6fbadf925a82b48a1c102e540a83592e (diff)
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 --HG-- rename : agent/src/share/classes/sun/jvm/hotspot/runtime/LowMemoryDetectorThread.java => agent/src/share/classes/sun/jvm/hotspot/runtime/ServiceThread.java
Diffstat (limited to 'agent')
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/runtime/ServiceThread.java (renamed from agent/src/share/classes/sun/jvm/hotspot/runtime/LowMemoryDetectorThread.java)8
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java4
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java8
3 files changed, 10 insertions, 10 deletions
diff --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/LowMemoryDetectorThread.java b/agent/src/share/classes/sun/jvm/hotspot/runtime/ServiceThread.java
index f3d630d16..ad8148809 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/LowMemoryDetectorThread.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/ServiceThread.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -29,13 +29,13 @@ import java.io.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.types.*;
-public class LowMemoryDetectorThread extends JavaThread {
- public LowMemoryDetectorThread(Address addr) {
+public class ServiceThread extends JavaThread {
+ public ServiceThread(Address addr) {
super(addr);
}
public boolean isJavaThread() { return false; }
public boolean isHiddenFromExternalView() { return true; }
- public boolean isLowMemoryDetectorThread() { return true; }
+ public boolean isServiceThread() { return true; }
}
diff --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java b/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java
index 3a3466eeb..2948f7b95 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java
@@ -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
@@ -111,7 +111,7 @@ public class Thread extends VMObject {
public boolean isJvmtiAgentThread() { return false; }
public boolean isWatcherThread() { return false; }
public boolean isConcurrentMarkSweepThread() { return false; }
- public boolean isLowMemoryDetectorThread() { return false; }
+ public boolean isServiceThread() { return false; }
/** Memory operations */
public void oopsDo(AddressVisitor oopVisitor) {
diff --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java b/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
index 29196ee05..d90d08bd7 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
@@ -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 @@ public class Threads {
// 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 @@ public class Threads {
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);
}
}