equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
128 if (!VM.getVM().isCore()) { |
128 if (!VM.getVM().isCore()) { |
129 virtualConstructor.addMapping("CompilerThread", CompilerThread.class); |
129 virtualConstructor.addMapping("CompilerThread", CompilerThread.class); |
130 virtualConstructor.addMapping("CodeCacheSweeperThread", CodeCacheSweeperThread.class); |
130 virtualConstructor.addMapping("CodeCacheSweeperThread", CodeCacheSweeperThread.class); |
131 } |
131 } |
132 // for now, use JavaThread itself. fix it later with appropriate class if needed |
132 // for now, use JavaThread itself. fix it later with appropriate class if needed |
133 virtualConstructor.addMapping("SurrogateLockerThread", JavaThread.class); |
133 virtualConstructor.addMapping("ReferencePendingListLockerThread", JavaThread.class); |
134 virtualConstructor.addMapping("JvmtiAgentThread", JvmtiAgentThread.class); |
134 virtualConstructor.addMapping("JvmtiAgentThread", JvmtiAgentThread.class); |
135 virtualConstructor.addMapping("ServiceThread", ServiceThread.class); |
135 virtualConstructor.addMapping("ServiceThread", ServiceThread.class); |
136 } |
136 } |
137 |
137 |
138 public Threads() { |
138 public Threads() { |
170 JavaThread thread = (JavaThread)virtualConstructor.instantiateWrapperFor(threadAddr); |
170 JavaThread thread = (JavaThread)virtualConstructor.instantiateWrapperFor(threadAddr); |
171 thread.setThreadPDAccess(access); |
171 thread.setThreadPDAccess(access); |
172 return thread; |
172 return thread; |
173 } catch (Exception e) { |
173 } catch (Exception e) { |
174 throw new RuntimeException("Unable to deduce type of thread from address " + threadAddr + |
174 throw new RuntimeException("Unable to deduce type of thread from address " + threadAddr + |
175 " (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, SurrogateLockerThread, or CodeCacheSweeperThread)", e); |
175 " (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, ReferencePendingListLockerThread, or CodeCacheSweeperThread)", e); |
176 } |
176 } |
177 } |
177 } |
178 |
178 |
179 /** Memory operations */ |
179 /** Memory operations */ |
180 public void oopsDo(AddressVisitor oopVisitor) { |
180 public void oopsDo(AddressVisitor oopVisitor) { |