我从一些文档中了解到,Hotspot VM 利用称为 Oop Maps 的数据结构来管理 VM 中的所有 OOP.我的问题是,这个 Oop Map 数据结构是什么时候生成的?在编译时还是运行时?任何有关此的详细文件都将受到欢迎.谢谢各位.
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.
OopMap 是一种记录对象引用 (OOP) 在 Java 堆栈上的位置的结构.它的主要目的是在 Java 堆栈上查找 GC 根,并在对象在堆内移动时更新引用.
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 共有三种:
There are three kinds of OopMaps:
在 GC 期间,JVM 遍历所有线程堆栈.每个堆栈都被解析为堆栈帧流.这些帧要么是解释的,要么是编译的,要么是存根的.解释帧包含有关 Java 方法和 bci(字节码索引)的信息.OopMapCache 帮助找到与给定方法和 bci 对应的 OopMap.编译帧的方法是通过指令地址查找发现的.
During GC JVM walks through all thread stacks. Each stack is parsed as a stream of stack frames. The frames are either interpreted or compiled or stubs. Interpreted frames contain information about Java method and bci (bytecode index). OopMapCache helps to find an OopMap corresponding to the given method and bci. The method of a compiled frame is discovered by instruction address lookup.
这篇关于Oop Maps 在 Hotspot VM 中的确切含义是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!