HotSpot术语表(待整理)
HotSpot虚拟机相关术语,以及部分补充扩展。
注意:本文章由本人整理翻译,并添加部分扩展内容,如有错误,敬请指正。
A work in progress, especially as the HotSpot VM evolves. But a place to put definitions of things so we only have to define them once. There are empty entries (marked TBD for "to be defined") because we think of things that we need to define faster than we think of good definitions.
这是一项正在进行的工作,尤其是在 HotSpot VM 不断发展的过程中。这是一个放置关于HotSpot中一些概念定义的地方,所以我们只需要定义它们一次。其中有部分空条目(标记为_TBD_表示"待定义")表示待定义,因为我们想要在想到更好的定义前快速定义出需要相关概念。
adaptive spinning
An optimization technique whereby a thread spins waiting for a change-of-state to occur (typically a flag that represents some event has occurred - such as the release of a lock) rather than just blocking until notified that the change has occurred. The "adaptive" part comes from the policy decisions that control how long the thread will spin until eventually deciding to block.
适应性自旋锁 一种锁优化技术,在这种技术中,线程自旋等待状态发生变化(通常是表示某个事件已经发生的标志——比如锁的释放),而不仅仅是阻塞直到通知发生状态变化。“自适应”部分主要表现在控制线程自旋时长,和最终决定进入阻塞状态(停止自旋)。(自旋会消耗CPU资源,同时线程进入阻塞态会增加线程切换成本,自适应自旋是两者之间的平衡)
biased locking
An optimization in the VM that leaves an object as logically locked by a given thread even after the thread has released the lock. The premise is that if the thread subsequently reacquires the lock (as often happens), then reacquisition can be achieved at very low cost. If a different thread tries to acquire a biased lock then the bias must be revoked from the current bias owner.
偏向锁 虚拟机层面的一种优化,对象在给定线程释放锁后仍处于逻辑锁定(偏向状态位为 1)状态。前提是,如果线程随后重新获得锁(这是经常发生的),那么重新获取可以以非常低的成本实现。如果另一个线程试图获取偏向锁,则必须从当前偏向锁对象所有者处替换该偏向状态,也就是通过CAS替换对象头中的线程id。
题外话:这里其实涉及到对象头存储内容,其中除了1个bit位的偏向状态外,还有一部分是存储线程id的。也就是说,当前线程继续进入,不需要修改这个id就能直接获取到这个对象的锁。而修改这个线程id必须使用CAS来修改,相对应的性能消耗,还是比较大的。这里涉及到锁升级过程,这个消耗相比重量级锁,性能还是很快的。但是CAS称之为无锁算法(只是表明是非重量级锁,都叫无锁,其实并非没有锁,只是不需要进入内核,不需要切换线程(上下文切换:用户线程与内核线程切换))就能实现加锁的效果。
block start table
A table that shows, for a region of the heap, where the object starts that comes on to this region from lower addresees. Used, for example, with the card table variant of the remembered set.
block start table(块开始表???大概是指对象起始位置存放的内容) 对于堆的某个区域,显示对象从较低的addresees进入该区域的起始位置的表(小端模式)。例如,使用记忆集的一种实现方式,卡表。
题外话:这个记忆集(remembered set)是为了解决跨带应用的垃圾收集相关的场景。
bootstrap classloader
The logical classloader that has responsibility for loading the classes (and resources) that are found in the boot-classpath - typically the core Java platform classes. Typically implemented as part of the VM, by historical convention the bootstrap classloader is represented by NULL at the Java API level.
## 引导类加载器 负责加载在引导类路径中,找到的类(和资源)的逻辑类加载器——通常是Java平台的核心类。通常作为VM的一部分实现,根据历史约定,引导类加载器在Java API级别上用NULL表示。
题外话:XXX.class.getClassLoader().getParent().getParent();可以获取到引导类加载器 打印为null
bytecode verification
A step in the linking process of a class where the methods bytecodes are analyzed to ensure type-safety.
字节码校验 类的链接过程中的一个步骤,在其中分析方法的字节码,以确保类型安全。
C1 compiler
Fast, lightly optimizing bytecode compiler. Performs some value numbering, inlining, and class analysis. Uses a simple CFG-oriented SSA "high" IR, a machine-oriented "low" IR, a linear scan register allocation, and a template-style code generator.
C1编译器 快速、轻度优化的字节码编译器。执行一些值的编号、代码嵌入和类分析。使用一个简单的面向cfg??的SSA(?Static Single-Assignment,静态单赋值,一种寄存器分配算法?)“高”IR(求大佬帮忙翻译解释下吧),一个面向机器的“低”IR,一个线性扫描寄存器分配,
C2 compiler
Highly optimizing bytecode compiler, also known as 'opto'. Uses a "sea of nodes" SSA "ideal" IR, which lowers to a machine-specific IR of the same kind. Has a graph-coloring register allocator; colors all machine state, including local, global, and argument registers and stack. Optimizations include global value numbering, conditional constant type propagation, constant folding, global code motion, algebraic identities, method inlining (aggressive, optimistic, and/or multi-morphic), intrinsic replacement, loop transformations (unswitching, unrolling), array range check elimination.
C2编译器 高度优化的字节码编译器,也称为“opto”。使用“大量节点”SSA“理想”IR,降低到同一类型的特定机器的IR。具有图形标记寄存器分配器?;标记所有机器状态,包括本地、全局和参数寄存器和堆栈。优化包括全局值编号、条件常量类型传播、常量折叠、全局代码移动、代数标识、方法内联(主动的、乐观的和/或多态的)、内在替换、循环转换(不交换、展开)、数组范围检查消除。
card table
A kind of remembered set that records where oops have changed in a generation.
卡表 卡表 一种记忆集(remembered set,是个抽象的数据结构)的实现方式,记录了oops(对象指针)发生的跨代引用的起始内存地址。
class data sharing
A startup optimization that records the in-memory form of some classes, so that that form can be mapped into memory by a subsequent run of the virtual machine, rather than loading those classes from their class files.
类的数据共享 一种启动优化是,直接在内存中存储一些类的结构,以便后续运行虚拟机时可以将该结构映射到内存中,而不是从类文件中加载这些类。这段的大致意思表示class对象字节码信息直接存储在方法区(1.8后的元空间)中!通过new的对象类元信息映射,来执行代码!
class hierachy analysis
Also known as 'CHA'. Analysis of the class tree used by a compiler to determine if the receiver at a virtual call site has a single implementor. If so, the callee can be inlined or the compiler can employ some other static call mechanism.
类层次分析 也叫“CHA”。编译器对类树(层级)进行分析,以确定虚拟调用站点上的接收器是否只有一个实现者(双亲委派机制?)。如果是这样,被调用方可以内联,或者编译器可以使用其他一些静态调用机制。
code cache
A special heap that holds compiled code. These objects are not relocated by the GC, but may contain oops, which serve as GC roots.
代码缓存 保存已编译代码的特殊堆空间。这些对象不由GC重新定位,但可能包含oops,用作GC根。
compaction
A garbage collection technique that results in live objects occupying a dense portion of the virtual address space, and available space in another portion of the address space. Cf. free list.
压缩算法 一种垃圾收集技术,用于将活动对象压缩到虚拟地址空间的密集部分,以便获得地址空间的另一部分中的空间可用。参见空闲列表。
concurrency
Concurrency, or more specifically concurrent programming, is the logical simultaneous execution of multiple instruction streams. If multiple processors are available then the logical simultaneity can be physical simultaneity - this is known as 'parallelism'
并发机制 并发,或者更具体地说并发编程,是多个指令流的逻辑同步执行。如果有多个处理器可用,那么逻辑同时性也可以是物理同时性——这被称为“并行性”。
concurrent garbage collection
A garbage collection algorithm that does most (if not all) of its work while the Java application threads are still running.
并发垃圾收集 在Java应用程序线程仍在运行时,同时垃圾收集算法也能执行其大部分(即便不是全部)工作。
copying garbage collection
A garbage collection algorithm that moves objects during the collection.
复制垃圾收集 在收集期间移动对象的垃圾收集算法。(复制清除算法!参考堆中新生代的幸存者区S0,S1)
deoptimization
The process of converting an compiled (or more optimized) stack frame into an interpreted (or less optimized) stack frame. Also describes the discarding of an nmethod whose dependencies (or other assumptions) have been broken. Deoptimized nmethods are typically recompiled to adapt to changing application behavior. Example: A compiler initially assumes a reference value is never null, and tests for it using a trapping memory access. Later on, the application uses null values, and the method is deoptimized and recompiled to use an explicit test-and-branch idiom to detect such nulls.
逆优化 将已编译(或优化程度更高的)堆栈帧转换为解释(或优化程度更低的)堆栈帧的过程。也描述了丢弃一个依赖关系(或其他假设)被打破的nmethod。经过优化的nmethods通常会重新编译以适应应用程序行为的变化。示例:编译器最初假设引用值决不为空,并使用捕获内存访问对其进行测试。稍后,应用程序将使用空值,该方法将进行优化并重新编译,以使用显式的测试和分支习语来检测这些空值。
题外话:这个不是很懂,感觉可能是指的指令重排?后续抽空进行修改吧
dependency
An optimistic assumption associated with an nmethod, which allowed the compiler to emit improved code into the nmethod. Example: A given class has no subclasses, which simplifies method dispatch and type testing. The loading of new classes (or replacement of old classes) can cause dependencies to become false, which requires dependent nmethods to be discarded and activations of those nmethods to be deoptimized.
依赖 一个与nmethod相关的乐观假设,它允许编译器将改进的代码发送到nmethod中。示例:给定的类没有子类,子类简化了方法分发和类型测试。加载新类(或替换旧类)会导致依赖关系变为false,这需要丢弃依赖的nmethods,并对这些nmethods的激活进行优化。
eden
A part of the Java object heap where object can be created efficiently.
伊甸区 Java对象堆的一部分,在这里可以高效地创建对象。
free list
A storage management technique in which unused parts of the Java object heap are chained one to the next, rather than having all of the unused part of the heap in a single block.
空闲列表 一种存储管理技术,在这种技术中,将Java对象堆中未使用的部分逐个用空闲列表标记起来,而不是将堆中所有未使用的部分都放在一个块中(标记整理算法才是这个)。
题外话:标记清理造成的碎片,可用空闲内存块进行记录的地方。
garbage collection(GC)
The automatic management of storage.
垃圾收集/GC 对内存的自动管理。
garbage collection root(GC Root)
A pointer into the Java object heap from outside the heap. These come up, e.g., from static fields of classes, local references in activation frames, etc.
垃圾收集根 从堆外部指向Java对象堆(地址)的指针。例如,来自类对象的静态字段、虚拟机栈中的栈帧中的局部变量表引用,等等。(有错误)
GC map
A description emitted by the JIT (C1 or C2) of the locations of oops in registers or on stack in a compiled stack frame. Each code location which might execute a safepoint has an associated GC map. The GC knows how to parse a frame from a stack, to request a GC map from a frame's nmethod, and to unpack the GC map and manage the indicated oops within the stack frame.
GC映射 由JIT (C1或C2)发出的关于oops在已编译堆栈帧中的寄存器或堆栈上的位置的描述。可能执行安全点的每个代码位置都有一个关联的GC映射。GC知道如何从堆栈中解析一个框架,如何从框架的nmethod中请求一个GC映射,如何解压缩GC映射并管理堆栈框架中指示的oops。
题外话:应该是我们说了解的OopMap,有了它就不需要始终从GC root开始查找。
generational garbage collection
A storage management technique that separates objects expected to be referenced for different lengths of time into different regions of the heap, so that different algorithms can be applied to the collection of those regions.
分代垃圾收集 一种存储管理技术,它将期望在不同时间内引用的对象分离到堆的不同区域,以便可以对这些区域的集合应用不同的垃圾回收算法。
题外话:minor GC,full GC,major GC
handle
A memory word containing an oop. The word is known to the GC, as a root reference. C/C++ code generally refers to oops indirectly via handles, to enable the GC to find and manage its root set more easily. Whenever C/C++ code blocks in a safepoint, the GC may change any oop stored in a handle. Handles are either 'local' (thread-specific, subject to a stack discipline though not necessarily on the thread stack) or global (long-lived and explicitly deallocated). There are a number of handle implementations throughout the VM, and the GC knows about them all.
句柄 包含oop的内存字。知道这个词GC,它是一个根引用。C/ c++代码通常通过句柄间接引用oops,以使GC更容易地查找和管理它的根集。每当C/ c++代码在安全点中阻塞时,GC可以更改存储在句柄中的任何oop。句柄要么是“本地的”(特定于线程,受堆栈规则约束,但不一定在线程堆栈上),要么是全局的(长期存在且显式释放)。在整个VM中有许多句柄实现,而GC知道关于这些的所有。题外话:现在都不怎么使用句柄了!
hot lock
A lock that is highly contended.
It makes recommendations on GC usage, identifies hot** methods, highlights areas of lock contention, and provides information on the environment the application is running in. (50KB) 它提供关于GC使用的建议、识别热方法、突出显示锁争用区域,提供关于应用程序的运行环境的信息。**(词典信息)
热锁 高度竞争的锁
interpreter
A VM module which implements method calls by individually executing bytecodes. The interpreter has a limited set of highly stylized stack frame layouts and register usage patterns, which it uses for all method activations. The Hotspot VM generates its own interpreter at start-up time.
解释器 一个VM模块,它通过单独执行字节码来实现方法调用。解释器有一组有限的高度程式化的堆栈框架布局和寄存器使用模式,它适用于所有的方法激活。Hotspot VM在启动时生成自己的解释器。
JIT compilers
An on-line compiler which generates code for an application (or class library) during execution of the application itself. ("JIT" stands for "just in time".) A JIT compiler may create machine code shortly before the first invocation of a Java method. Hotspot compilers usually allow the interpreter ample time to "warm up" Java methods, by executing them thousands of times. This warm-up period allows a compiler to make better optimization decisions, because it can observe (after initial class loading) a more complete class hierarchy. The compiler can also inspect branch and type profile information gathered by the interpreter.
## JIT编译器 一种在线编译器,它在应用程序本身执行期间为应用程序(或类库)生成代码。(“JIT”代表“just in time”。)JIT编译器可能会在第一次调用Java方法之前创建机器代码。Hotspot编译器通常允许解释器有充足的时间来“预热”Java方法,方法是执行这些方法数千次。这个预热阶段允许编译器做出更好的优化决策,因为它可以观察(在初始类加载之后)更完整的类层次结构。编译器还可以检查解释器收集的分支和类型概要信息。
JNI
The Java Native Interface - a specification and API for how Java code can call out to native C code, and how native C code can call into the Java VM
java本地接口 Java本地接口——一个规范和API,用于说明Java代码如何调用本机C代码,以及本机C代码如何在Java VM中调
JVM TI
The Java Virtual Machine Tools Interface - a standard specification and API that is used by development and monitoring tools. See JVM TI for more information.
Java虚拟工具接口 Java虚拟工具接口——开发和监控工具使用的标准规范和API。更多信息请参见JVM TI。
klass pointer
The second word of every object header. Points to another object (a metaobject) which describes the layout and behavior of the original object. For Java objects, the "klass" contains a C++ style "vtable".
类型指针 每个对象头的第二个字。指向另一个对象(元对象),该对象描述原始对象的布局和行为。对于Java对象,“klass”包含一个c++风格的“虚函数表”。
mark word
The first word of every object header. Usually a set of bitfields including synchronization state and identity hash code. May also be a pointer (with characteristic low bit encoding) to synchronization related information. During GC, may contain GC state bits.
标记字符 每个对象头的第一个字节。通常是一组位域,包括同步状态和身份哈希码。也可能是同步相关信息的指针(具有低比特编码特征)。在GC期间,可能包含GC状态位。
题外话:也就是对象头中的信息,这个是32为的对象头!但是还不全,这里只包含重要信息,其他64位的,我截个图出来! [[Pasted image 20220219173940.png]]
nmethod
A block of executable code which implements some Java bytecodes. It may be a complete Java method, or an 'OSR' method. It routinely includes object code for additional methods inlined by the compiler.
n方法 实现某些Java字节码的可执行代码块。它可能是一个完整的Java方法,或者是一个“OSR”方法。它通常包括由编译器内联的其他方法的目标代码。
题外话:on-stack replacement(栈上替换编译)
object header
Common structure at the beginning of every GC-managed heap object. (Every oop points to an object header.) Includes fundamental information about the heap object's layout, type, GC state, synchronization state, and identity hash code. Consists of two words. In arrays it is immediately followed by a length field. Note that both Java objects and VM-internal objects have a common object header format.
对象头 在每个gc管理的堆对象开始处的公共结构。(每个oop都指向一个对象头。)包括关于堆对象的布局、类型、GC状态、同步状态和标识哈希码的基本信息。由两个词组成。在数组中,紧随其后的是长度字段。注意,Java对象和vm内部对象都有一个通用的对象头格式。
题外话:oop中的重要部分!注意小端模式查看二进制对象头!
object promotion
The act of copying an object from one generation to another.
对象晋升 将一个对象从新生代复制到老年代的行为。 比较一下对象担保机制
old generation
A region of the Java object heap that holds object that have remained referenced for a while.
老年代 对象堆中的一个区域,用于保存被引用了一段时间的对象。
on-stack replacement
Also known as 'OSR'. The process of converting an interpreted (or less optimized) stack frame into a compiled (or more optimized) stack frame. This happens when the interpreter discovers that a method is looping, requests the compiler to generate a special nmethod with an entry point somewhere in the loop (specifically, at a backward branch), and transfers control to that nmethod. A rough inverse to deoptimization.
栈上替换编译查询是否是标量替换 也被称为OSR。将解释的(或优化较少的)堆栈转换为编译的(或优化较多的)堆栈的过程。当解释器发现一个方法正在循环时,就会请求编译器生成一个特殊的nmethod,在循环的某个地方有一个入口点(特别是在一个向后的分支上),然后将控制权转移给那个nmethod。反优化的粗略倒转。
题外话:有点懵了!
oop
An object pointer. Specifically, a pointer into the GC-managed heap. (The term is traditional. One 'o' may stand for 'ordinary'.) Implemented as a native machine address, not a handle. Oops may be directly manipulated by compiled or interpreted Java code, because the GC knows about the liveness and location of oops within such code. (See GC map.) Oops can also be directly manipulated by short spans of C/C++ code, but must be kept by such code within handles across every safepoint.
普通对象指针 一个对象的指针。具体地说,是指向gc托管堆的指针。(这个词是传统的。第一个o可以代表“普通”。)实际为本机地址,而不是句柄。Oops可以由编译或解释的Java代码直接操作,因为GC知道Oops在这些代码中的活动和位置。GC(见GC map)。Oops还可以由短时间的C/ c++代码直接操作,但是必须由这些代码在每个安全点的句柄中保存。
parallel classloading
The ability to have multiple classes/type be in the process of being loaded by the same classloader at the same time.
## 并行类加载 在同一个类加载器同时加载多个类/类型的能力。
parallel garbage collection
A garbage collection algorithm that uses multiple threads of control to perform more efficiently on multi-processor boxes.
并行垃圾收集 一种垃圾收集算法,它使用多个控制线程来更有效地在多处理器机器上执行。
permanent generation
A region of the address space that holds object allocated by the virtual machine itself, but which is managed by the garbage collector. The permanent generation is mis-named, in that almost all of the objects in it can be collected, though they tend to be referenced for a long time, so they rarely become garbage.
永久代 地址空间的一个区域,它包含由虚拟机本身分配但由垃圾收集器管理的对象。永久代的名称是错误的,其实它中间的几乎所有对象都可以被收集,只是因为它们往往会被很长时间引用,所以它们很少会变成垃圾,才被叫做永久代。
题外话:存放已被虚拟机加载的类的类信息、常量、静态变量、即时编译器编译后的代码 - 对HotSpot虚拟机来说,被称为永久代(Permanent Generation)。 - jdk1.6及之前:有永久代,常量池在方法区 - jdk1.7:有永久代,但已逐步“去永久代”,常量池转移到堆中 - jdk8及之后:无永久代,常量池在元空间
remembered set
A data structure that records pointers between generations.
记忆集 记录各代(新生代、老年代)之间,存在跨代引用的指针的数据结构。
题外话:这个结构把老年代划分成若干小块, 标识出老年代的哪一块内存会存在跨代引用。
safepoint
A point during program execution at which all GC roots are known and all heap object contents are consistent. From a global point of view, all threads must block at a safepoint before the GC can run. (As a special case, threads running JNI code can continue to run, because they use only handles. During a safepoint they must block instead of loading the contents of the handle.) From a local point of view, a safepoint is a distinguished point in a block of code where the executing thread may block for the GC. Most call sites qualify as safepoints. There are strong invariants which hold true at every safepoint, which may be disregarded at non-safepoints. Both compiled Java code and C/C++ code be optimized between safepoints, but less so across safepoints. The JIT compiler emits a GC map at each safepoint. C/C++ code in the VM uses stylized macro-based conventions (e.g., TRAPS) to mark potential safepoints.
安全点 程序执行期间所有GC根已知且所有堆对象内容一致的点。从全局的角度来看,所有线程必须在安全点阻塞后,GC才能运行。(作为特殊情况,运行JNI代码的线程可以继续运行,因为它们只使用句柄。在安全点期间,它们必须阻塞而不是装入手柄的内容。)从本地的角度来看,安全点是代码块中的一个特殊点,在这个点上执行的线程可能阻塞GC。大多数呼叫站点都可以作为安全点。在每个安全点上都存在强不变量,在非安全点上可以忽略。编译后的Java代码和C/ c++代码在安全点之间都能得到优化,但在安全点之间就没那么优化了。JIT编译器在每个安全点发出一个GC映射。VM中的C/ c++代码使用程式化的基于宏的约定(例如,陷阱)来标记潜在的安全点!
题外话;通常会根据是否具备让程序长时间执行的特征”为标准作为SafePoint,比如:方法调用、循环跳转、异常跳转等。
sea-of-nodes
The high-level intermediate representation in C2. It is an SSA form where both data and control flow are represented with explicit edges between nodes. It differs from forms used in more traditional compilers in that nodes are not bound to a block in a control flow graph. The IR allows nodes to float within the sea (subject to edge constraints) until they are scheduled late in the compilation process.
大量节点 C2编译器中的高级中间表现。它是一种SSA形式,其中数据和控制流都用节点之间的显式边表示。它与更传统的编译器中使用的表单不同,因为节点不绑定到控制流图中的块。IR允许节点在sea中浮动(受制于边界约束),直到它们被安排在编译过程的后期。
题外话:完全不懂,希望大佬能精简和指错!
Serviceability Agent (SA)
The Serviceablity Agent is collection of Sun internal code that aids in debugging HotSpot problems. It is also used by several JDK tools - jstack, jmap, jinfo, and jdb. See SA for more information.
SA 可服务器性代理 The Serviceablity Agent is collection of Sun internal code that aids in debugging HotSpot problems. It is also used by several JDK tools - jstack, jmap, jinfo, and jdb. See SA for more information.
Serviceablity Agent是Sun内部代码的集合,帮助调试热点问题。它还被一些JDK工具使用——jstack、jmap、jinfo和jdb。有关更多信息,请参见SA。
stackmap
Refers to the StackMapTable attribut e or a particular StackMapFrame in the table.
堆栈映射 引用堆栈映射表的属性或表中的特定堆栈映射框架。
StackMapTable
An attribute of the Code attribute in a classfile which contains type information used by the new verifier during verification. It consists of an array of StackMapFrames. It is generated automatically by javac as of JDK6.
## 堆栈映射表 类文件中代码的一种属性,它包含新验证者在验证期间使用的类型信息。它由一个stackmapframe数组组成。它是由javac在JDK6时自动生成的。
survivor space
A region of the Java object heap used to hold objects. There are usually a pair of survivor spaces, and collection of one is achieved by copying the referenced objects in one survivor space to the other survivor space.
## 幸存者区 Java对象堆中用于保存对象的区域。通常有一对幸存者空间,通过将一个幸存者空间中引用的对象复制到另一个幸存者空间,可以实现对一个幸存者空间的收集。
题外话:这个就是上面说说的复制垃圾算法!
synchronization
In general terms this is the coordination of concurrent activities to ensure the safety and liveness properties of those activities. For example, protecting access to shared data by using a lock to guard all code paths to that data.
同步化 一般来说,这是同时进行的活动的协调,以确保这些活动的安全性和活性。例如,通过使用锁保护到该数据的所有代码路径来保护对共享数据的访问。
TLAB
Thread-local allocation buffer. Used to allocate heap space quickly without synchronization. Compiled code has a "fast path" of a few instructions which tries to bump a high-water mark in the current thread's TLAB, successfully allocating an object if the bumped mark falls before a TLAB-specific limit address.
## 本地线程分配缓冲区 线程本地分配缓冲区。用于在不同步的情况下快速分配堆空间。编译后的代码有一些指令的“快速路径”,这些指令试图在当前线程的TLAB中达到一个高水位标记,如果碰撞标记落在特定TLAB的限制地址之前,就可以成功地分配一个对象。
uncommon trap
When code generated by C2 reverts back to the interpreter for further execution. C2 typically compiles for the common case, allowing it to focus on optimization of frequently executed paths. For example, C2 inserts an uncommon trap in generated code when a class that is uninitialized at compile time requires run time initialization.
## 不常见陷阱 当C2生成的代码返回到解释器进行进一步执行时。C2通常针对常见情况进行编译,这使得它能够专注于优化经常执行的路径。例如,当编译时未初始化的类需要运行时初始化时,C2会在生成的代码中插入一个不常见的陷阱。
题外话:内存屏障??
verifier
The software code in the VM which performs bytecode verification.
## 验证器 虚拟机中执行字节码验证的软件代码。
VM Operations
Operations in the VM that can be requested by Java threads, but which must be executed, in serial fashion by a specific thread known as the VM thread. These operations are often synchronous, in that the requester will block until the VM thread has completed the operation. Many of these operations also require that the VM be brought to a safepoint before the operation can be performed - a garbage collection request is a simple example.
## 虚拟机操作 VM中可以由Java线程请求但必须由称为VM线程的特定线程以串行方式执行的操作。这些操作通常是同步的,因为请求程序将阻塞,直到VM线程完成操作。许多这些操作还要求在执行操作之前将VM转移到安全点——垃圾收集请求就是一个简单的例子。
题外话:例如main方法中,创建线程,是有一个main线程串行启动线程的创建!
write barrier
Code that is executed on every oop store. For example, to maintain a remembered set.
写屏障 在每个oop存储上已执行的代码。例如,维护一个已记住的集合。
young generation
A region of the Java object heap that holds recently-allocated objects.
新生代也叫年轻代 Java对象堆中保存最近分配的对象的区域。
参考资料
- 深入理解Java虚拟机:JVM高级特性与最佳实践(第3版)
- 虚拟机设计与实现 以JVM为例(图灵出品)
- Open JDK官网 HotSpot Glossary of Terms: https://openjdk.java.net/groups/hotspot/docs/HotSpotGlossary.html