Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 jdk.jdi.jmod - JDI Tool
JDK 11 jdk.jdi.jmod is the JMOD file for JDK 11 JDI (Java Debug Interface) tool.
JDK 11 JDI tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jdi.jmod.
JDK 11 JDI tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JDI tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jdi.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/jdi/VMState.java
/* * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.tools.jdi; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import com.sun.jdi.ThreadGroupReference; import com.sun.jdi.ThreadReference; import com.sun.jdi.VirtualMachine; class VMState { private final VirtualMachineImpl vm; // Listeners private final List<WeakReference<VMListener>> listeners = new ArrayList<>(); // synchronized (this) private boolean notifyingListeners = false; // synchronized (this) /* * Certain information can be cached only when the entire VM is * suspended and there are no pending resumes. The fields below * are used to track whether there are pending resumes. (There * is an assumption that JDWP command ids are increasing over time.) */ private int lastCompletedCommandId = 0; // synchronized (this) private int lastResumeCommandId = 0; // synchronized (this) // This is cached only while the VM is suspended private static class Cache { List<ThreadGroupReference> groups = null; // cached Top Level ThreadGroups List<ThreadReference> threads = null; // cached Threads } private Cache cache = null; // synchronized (this) private static final Cache markerCache = new Cache(); private void disableCache() { synchronized (this) { cache = null; } } private void enableCache() { synchronized (this) { cache = markerCache; } } private Cache getCache() { synchronized (this) { if (cache == markerCache) { cache = new Cache(); } return cache; } } VMState(VirtualMachineImpl vm) { this.vm = vm; } /** * Is the VM currently suspended, for the purpose of caching? * Must be called synchronized on vm.state() */ boolean isSuspended() { return cache != null; } /* * A JDWP command has been completed (reply has been received). * Update data that tracks pending resume commands. */ synchronized void notifyCommandComplete(int id) { lastCompletedCommandId = id; } synchronized void freeze() { if (cache == null && (lastCompletedCommandId >= lastResumeCommandId)) { /* * No pending resumes to worry about. The VM is suspended * and additional state can be cached. Notify all * interested listeners. */ processVMAction(new VMAction(vm, VMAction.VM_SUSPENDED)); enableCache(); } } synchronized PacketStream thawCommand(CommandSender sender) { PacketStream stream = sender.send(); lastResumeCommandId = stream.id(); thaw(); return stream; } /** * All threads are resuming */ void thaw() { thaw(null); } /** * Tell listeners to invalidate suspend-sensitive caches. * If resumingThread != null, then only that thread is being * resumed. */ synchronized void thaw(ThreadReference resumingThread) { if (cache != null) { if ((vm.traceFlags & VirtualMachine.TRACE_OBJREFS) != 0) { vm.printTrace("Clearing VM suspended cache"); } disableCache(); } processVMAction(new VMAction(vm, resumingThread, VMAction.VM_NOT_SUSPENDED)); } private synchronized void processVMAction(VMAction action) { if (!notifyingListeners) { // Prevent recursion notifyingListeners = true; Iterator<WeakReference<VMListener>> iter = listeners.iterator(); while (iter.hasNext()) { WeakReference<VMListener> ref = iter.next(); VMListener listener = ref.get(); if (listener != null) { boolean keep = true; switch (action.id()) { case VMAction.VM_SUSPENDED: keep = listener.vmSuspended(action); break; case VMAction.VM_NOT_SUSPENDED: keep = listener.vmNotSuspended(action); break; } if (!keep) { iter.remove(); } } else { // Listener is unreachable; clean up iter.remove(); } } notifyingListeners = false; } } synchronized void addListener(VMListener listener) { listeners.add(new WeakReference<VMListener>(listener)); } synchronized boolean hasListener(VMListener listener) { return listeners.contains(listener); } synchronized void removeListener(VMListener listener) { Iterator<WeakReference<VMListener>> iter = listeners.iterator(); while (iter.hasNext()) { WeakReference<VMListener> ref = iter.next(); if (listener.equals(ref.get())) { iter.remove(); break; } } } List<ThreadReference> allThreads() { List<ThreadReference> threads = null; try { Cache local = getCache(); if (local != null) { // may be stale when returned, but not provably so threads = local.threads; } if (threads == null) { threads = Arrays.asList((ThreadReference[])JDWP.VirtualMachine.AllThreads. process(vm).threads); if (local != null) { local.threads = threads; if ((vm.traceFlags & VirtualMachine.TRACE_OBJREFS) != 0) { vm.printTrace("Caching all threads (count = " + threads.size() + ") while VM suspended"); } } } } catch (JDWPException exc) { throw exc.toJDIException(); } return threads; } List<ThreadGroupReference> topLevelThreadGroups() { List<ThreadGroupReference> groups = null; try { Cache local = getCache(); if (local != null) { groups = local.groups; } if (groups == null) { groups = Arrays.asList( (ThreadGroupReference[])JDWP.VirtualMachine.TopLevelThreadGroups. process(vm).groups); if (local != null) { local.groups = groups; if ((vm.traceFlags & VirtualMachine.TRACE_OBJREFS) != 0) { vm.printTrace( "Caching top level thread groups (count = " + groups.size() + ") while VM suspended"); } } } } catch (JDWPException exc) { throw exc.toJDIException(); } return groups; } }
⏎ com/sun/tools/jdi/VMState.java
Or download all of them as a single archive file:
File name: jdk.jdi-11.0.1-src.zip File size: 464844 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jdwp.agent.jmod - JDWP Agent Module
2020-07-07, 63451👍, 0💬
Popular Posts:
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.1? The if you...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JDK 11 java.management.jmod is the JMOD file for JDK 11 Management module. JDK 11 Management module ...
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...