面向程序员/开发人员的JVM内部规范参考 [英] Canonical reference on JVM internals for programmer/developers

查看:82
本文介绍了面向程序员/开发人员的JVM内部规范参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题很好地抓住了我的问题.我想知道是否有很好的资源或起点,以解决有关JVM(不仅仅是HotSpot,但显然是开始的地方)如何实现或处理特定功能的问题?我不是在寻找 JLS JVM规范-我知道先去那里.

The title captures my question fairly well. I'm wondering if there is a good resource or leaping-off point for questions about how a JVM (not just HotSpot, but that's obviously the place to start) implements or handles a specific functionality? I'm not looking for the stuff that's in the JLS or JVM Spec -- I know to go there first.

例如:当试图了解性能问题时,我们通常不讨论有关规范的内容,而是讨论实际实现中的现代最佳实践.例如,有一种都市神话说:最终类在Java中表现更好,因为JVM可以内联或以其他方式优化此类事情."我们是否可以使用一般资源来评估这些随处可见的声明?

For example: When trying to understand performance issues, we often get into conversations not about what the spec says, but what contemporary best-practices look like in practical implementations. For example, there is some urban mythology that says "final classes perform better in Java because the JVM can inline or otherwise optimize such things." Is there a general resource we can turn to in order to evaluate these claims that float around?

我提供了自己的问题的答案,并提供了针对HotSpot的参考.其他供应商的产品呢?小型JVM的细节?多核细节?平台细节,是否有所作为?特定于其他JVM语言吗?

I offer an answer to my own question, with HotSpot-specific references. What about other vendors' offerings? Specifics to small JVMs? Multi-core specifics? Platforms specifics, if they make a difference? Specifics to other JVM languages?

只是避免一些潜在的抱怨:1)这并不是要寻找过早的优化(事实上,更好地了解平台应该劝阻受过良好教育的开发人员!);和2)我知道Java程序员应该专注于美观,可移植,可在任何地方运行的代码,但是对于我们许多人而言,平台细节最终变得很重要!

Just to head off a couple of potential complaints: 1) This isn't about looking for premature optimizations (and in fact, better understanding of the platform should dissuade a better educated developer!); and 2) I know Java programmers are supposed to focus on nice, portable, run-anywhere code, but for many of us the platform specifics end up mattering!

这是受到有关特定问题的一些有用评论的启发 a>通过ThorbjørnRavn Andersen .我很高兴收集我上面引用的例子以外的其他一些有用的例子,以激发人们为什么需要这些资源.

This was inspired by some helpful comments on a specific question by Thorbjørn Ravn Andersen. I'm happy to collect some other more helpful examples beyond the one I cite above, to motivate why folks might want these kinds of resources.

关于SO的一些有趣的相关问题: JVM中的尾调用优化 Killer JVM功能优化将无用明天 JVM实现之间的差异.

Some interesting related questions on SO: Tail-call optimization in JVM, Killer JVM features, optimizations that are going to be useless tomorrow, Differences between JVM implementations.

编辑后添加:我将把答案授予提到的最佳个人参考,授予提供指向网站的指针的人(也许是基于响应而构建的)这个问题)最能集中/编排JVM实现的智慧以及对客户端语言和开发人员的实际影响.

Edited to Add: I'll award the answer either to the best individual reference mentioned, or to someone who provides a pointer to a website (perhaps built in response to this question) that best concentrates/catalogs JVM implementation wisdom and the practical consequences on client languages and developers.

推荐答案

  • OpenJDK"JVM Internals" Wiki 是HotSpot的起点
  • Oracle的 Java SE 6性能白皮书及其前辈们提供了很多见识,尽管本身并不是针对我的问题而组织的
  • 关于HotSpot的同步,请参阅我的在此处答复. /li>

    • The OpenJDK "JVM Internals" wiki is a place to start for HotSpot
    • Oracle's Java SE 6 Performance White Paper and its predecessors give a lot of insight, though isn't organized for my question per se
    • On synchronization for HotSpot, see my answer here.
    • 这篇关于面向程序员/开发人员的JVM内部规范参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆