1. 程式人生 > >HotSpot Virtual Machine 翻譯 1 Java Virtual Machine Technology Overview

HotSpot Virtual Machine 翻譯 1 Java Virtual Machine Technology Overview

This chapter describes the implementation of the Java Virtual Machine (JVM) and the main features of the Java HotSpot technology:

  • Adaptive compiler: A standard interpreter is used to launch the applications. When the application runs, the code is analyzed to detect performance bottlenecks, or hot spots
    . The Java HotSpot VM compiles the performance-critical portions of the code for a boost in performance, but does not compile the seldom-used code (most of the application). The Java HotSpot VM uses the adaptive compiler to decide how to optimize compiled code with techniques such as inlining.
  • Rapid memory allocation and garbage collection
    : Java HotSpot technology provides rapid memory allocation for objects and fast, efficient, state-of-the-art garbage collectors.
  • Thread synchronization: Java HotSpot technology provides a thread-handling capability that is designed to scale for use in large, shared-memory multiprocessor servers.

本章節講述Java虛擬機器的實現和Java HotSpot 技術的主要特性:

  • 自適應編譯器:一個用於啟動應用程式的標準直譯器。在應用程式執行時,程式碼會被分析來檢測效能瓶頸,或者危險區域。Java HotSpot 虛擬機器會編譯程式碼的效能關鍵部分,以提高效能,但是不會編譯很少使用的程式碼(應用程式的大部分)。Java HotSpot 虛擬機器使用自適應編譯器來決定如何優化編譯後的程式碼,使用如內聯等技術。
  • 快速記憶體分配和垃圾回收:Java HotSpot 技術為物件提供了快速記憶體分配以及快速、高效、最新的垃圾回收器。
  • 執行緒同步:Java HotSpot 技術提供了一種執行緒處理能力,旨在擴充套件到大型的共享記憶體的多處理器伺服器中的使用。

In Oracle Java Runtime Environment (JRE) 8 and earlier, different implementations of the JVM, (the client VM, server VM, and minimal VM) were supported for configurations commonly used as clients, as servers, and for embedded systems. Because most systems can now take advantage of the server VM, the Oracle Java Runtime Environment (JRE) 9 provides only that VM implementation.

在Oracle JRE 8 以及更早版本中,JVM的不同實現(客戶端虛擬機器、伺服器虛擬機器和最小化虛擬機器)都支援通常用於客戶端、伺服器和嵌入式系統的配置。因為現在大多數系統都使用伺服器虛擬機器,因此Oracle JRE 9 只提供了伺服器虛擬機器實現。