Standard Compilation & OSR
来源:互联网 发布:网络空间安全好就业吗 编辑:程序博客网 时间:2024/05/21 04:22
When the JVM executes a Java method, it checks the sum of those two counters and decides whether or not the method is eligible for compilation. If it is, the method is queued for compilation (see Compilation Threads for more details about queuing). This kind of compilation has no official name but is often called standard compilation.
But what if the method has a really long loop—or one that never exits and provides all the logic of the program? In that case, the JVM needs to compile the loop without waiting for a method invocation. So every time the loop completes an execution, the branching counter is incremented and inspected. If the branching counter has exceeded its individual threshold, then the loop (and not the entire method) becomes eligible for compilation.
This kind of compilation is called On-Stack Replacement (OSR), because even if the loop is compiled, that isn’t sufficient: the JVM has to have the ability to start executing the compiled version of the loop while the loop is still running. When the code for the loop has finished compiling, the JVM replaces the code (on-stack), and the next iteration of the loop will execute the much-faster compiled version of the code.
If a method is compiled using standard compilation, then the next method invocation will execute the compiled method; if a loop is compiled using OSR, then the next iteration of the loop will execute the compiled code.
- Standard Compilation & OSR
- standard
- Conditional Compilation
- compilation firewalls
- Compilation 【failed】
- Compilation failure
- OSR Driver Loader加载或卸载*.sys
- IFS FAQ(转自OSR)
- 文件加密标识 -OSR经典对白
- Introduction to Registry Filtering in Vista(OSR)
- .osr 文件格式解析(二) - 数据类型
- OSR文档:NT中的异步过程调用(APC)
- .osr 文件格式解析(一) - 官方格式说明
- .osr 文件格式解析(三) - 读取OSB文件
- .osr 文件格式解析(四) - LifeBarGraph和TimeStamp
- .osr 文件格式解析(五) - 回放数据ReplayData
- 16.1 Compilation units
- Item 29. Compilation Firewalls
- cocos植物大战僵尸(二)主菜单场景:单例类
- 财付通安全性存疑:资金频被盗刷
- 粒子群算法1
- sizeof求结构体所占空间大小
- Codeforces 567C Geometric Progression (离散 + DP)
- Standard Compilation & OSR
- HDU 2072 单词数 -- C++ string set 统计不同的单词数目
- chrome浏览器去除广告
- 数组中未出现的最小正整数(算法)
- Java文件上传下载
- [最大流]UVa11082
- JBOSS学习-一些基本配置了解
- 40 Combination Sum II
- ontouch