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/ui/FindInHeapPanel.java
/* * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * */ package sun.jvm.hotspot.ui; import java.util.*; import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.oops.*; import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.utilities.*; /** Finds a given (Address) value in the heap. Only intended for use in a debugging system. */ public class FindInHeapPanel extends JPanel { private RawHeapVisitor iterator; private long addressSize; private long usedSize; private long iterated; private Address value; private ProgressBarPanel progressBar; private HistoryComboBox addressField; private JButton findButton; private JTextArea textArea; private ArrayList updates; private double lastFrac; static final double minUpdateFraction = 0.05; public FindInHeapPanel() { super(); setLayout(new BorderLayout()); JPanel topPanel = new JPanel(); topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.Y_AXIS)); JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.add(new JLabel("Address to search for:")); addressField = new HistoryComboBox(); panel.add(addressField); addressSize = VM.getVM().getAddressSize(); iterator = new RawHeapVisitor() { boolean error = false; public void prologue(long used) { usedSize = used; iterated = 0; lastFrac = 0; error = false; updates = new ArrayList(); } public void visitAddress(Address addr) { if (error) return; Address val = addr.getAddressAt(0); if (AddressOps.equal(val, value)) { error = reportResult(addr); } iterated += addressSize; updateProgressBar(); } public void visitCompOopAddress(Address addr) { if (error) return; Address val = addr.getCompOopAddressAt(0); if (AddressOps.equal(val, value)) { error = reportResult(addr); } iterated += addressSize; updateProgressBar(); } public void epilogue() { iterated = 0; updateProgressBar(); findButton.setEnabled(true); } }; findButton = new JButton("Find"); ActionListener listener = new ActionListener() { public void actionPerformed(ActionEvent e) { clearResultWindow(); // Parse text try { Address val = VM.getVM().getDebugger().parseAddress(addressField.getText()); value = val; findButton.setEnabled(false); java.lang.Thread t = new java.lang.Thread(new Runnable() { public void run() { try { VM.getVM().getObjectHeap().iterateRaw(iterator); } finally { SwingUtilities.invokeLater(new Runnable() { public void run() { findButton.setEnabled(true); } }); } } }); t.start(); } catch (Exception ex) { textArea.setText("Error parsing address"); } } }; panel.add(findButton); findButton.addActionListener(listener); addressField.addActionListener(listener); topPanel.add(panel); progressBar = new ProgressBarPanel(ProgressBarPanel.HORIZONTAL, "Search progress:"); topPanel.add(progressBar); add(topPanel, BorderLayout.NORTH); textArea = new JTextArea(); JScrollPane scroller = new JScrollPane(textArea); add(scroller, BorderLayout.CENTER); } private boolean pendingUpdate = false; private boolean reportResult(final Address addr) { synchronized (this) { try { updates.add("found at " + addr + "\n"); if (!pendingUpdate) { pendingUpdate = true; SwingUtilities.invokeLater(new Runnable() { public void run() { updateResultWindow(); } }); } } catch (Throwable t) { t.printStackTrace(); return true; } } return false; } private void clearResultWindow() { SwingUtilities.invokeLater(new Runnable() { public void run() { Document d = textArea.getDocument(); try { d.remove(0, d.getLength()); } catch (BadLocationException e) { } } }); } private synchronized void updateResultWindow() { if (updates.size() > 0) { Iterator i = updates.iterator(); while (i.hasNext()) { textArea.append((String)i.next()); } updates = new ArrayList();; } pendingUpdate = false; } private void invokeInDispatchThread(Runnable runnable) { if (EventQueue.isDispatchThread()) { runnable.run(); } else { SwingUtilities.invokeLater(runnable); } } private void updateProgressBar() { final double frac = (double) iterated / (double) usedSize; if (frac == 0.0 || (frac - lastFrac > minUpdateFraction)) { lastFrac = frac; if (iterated > usedSize) { System.out.println("iterated " + iterated + " usedSize " + usedSize); } SwingUtilities.invokeLater(new Runnable() { public void run() { progressBar.setValue(frac); } }); } } }
⏎ sun/jvm/hotspot/ui/FindInHeapPanel.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, 131302👍, 0💬
Popular Posts:
Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java...
Java Advanced Imaging (JAI) is a Java platform extension API that provides a set of object-oriented ...
What Is poi-3.5.jar - Part 2? poi-3.5.jar is one of the JAR files for Apache POI 3.5, which provides...
JDOM provides a solution for using XML from Java that is as simple as Java itself. There is no compe...
The Jakarta-ORO Java classes are a set of text-processing Java classes that provide Perl5 compatible...