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/utilities/CompactHashTable.java
/* * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * */ package sun.jvm.hotspot.utilities; import java.util.*; import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.oops.*; import sun.jvm.hotspot.types.*; import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.utilities.*; public class CompactHashTable extends VMObject { static { VM.registerVMInitializedObserver(new Observer() { public void update(Observable o, Object data) { initialize(VM.getVM().getTypeDataBase()); } }); } private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { Type type = db.lookupType("SymbolCompactHashTable"); baseAddressField = type.getAddressField("_base_address"); bucketCountField = type.getCIntegerField("_bucket_count"); entryCountField = type.getCIntegerField("_entry_count"); bucketsField = type.getAddressField("_buckets"); entriesField = type.getAddressField("_entries"); uintSize = db.lookupType("u4").getSize(); } // Fields private static CIntegerField bucketCountField; private static CIntegerField entryCountField; private static AddressField baseAddressField; private static AddressField bucketsField; private static AddressField entriesField; private static long uintSize; private static int BUCKET_OFFSET_MASK = 0x3FFFFFFF; private static int BUCKET_TYPE_SHIFT = 30; private static int VALUE_ONLY_BUCKET_TYPE = 1; public CompactHashTable(Address addr) { super(addr); } private int bucketCount() { return (int)bucketCountField.getValue(addr); } private boolean isValueOnlyBucket(int bucket_info) { return (bucket_info >> BUCKET_TYPE_SHIFT) == VALUE_ONLY_BUCKET_TYPE; } private int bucketOffset(int bucket_info) { return bucket_info & BUCKET_OFFSET_MASK; } public Symbol probe(byte[] name, long hash) { if (bucketCount() <= 0) { // This CompactHashTable is not in use return null; } long symOffset; Symbol sym; Address baseAddress = baseAddressField.getValue(addr); Address bucket = bucketsField.getValue(addr); long index = hash % bucketCount(); int bucketInfo = (int)bucket.getCIntegerAt(index * uintSize, uintSize, true); int bucketOffset = bucketOffset(bucketInfo); int nextBucketInfo = (int)bucket.getCIntegerAt((index+1) * uintSize, uintSize, true); int nextBucketOffset = bucketOffset(nextBucketInfo); Address entry = entriesField.getValue(addr).addOffsetTo(bucketOffset * uintSize); if (isValueOnlyBucket(bucketInfo)) { symOffset = entry.getCIntegerAt(0, uintSize, true); sym = Symbol.create(baseAddress.addOffsetTo(symOffset)); if (sym.equals(name)) { return sym; } } else { Address entryMax = entriesField.getValue(addr).addOffsetTo(nextBucketOffset * uintSize); while (entry.lessThan(entryMax)) { long symHash = entry.getCIntegerAt(0, uintSize, true); if (symHash == hash) { symOffset = entry.getCIntegerAt(uintSize, uintSize, true); Address symAddr = baseAddress.addOffsetTo(symOffset); sym = Symbol.create(symAddr); if (sym.equals(name)) { return sym; } } entry = entry.addOffsetTo(2 * uintSize); } } return null; } public interface SymbolVisitor { public void visit(Symbol sym); } public void symbolsDo(SymbolVisitor visitor) { long symOffset; Symbol sym; Address baseAddress = baseAddressField.getValue(addr); Address bucket = bucketsField.getValue(addr); for (long index = 0; index < bucketCount(); index++) { int bucketInfo = (int)bucket.getCIntegerAt(index * uintSize, uintSize, true); int bucketOffset = bucketOffset(bucketInfo); int nextBucketInfo = (int)bucket.getCIntegerAt((index+1) * uintSize, uintSize, true); int nextBucketOffset = bucketOffset(nextBucketInfo); Address entry = entriesField.getValue(addr).addOffsetTo(bucketOffset * uintSize); if (isValueOnlyBucket(bucketInfo)) { symOffset = entry.getCIntegerAt(0, uintSize, true); sym = Symbol.create(baseAddress.addOffsetTo(symOffset)); visitor.visit(sym); } else { Address entryMax = entriesField.getValue(addr).addOffsetTo(nextBucketOffset * uintSize); while (entry.lessThan(entryMax)) { symOffset = entry.getCIntegerAt(uintSize, uintSize, true); Address symAddr = baseAddress.addOffsetTo(symOffset); sym = Symbol.create(symAddr); visitor.visit(sym); entry = entry.addOffsetTo(2 * uintSize); } } } } }
⏎ sun/jvm/hotspot/utilities/CompactHashTable.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, 131613👍, 0💬
Popular Posts:
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...
JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" co...
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...
What Is commons-logging-1.2.jar? commons-logging-1.2.jar is the JAR file for Apache Commons Logging ...