在Hotspot VM中,Oop映射到底意味着什么

时间:2023-01-02 20:13:27

I read from some documents that Hotspot VM utilizes a data structure called Oop Maps to manage all OOPs in VM. My question is that when does this Oop Map data structure generated? At compile time or runtime? Any further detailed documents regarding to this will be more than welcomed. Thank you guys.

我从一些文档中了解到,Hotspot VM使用一种名为Oop映射的数据结构来管理VM中的所有OOPs。我的问题是,这个Oop映射数据结构什么时候生成?在编译时还是运行时?关于这一点的任何进一步详细文件都将非常受欢迎。谢谢你们。

1 个解决方案

#1


16  

OopMap is a structure that records where object references (OOPs) are located on the Java stack. Its primary purpose is to find GC roots on Java stacks and to update the references whenever objects are moved within the Heap.

OopMap是一种结构,它记录对象引用(OOPs)位于Java堆栈中的位置。它的主要目的是在Java堆栈上找到GC根,并在对象在堆中移动时更新引用。

There are three kinds of OopMaps:

OopMaps有三种:

  1. OopMaps for interpreted methods. They are computed lazily, i.e. when GC happens, by analyzing bytecode flow.
  2. OopMaps解释方法。通过分析字节码流,延迟地计算它们(即GC发生时)。
  3. OopMaps for JIT-compiled methods. They are generated during JIT-compilation and kept along with the compiled code so that VM can quickly find by instruction address the stack locations and the registers where the object references are held.
  4. OopMaps jit编译的方法。它们是在jit编译过程中生成的,并与编译后的代码一起生成,以便VM能够通过指令地址、堆栈位置和存放对象引用的寄存器快速找到它们。
  5. OopMaps for generated shared runtime stubs. These maps are constructed manually by the developers - authors of these runtime stubs.
  6. 生成的共享运行时存根的oopmap。这些映射是由这些运行时存根的开发者手工构建的。

#1


16  

OopMap is a structure that records where object references (OOPs) are located on the Java stack. Its primary purpose is to find GC roots on Java stacks and to update the references whenever objects are moved within the Heap.

OopMap是一种结构,它记录对象引用(OOPs)位于Java堆栈中的位置。它的主要目的是在Java堆栈上找到GC根,并在对象在堆中移动时更新引用。

There are three kinds of OopMaps:

OopMaps有三种:

  1. OopMaps for interpreted methods. They are computed lazily, i.e. when GC happens, by analyzing bytecode flow.
  2. OopMaps解释方法。通过分析字节码流,延迟地计算它们(即GC发生时)。
  3. OopMaps for JIT-compiled methods. They are generated during JIT-compilation and kept along with the compiled code so that VM can quickly find by instruction address the stack locations and the registers where the object references are held.
  4. OopMaps jit编译的方法。它们是在jit编译过程中生成的,并与编译后的代码一起生成,以便VM能够通过指令地址、堆栈位置和存放对象引用的寄存器快速找到它们。
  5. OopMaps for generated shared runtime stubs. These maps are constructed manually by the developers - authors of these runtime stubs.
  6. 生成的共享运行时存根的oopmap。这些映射是由这些运行时存根的开发者手工构建的。