想问一个关于即时编译的问题

讨论 未结 3 56
7911364440
7911364440 会员 2022年6月15日 03:28 发表
<p>Java 字节码经过即时编译之后会变成机器码,这些机器码存在哪里的,内存吗?编译后的机器码会不会失效? 如果一段代码一开始调用频率非常高,被判定为热点代码并被即时编译,那如果这段代码之后不会再被访问,这段代码会不会降级为解释执行?</p>
收藏(0)  分享
相关标签: 灌水交流
注意:本文归作者所有,未经作者允许,不得转载
3个回复
  • koebehshian
    2022年6月15日 03:59
    For example, translation to machine code was done on demand, and the result was cached for later use. When memory became scarce, the system would delete some of this code and regenerate it when it was needed again. --- 是在内存,内存不够是会被替换掉。
    0 0
  • letianqiu
    2022年6月15日 03:59
    在 code cache 里。实际上就是 CHeap 里。hotspot 里有个东西叫 deoptimization ,就是你说的降级
    0 0