文件名称:
08-java11-hotspot-guide.pdf
开发工具:
文件大小: 664kb
下载次数: 0
上传时间: 2019-10-09
详细说明:这是官方的原版表中文档。Java11平台中,官方hotspot虚拟机的具体实现的标书。Contents
Preface
Audience
Documentation Accessibility
Related documents
Conventions
1 Java Virtual Machine Technology Overview
2 Compiler Control
Writing Directives
2-1
Compiler Control Options
2-2
Writing a directive file
2-5
Writing a Compiler Directive
2-7
Writing a Method Pattern in a Compiler Directive
2-9
Writing an Inline Directive Option
2-10
Preventing Duplication with the Enable Option
2-10
Understanding Directives
2-11
What is the default directive?
2-12
HoW Directives are Applied to Code?
2-14
Compiler Control and Backward Compatibility
2-15
Commands for Working with Directive Files
2-16
Compiler Directives and the Command Line
2-16
Compiler Directives and Diagnostic Commands
2-17
Getting your Java Process Identification Number
2-17
Adding Directives Through Diagnostic Commands
2-17
Removing Directives Through Diagnostic Commands
2-18
Printing Directives Through Diagnostic Commands
2-18
How Directives are ordered in the directives stack?
2-18
ORACL∈
3 Garbage Collection
4 Class Data Sharing
Class data sharin
4-1
Application Class-Data Sharing
4-2
Regenerating the Shared Archive
4-2
Manually Controlling Class Data Sharing
4-2
5 Java Hotspot Virtual Machine Performance Enhancements
Compact Strings
5-1
Tiered Compilation
Segmented Code Cache
5-2
Graal: a Java-Based JIT Compiler
5-3
Ahead-of-Time compilation
5-3
Compressed Ordinary object Pointer
5-4
Zero-Based Compressed Ordinary object Pointers
5-5
Escape Analysis
5-5
6 Support for Non-Java Languages
Introduction to Non-Java Language Features
6-1
Static and Dynamic Typing
6-2
Statically-Typed Languages Are Not Necessarily Strongly-Typed Languages
6-3
The Challenge of Compiling Dynamically-Typed Languages
6-3
The invokedynamic Instruction
6-5
Defining the Bootstrap Method
6-6
Specifying Constant Pool Entries
6-7
Example Constant Pool
6-7
Using the invokedynamic Instruction
6-8
7 Signal Chaining
8 Native Memory Tracking
Key features
8-1
Using Native Memory T racking
8-1
Enabling nmt
8-1
Accessing nmt data using icmd
8-2
ORACLE
Obtaining NMT Data at VM EXit
8-2
9 DTrace Probes in Hotspot VM
Using the hotspot Provider
9-1
VM Lifecycle Probes
9-1
Thread Lifecycle probes
9-2
Classloading Probes
9-2
Garbage Collection Probes
9-3
Method Compilation Probes
9-4
Monitor probes
9-5
Application Tracking Probes
9-6
Using the hotspot jni Provider
9-7
Sample Dtrace Probes
9-7
10 Fatal Error Reporting
Error Report example
10-1
11 Java Virtual Machine Related Resources
Tools
11-1
ORACL∈
Preface
Preface
This document provides information about the features supported by java virtual
Machine technology
Audience
This document is intended for experienced developers who build applications using
the Java Hotspot technology
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle
AccessibilityProgramwebsiteathttp://www.oracle.com/pls/topic/lookup?
ctx=acc&id=docacc
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support
throughMyOracleSupportForinformationvisithttp://www.oracle.com/pls/topic/
lookup?ctx=acc&id=infoorvisithttp://www.oracle.com/pls/topic/ookup?ctx=acc&id=trs
if you are hearing impaired
Related documents
See JDK 1l Documentation for other JDK 12 guides
Conventions
The following text conventions are used in this document
Convention
MeanIng
boldface
Boldface type indicates graphical user interface elements associated
with an action or terms defined in text
italic
I talic type indicates book titles, emphasis, or placeholder variables for
thich you supply particular values
.andspace
Monospace type indicates commands within a paragraph, URLS, code
in examples, text that appears on the screen, or text that you enter
ORACLE
1
Java virtual machine Technology Overview
This chapter describes the implementation of the java virtual Machine (JvM) and the
main features of the java Hot spot 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 Hot Spot VM uses the adaptive
compiler to decide how to optimize compiled code with techniques such as
g
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
In oracle Java Runtime Environment JRE)8 and earlier, difterent 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
Compiler Control
Compiler Control provides a way to control Java Virtual Machine JVM) compilation
through compiler directive options. The level of control is runtime- manageable and
method specific
a compiler directive is an instruction that tells the ]Vm how compilation should occur
a directive provides method-context precision in controlling the compilation process
You can use directives to write small, contained, JVM compiler tests that can run
without restarting the entire JVM. You can also use directives to create workarounds
for bugs, in the JVM compilers
You can specity a file that contains compiler directives when you start a program
through the command line. You can also add or remove directives from an already
running program by using diagnostic commands
Compiler Control supersedes and is backward compatible with Compile Command
TopICS
Writing Directives
iting a directive File
Writing a Compiler Directive
Writing a Method Pattern in a Compiler Directive
Writing an Inline Directive Option
Preventing Duplication with the Enable Option
Understanding Directives
What is the default directive?
How Directives are Applied to Code?
Compiler Control and Backward Compatibility
Commands for Working with directive Files
Compiler directives and the command line
Compiler Directives and Diagnostic Commands
How Directives are ordered in the directives stack?
Writing Directives
This topic examines Compiler Control options and steps for writing directives from
those options
Topics:
Compiler Control Options
ORACLE
Chapter 2
Writing Directives
Writing a directive Flle
Writing a Compiler Directive
Writing a Method Pattern in a Compiler Directive
Writing an Inline Directive Option
Preventing duplication with the Enable Option
Compiler Control Options
Options are instructions for compilation. Options provide method-context precision
Available options vary by compiler and require specific types of values
Table 2-1 Common Options
option
Description
Value Type
Default value
Enable
Hides a directive and bocl
true
ders it unmatchable
if it is set to fal
This option is useful
for preventing option
ng
duplication. See
Preventing Duplication
with the enable
ptio
Exclude
Excludes methods
bocl
false
from compila
BreakAtExecute Sets a breakpoint to bocl
false
stop execution at the
beginning of the
specified methods
then debugging the
JVM
BreakAt Compile
Sets a breakpoint to bocl
false
stop compilation at the
beginning of the
specified methods
when debugging the
JVM
Log
Places only the
false
specified methods in a
log. You must first set
the command-line
option -XX
+L○ g Compilatio
The default value
-alse places all
compiled methods in a
og
ORACLE
2-2
Chapter 2
Writing Directives
Table 2-1 (Cont )Common options
Option
Description
Value Type
Default value
Printassembl
Prints assembly code bool
fa⊥se
for bytecoded and
native methods by
using the external
disassembler. so
library
PrintInlining
Prints which methods bool
false
are inlined, and where
PrintNMethods
Prints nmethods as
boo
false
they are generated
BackgroundCompila Compiles methods as bool
true
tion
a background task
Methods run in
interpreter mode until
the background
compilation finishes
The value false
compiles methods as
a foreground task
Replayinline
Enables the sai
bool
false
CIReplay functionality
as the corresponding
global option, but on a
per-method basis
DumpReplay
Enables the same
bool
false
CIReplay functionalit
as the corresponding
global option, but on a
per-method basis
DumpInline
Enables the same
bool
false
CIReplay functionalit
as the corresponding
global option, but on a
per-method basis
CompilerDirective Disregards all
bool
false
sIgnoreCompileCom Complecommands
Disableintrinsic Disables the use of cstr
No default value
intrinsics based on
method-matchin
g
criteria
in⊥ine
Forces or prevents
[]
No default value
inlining of a method
based on method
matching criteria. See
Writing an inline
Directive Option
ORACL∈
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.