目录结构

首先偷个懒,把目录结构从别人的分享中拷贝过来

  1. ├—agent Serviceability Agent的客户端实现
  2. ├—make 用来buildHotSpot的各种配置文件
  3. ├—src HotSpot VM的源代码
  4. ├—cpu CPU相关代码(汇编器、模板解释器、ad文件、部分runtime函数在这里实现)
  5. ├—os 操作系相关代码
  6. ├—os_cpu 操作系统+CPU的组合相关的代码
  7. └—share 平台无关的共通代码
  8. ├—tools 工具
  9. ├—hsdis 反汇编插件
  10. ├—IdealGraphVisualizer server编译器的中间代码可视化的工具
  11. ├—launcher 启动程序“java
  12. ├—LogCompilation 将-XX:+LogCompilation输出的日志(hotspot.log)整理成更容易阅读的格式的工具
  13. └—ProjectCreator 生成Visual Studioproject文件的工具
  14. └—vm HotSpot VM的核心代码
  15. ├—adlc 平台描述文件(上面的cpuos_cpu里的*.ad文件)的编译器
  16. ├—asm 汇编器接口
  17. ├—c1 client编译器(又称“C1”)
  18. ├—ci 动态编译器的公共服务/从动态编译器到VM的接口
  19. ├—classfile 类文件的处理(包括类加载和系统符号表等)
  20. ├—code 动态生成的代码的管理
  21. ├—compiler VM调用动态编译器的接口
  22. ├—gc_implementation GC的实现
  23. ├—concurrentMarkSweep Concurrent Mark Sweep GC的实现
  24. ├—g1 Garbage-First GC的实现(不使用老的分代式GC框架)
  25. ├—parallelScavenge ParallelScavenge GC的实现(server VM默认,不使用老的分代式GC框架)
  26. ├—parNew ParNew GC的实现
  27. └—shared GC的共通实现
  28. ├—gc_interface GC的接口
  29. ├—interpreter 解释器,包括“模板解释器”(官方版在用)和“C++解释器”(官方版不在用)
  30. ├—libadt 一些抽象数据结构
  31. ├—memory 内存管理相关(老的分代式GC框架也在这里)
  32. ├—oops HotSpot VM的对象系统的实现
  33. ├—opto server编译器(又称“C2”或“Opto”)
  34. ├—prims HotSpot VM的对外接口,包括部分标准库的native部分和JVMTI实现
  35. ├—runtime 运行时支持库(包括线程管理、编译器调度、锁、反射等)
  36. ├—services 主要是用来支持JMX之类的管理功能的接口
  37. ├—shark 基于LLVMJIT编译器(官方版里没有使用)
  38. └—utilities 一些基本的工具类
  39. └—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*)