Canonical reference on JVM internals for programmer/developers [closed]
Asked Answered
M

2

12

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.

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?

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?

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!

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.

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.

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.

Mamiemamma answered 18/10, 2010 at 21:41 Comment(0)
M
4
Mamiemamma answered 18/10, 2010 at 21:42 Comment(1)
Well, I've given it a week, I'm going to mark my answer correct, pending someone else providing something better.Mamiemamma
G
0

Some time ago I put together a short summary about what advanced programmer should know about jvm internals and help him to understand concurrency, gc, jit etc. better. It is a concentrated summary based on specification and OpenJDK.

Gerrald answered 31/12, 2017 at 17:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.