目录结构
首先偷个懒,把目录结构从别人的分享中拷贝过来
├—agent Serviceability Agent的客户端实现├—make 用来build出HotSpot的各种配置文件├—src HotSpot VM的源代码│ ├—cpu CPU相关代码(汇编器、模板解释器、ad文件、部分runtime函数在这里实现)│ ├—os 操作系相关代码│ ├—os_cpu 操作系统+CPU的组合相关的代码│ └—share 平台无关的共通代码│ ├—tools 工具│ │ ├—hsdis 反汇编插件│ │ ├—IdealGraphVisualizer 将server编译器的中间代码可视化的工具│ │ ├—launcher 启动程序“java”│ │ ├—LogCompilation 将-XX:+LogCompilation输出的日志(hotspot.log)整理成更容易阅读的格式的工具│ │ └—ProjectCreator 生成Visual Studio的project文件的工具│ └—vm HotSpot VM的核心代码│ ├—adlc 平台描述文件(上面的cpu或os_cpu里的*.ad文件)的编译器│ ├—asm 汇编器接口│ ├—c1 client编译器(又称“C1”)│ ├—ci 动态编译器的公共服务/从动态编译器到VM的接口│ ├—classfile 类文件的处理(包括类加载和系统符号表等)│ ├—code 动态生成的代码的管理│ ├—compiler 从VM调用动态编译器的接口│ ├—gc_implementation GC的实现│ │ ├—concurrentMarkSweep Concurrent Mark Sweep GC的实现│ │ ├—g1 Garbage-First GC的实现(不使用老的分代式GC框架)│ │ ├—parallelScavenge ParallelScavenge GC的实现(server VM默认,不使用老的分代式GC框架)│ │ ├—parNew ParNew GC的实现│ │ └—shared GC的共通实现│ ├—gc_interface GC的接口│ ├—interpreter 解释器,包括“模板解释器”(官方版在用)和“C++解释器”(官方版不在用)│ ├—libadt 一些抽象数据结构│ ├—memory 内存管理相关(老的分代式GC框架也在这里)│ ├—oops HotSpot VM的对象系统的实现│ ├—opto server编译器(又称“C2”或“Opto”)│ ├—prims HotSpot VM的对外接口,包括部分标准库的native部分和JVMTI实现│ ├—runtime 运行时支持库(包括线程管理、编译器调度、锁、反射等)│ ├—services 主要是用来支持JMX之类的管理功能的接口│ ├—shark 基于LLVM的JIT编译器(官方版里没有使用)│ └—utilities 一些基本的工具类└—test 单元测试
阅读顺序
然后再偷个懒,再次拷贝别人的总结
·基本的解释器实现
ClassFileParser(hotspot/src/share/vm/classfile/classFileParser.*)
·Class文件的校验器
java.util.concurrent的一部分(FutureTask)
·JVM内部数据结构的组织
(hotspot/src/share/vm/memory、hotspot/src/share/vm/oops)
Serial GC
(hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp等)
·模板解释器
(hotspot/src/share/vm/interpreter/templateInterpreter.cpp等)
·动态编译器
Client Compiler(hotspot/src/share/vm/c1)
Server Compiler(hotspot/src/share/opto)
Shark(hotspot/src/share/vm/shark/*)
·并行GC
(hotspot/src/share/vm/gc_implementation/parallelScavenge)
·并发GC
(hotspot/src/share/vm/gc_implementation/concurrentMarkSweep)
·模板解释器
( hotspot/src/share/interpreter/template*)
