JIT中的C1和C2编译器

Compilation Modes
Inside Java HotSpot VM, there are actually two separate JIT compiler modes, which are known as C1 and C2. C1 is used for applications where quick startup and rock-solid optimization are required; GUI applications are often good candidates for this compiler. C2, on the other hand, was originally intended for long-running, predominantly server-side applications. Prior to some of the later Java SE 7 releases, these two modes were available using the -client and -server switches, respectively.

The two compiler modes use different techniques for JIT compilation, and they can output very different machine code for the same Java method. Modern Java applications, however, can usually make use of both compilation modes. To take advantage of this fact, starting with some of the later Java SE 7 releases, a new feature called tiered compilation became available. This feature uses the C1 compiler mode at the start to provide better startup performance. Once the application is properly warmed up, the C2 compiler mode takes over to provide more-aggressive optimizations and, usually, better performance. With the arrival of Java SE 8, tiered compilation is now the default behavior.
参考:
http://www.oracle.com/technetwork/articles/java/architect-evans-pt1-2266278.html

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,424评论 0 10
  • 刚刚看到一句话,没有法律规定过完年生活会更好!只愿此生尽兴,赤诚善良……
    田园阳光房阅读 172评论 0 0
  • 看书我喜欢随心所欲,喜欢看自己喜欢的感觉的书籍;看书我喜欢在自己的世界里,没有压抑,没有强迫! 也是因为这样的永远...
    海洋姐姐阅读 215评论 0 1
  • 文/楠央 文/楠央 当王青知晓他的母亲已经离去时,他正坐在回家的地铁上。那呼啸着不停穿梭在地底的地铁使得信号时有时...
    楠央阅读 624评论 18 18