Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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/memory/FileMapInfo.java
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.jvm.hotspot.memory;
import java.util.*;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObject;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.types.*;
public class FileMapInfo {
private static FileMapHeader header;
private static Address headerValue;
// Fields for class FileMapHeader
private static Address mdSpaceValue;
private static Address mdRegionBaseAddress;
private static Address mdRegionEndAddress;
// HashMap created by mapping the vTable addresses in the md region with
// the corresponding metadata type.
private static Map<Address, Type> vTableTypeMap;
private static Type metadataTypeArray[];
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static void initialize(TypeDataBase db) {
// FileMapInfo
Type type = db.lookupType("FileMapInfo");
AddressField currentInfoField = type.getAddressField("_current_info");
long headerFieldOffset = type.getField("_header").getOffset();
Address headerAddress = currentInfoField.getValue().addOffsetTo(headerFieldOffset);
headerValue = headerAddress.getAddressAt(0);
// FileMapHeader
type = db.lookupType("FileMapInfo::FileMapHeader");
AddressField spaceField = type.getAddressField("_space[0]");
Address spaceValue = headerValue.addOffsetTo(type.getField("_space[0]").getOffset());
mdSpaceValue = spaceValue.addOffsetTo(3 * spaceField.getSize());
// SpaceInfo
type = db.lookupType("FileMapInfo::FileMapHeader::space_info");
long mdRegionBaseAddressOffset = type.getField("_addr._base").getOffset();
mdRegionBaseAddress = (mdSpaceValue.addOffsetTo(mdRegionBaseAddressOffset)).getAddressAt(0);
long mdRegionSizeOffset = type.getField("_used").getOffset();
long mdRegionSize = (mdSpaceValue.addOffsetTo(mdRegionSizeOffset)).getAddressAt(0).asLongValue();
mdRegionEndAddress = mdRegionBaseAddress.addOffsetTo(mdRegionSize);
populateMetadataTypeArray(db);
}
private static void populateMetadataTypeArray(TypeDataBase db) {
metadataTypeArray = new Type[8];
metadataTypeArray[0] = db.lookupType("ConstantPool");
metadataTypeArray[1] = db.lookupType("InstanceKlass");
metadataTypeArray[2] = db.lookupType("InstanceClassLoaderKlass");
metadataTypeArray[3] = db.lookupType("InstanceMirrorKlass");
metadataTypeArray[4] = db.lookupType("InstanceRefKlass");
metadataTypeArray[5] = db.lookupType("Method");
metadataTypeArray[6] = db.lookupType("ObjArrayKlass");
metadataTypeArray[7] = db.lookupType("TypeArrayKlass");
}
public FileMapHeader getHeader() {
if (header == null) {
header = (FileMapHeader) VMObjectFactory.newObject(FileMapInfo.FileMapHeader.class, headerValue);
}
return header;
}
public boolean inCopiedVtableSpace(Address vptrAddress) {
FileMapHeader fmHeader = getHeader();
return fmHeader.inCopiedVtableSpace(vptrAddress);
}
public Type getTypeForVptrAddress(Address vptrAddress) {
if (vTableTypeMap == null) {
getHeader().createVtableTypeMapping();
}
return vTableTypeMap.get(vptrAddress);
}
//------------------------------------------------------------------------------------------
public static class FileMapHeader extends VMObject {
public FileMapHeader(Address addr) {
super(addr);
}
public boolean inCopiedVtableSpace(Address vptrAddress) {
if (vptrAddress.greaterThan(mdRegionBaseAddress) &&
vptrAddress.lessThanOrEqual(mdRegionEndAddress)) {
return true;
}
return false;
}
public void createVtableTypeMapping() {
vTableTypeMap = new HashMap<Address, Type>();
long metadataVTableSize = 0;
long addressSize = VM.getVM().getAddressSize();
Address copiedVtableAddress = mdRegionBaseAddress;
for (int i=0; i < metadataTypeArray.length; i++) {
// The first entry denotes the vtable size.
metadataVTableSize = copiedVtableAddress.getAddressAt(0).asLongValue();
vTableTypeMap.put(copiedVtableAddress.addOffsetTo(addressSize), metadataTypeArray[i]);
// The '+ 1' below is to skip the entry containing the size of this metadata's vtable.
copiedVtableAddress =
copiedVtableAddress.addOffsetTo((metadataVTableSize + 1) * addressSize);
}
}
}
}
⏎ sun/jvm/hotspot/memory/FileMapInfo.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, ≈409🔥, 0💬
Popular Posts:
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool. JDK 17 JDI tool com...
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...
What Is commons-net-ftp-2.0.jar? commons-net-ftp-2.0.jar is the JAR file for Apache Commons Net FTP ...