• <small id='nuhl5'></small><noframes id='nuhl5'>

        <i id='nuhl5'><tr id='nuhl5'><dt id='nuhl5'><q id='nuhl5'><span id='nuhl5'><b id='nuhl5'><form id='nuhl5'><ins id='nuhl5'></ins><ul id='nuhl5'></ul><sub id='nuhl5'></sub></form><legend id='nuhl5'></legend><bdo id='nuhl5'><pre id='nuhl5'><center id='nuhl5'></center></pre></bdo></b><th id='nuhl5'></th></span></q></dt></tr></i><div id='nuhl5'><tfoot id='nuhl5'></tfoot><dl id='nuhl5'><fieldset id='nuhl5'></fieldset></dl></div>
      1. <tfoot id='nuhl5'></tfoot>
        <legend id='nuhl5'><style id='nuhl5'><dir id='nuhl5'><q id='nuhl5'></q></dir></style></legend>
          <bdo id='nuhl5'></bdo><ul id='nuhl5'></ul>

        Oop Maps 在 Hotspot VM 中的确切含义是什么

        时间:2023-08-24

        <i id='VTxzG'><tr id='VTxzG'><dt id='VTxzG'><q id='VTxzG'><span id='VTxzG'><b id='VTxzG'><form id='VTxzG'><ins id='VTxzG'></ins><ul id='VTxzG'></ul><sub id='VTxzG'></sub></form><legend id='VTxzG'></legend><bdo id='VTxzG'><pre id='VTxzG'><center id='VTxzG'></center></pre></bdo></b><th id='VTxzG'></th></span></q></dt></tr></i><div id='VTxzG'><tfoot id='VTxzG'></tfoot><dl id='VTxzG'><fieldset id='VTxzG'></fieldset></dl></div>
        <tfoot id='VTxzG'></tfoot>
            <tbody id='VTxzG'></tbody>
        • <small id='VTxzG'></small><noframes id='VTxzG'>

              1. <legend id='VTxzG'><style id='VTxzG'><dir id='VTxzG'><q id='VTxzG'></q></dir></style></legend>
                  <bdo id='VTxzG'></bdo><ul id='VTxzG'></ul>
                  本文介绍了Oop Maps 在 Hotspot VM 中的确切含义是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我从一些文档中了解到,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:

                  1. 用于解释方法的OopMaps.它们是通过分析字节码流来延迟计算的,即当 GC 发生时.最好的参考是源代码(有很多注释),见 generateOopMap.cpp.InterpreterOopMap 存储在 OopMapCache.
                  2. 用于JIT 编译的方法 的OopMaps.它们在 JIT 编译期间生成并与编译后的代码一起保存,以便 VM 可以通过指令地址快速找到堆栈位置和保存对象引用的寄存器.
                  3. OopMaps 用于生成的共享运行时存根.这些映射由开发人员(这些运行时存根的作者)手动构建.
                  1. OopMaps for interpreted methods. They are computed lazily, i.e. when GC happens, by analyzing bytecode flow. The best reference is the source code (with lots of comments), see generateOopMap.cpp. InterpreterOopMaps are stored in OopMapCache.
                  2. 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.
                  3. OopMaps for generated shared runtime stubs. These maps are constructed manually by the developers - authors of these runtime stubs.

                  在 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 中的确切含义是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:减小 JRE 的大小 下一篇:JVM 压缩 Oops 背后的技巧

                  相关文章

                    <small id='VHfSN'></small><noframes id='VHfSN'>

                    <tfoot id='VHfSN'></tfoot>

                      <i id='VHfSN'><tr id='VHfSN'><dt id='VHfSN'><q id='VHfSN'><span id='VHfSN'><b id='VHfSN'><form id='VHfSN'><ins id='VHfSN'></ins><ul id='VHfSN'></ul><sub id='VHfSN'></sub></form><legend id='VHfSN'></legend><bdo id='VHfSN'><pre id='VHfSN'><center id='VHfSN'></center></pre></bdo></b><th id='VHfSN'></th></span></q></dt></tr></i><div id='VHfSN'><tfoot id='VHfSN'></tfoot><dl id='VHfSN'><fieldset id='VHfSN'></fieldset></dl></div>
                    1. <legend id='VHfSN'><style id='VHfSN'><dir id='VHfSN'><q id='VHfSN'></q></dir></style></legend>

                        <bdo id='VHfSN'></bdo><ul id='VHfSN'></ul>