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.hotspot.agent.jmod - Hotspot Agent Module
JDK 11 jdk.hotspot.agent.jmod is the JMOD file for JDK 11 Hotspot Agent module.
JDK 11 Hotspot Agent module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.hotspot.agent.jmod.
JDK 11 Hotspot Agent module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Hotspot Agent module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.hotspot.agent.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/jvm/hotspot/tools/PStack.java
/* * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * */ package sun.jvm.hotspot.tools; import java.io.*; import java.util.*; import sun.jvm.hotspot.code.*; import sun.jvm.hotspot.interpreter.*; import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.debugger.cdbg.*; import sun.jvm.hotspot.oops.*; import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.utilities.PlatformInfo; public class PStack extends Tool { // in non-verbose mode, Method*s are not printed in java frames public PStack(boolean v, boolean concurrentLocks) { this.verbose = v; this.concurrentLocks = concurrentLocks; } public PStack() { this(true, true); } public PStack(JVMDebugger d) { super(d); } public void run() { run(System.out); } public void run(PrintStream out) { Debugger dbg = getAgent().getDebugger(); run(out, dbg); } public void run(PrintStream out, Debugger dbg) { if (PlatformInfo.getOS().equals("darwin")) { out.println("Not available on Darwin"); return; } CDebugger cdbg = dbg.getCDebugger(); if (cdbg != null) { ConcurrentLocksPrinter concLocksPrinter = null; // compute and cache java Vframes. initJFrameCache(); if (concurrentLocks) { concLocksPrinter = new ConcurrentLocksPrinter(); } // print Java level deadlocks try { DeadlockDetector.print(out); } catch (Exception exp) { out.println("can't print deadlock information: " + exp.getMessage()); } List l = cdbg.getThreadList(); final boolean cdbgCanDemangle = cdbg.canDemangle(); for (Iterator itr = l.iterator() ; itr.hasNext();) { ThreadProxy th = (ThreadProxy) itr.next(); try { CFrame f = cdbg.topFrameForThread(th); out.print("----------------- "); out.print(th); out.println(" -----------------"); JavaThread jthread = (JavaThread) proxyToThread.get(th); if (jthread != null) { jthread.printThreadInfoOn(out); } while (f != null) { ClosestSymbol sym = f.closestSymbolToPC(); Address pc = f.pc(); out.print(pc + "\t"); if (sym != null) { String name = sym.getName(); if (cdbgCanDemangle) { name = cdbg.demangle(name); } out.print(name); long diff = sym.getOffset(); if (diff != 0L) { out.print(" + 0x" + Long.toHexString(diff)); } out.println(); } else { // look for one or more java frames String[] names = null; // check interpreter frame Interpreter interp = VM.getVM().getInterpreter(); if (interp.contains(pc)) { names = getJavaNames(th, f.localVariableBase()); // print codelet name if we can't determine method if (names == null || names.length == 0) { out.print("<interpreter> "); InterpreterCodelet ic = interp.getCodeletContaining(pc); if (ic != null) { String desc = ic.getDescription(); if (desc != null) out.print(desc); } out.println(); } } else { // look for known code blobs CodeCache c = VM.getVM().getCodeCache(); if (c.contains(pc)) { CodeBlob cb = c.findBlobUnsafe(pc); if (cb.isNMethod()) { names = getJavaNames(th, f.localVariableBase()); // just print compiled code, if can't determine method if (names == null || names.length == 0) { out.println("<Unknown compiled code>"); } } else if (cb.isBufferBlob()) { out.println("<StubRoutines>"); } else if (cb.isRuntimeStub()) { out.println("<RuntimeStub>"); } else if (cb.isDeoptimizationStub()) { out.println("<DeoptimizationStub>"); } else if (cb.isUncommonTrapStub()) { out.println("<UncommonTrap>"); } else if (cb.isExceptionStub()) { out.println("<ExceptionStub>"); } else if (cb.isSafepointStub()) { out.println("<SafepointStub>"); } else { out.println("<Unknown code blob>"); } } else { printUnknown(out); } } // print java frames, if any if (names != null && names.length != 0) { // print java frame(s) for (int i = 0; i < names.length; i++) { out.println(names[i]); } } } f = f.sender(th); } } catch (Exception exp) { exp.printStackTrace(); // continue, may be we can do a better job for other threads } if (concurrentLocks) { JavaThread jthread = (JavaThread) proxyToThread.get(th); if (jthread != null) { concLocksPrinter.print(jthread, out); } } } // for threads } else { if (getDebugeeType() == DEBUGEE_REMOTE) { out.println("remote configuration is not yet implemented"); } else { out.println("not yet implemented (debugger does not support CDebugger)!"); } } } public static void main(String[] args) throws Exception { PStack t = new PStack(); t.execute(args); } // -- Internals only below this point private Map jframeCache; // Map<ThreadProxy, JavaVFrame[]> private Map proxyToThread; // Map<ThreadProxy, JavaThread> private PrintStream out; private boolean verbose; private boolean concurrentLocks; private void initJFrameCache() { // cache frames for subsequent reference jframeCache = new HashMap(); proxyToThread = new HashMap(); Threads threads = VM.getVM().getThreads(); for (JavaThread cur = threads.first(); cur != null; cur = cur.next()) { List tmp = new ArrayList(10); try { for (JavaVFrame vf = cur.getLastJavaVFrameDbg(); vf != null; vf = vf.javaSender()) { tmp.add(vf); } } catch (Exception exp) { // may be we may get frames for other threads, continue // after printing stack trace. exp.printStackTrace(); } JavaVFrame[] jvframes = new JavaVFrame[tmp.size()]; System.arraycopy(tmp.toArray(), 0, jvframes, 0, jvframes.length); jframeCache.put(cur.getThreadProxy(), jvframes); proxyToThread.put(cur.getThreadProxy(), cur); } } private void printUnknown(PrintStream out) { out.println("\t????????"); } private String[] getJavaNames(ThreadProxy th, Address fp) { if (fp == null) { return null; } JavaVFrame[] jvframes = (JavaVFrame[]) jframeCache.get(th); if (jvframes == null) return null; // not a java thread List names = new ArrayList(10); for (int fCount = 0; fCount < jvframes.length; fCount++) { JavaVFrame vf = jvframes[fCount]; Frame f = vf.getFrame(); if (fp.equals(f.getFP())) { StringBuffer sb = new StringBuffer(); Method method = vf.getMethod(); // a special char to identify java frames in output sb.append("* "); sb.append(method.externalNameAndSignature()); sb.append(" bci:" + vf.getBCI()); int lineNumber = method.getLineNumberFromBCI(vf.getBCI()); if (lineNumber != -1) { sb.append(" line:" + lineNumber); } if (verbose) { sb.append(" Method*:" + method.getAddress()); } if (vf.isCompiledFrame()) { sb.append(" (Compiled frame"); if (vf.isDeoptimized()) { sb.append(" [deoptimized]"); } } else if (vf.isInterpretedFrame()) { sb.append(" (Interpreted frame"); } if (vf.mayBeImpreciseDbg()) { sb.append("; information may be imprecise"); } sb.append(")"); names.add(sb.toString()); } } String[] res = new String[names.size()]; System.arraycopy(names.toArray(), 0, res, 0, res.length); return res; } }
⏎ sun/jvm/hotspot/tools/PStack.java
Or download all of them as a single archive file:
File name: jdk.hotspot.agent-11.0.1-src.zip File size: 1243786 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.httpserver.jmod - HTTP Server Module
2020-02-29, 133330👍, 0💬
Popular Posts:
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
How to download and install Apache XMLBeans-2.6.0.zip? If you want to try the XMLBeans Java library,...
The Java Naming and Directory Interface (JNDI) is part of the Java platform, providing applications ...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...
How to download and install JDK (Java Development Kit) 1.4? If you want to write Java applications, ...