There are 4 posts tagged java

Investigating "Mysterious" HotSpot Behavior

tech

java openjdk internals gc


Yo! I am preparing a new talk, to be first presented at the upcoming Joker Conference in Saint Petersburg, Russia. With it, I intend to make everyone capable of digging deep into HotSpot to get to the bottom of their issues.

This blog entry is a teaser which examines a sample problem encountered by Nikita of Plumbr.

What does GC cause _no_gc mean? and _last_ditch_collection too. #JVM /cc @shipilev ?

Read the full text

Keeping Your Benchmarks Separate From Code

tech

java jmh gradle build performance tests benchmarking shadow


It is an established practice to keep you Unit Tests and your production code separate, in such a way that the compiled artifacts do not end up containing tests. It has recently drawn my attention, however, that it is usually not the case with benchmarks and performance tests. A possible reason is that it might be a little bit tricky. So here's a sample github project of how it can be done in a more or less ideologically right way with JMH and gradle. This article goes into some further detail and explains why stuff is like it is.

Read the full text

Java Memory Model Under The Hood

tech

java membar openjdk internals volatile jmm happens-before


There are many sources where you can get an idea of what JMM is about, but most of them still leave you with lots of unanswered questions. How does that happens-before thing work? Does using volatile result in caches being dropped? Why do we even need a memory model in the first place?

This article is intended to give the readers a level of understanding which allows them to answer all of these questions. It will consist of two large parts; the first of them being a hardware-level outline of what's happening, and the second is indulging in some digging around OpenJDK sources and experimenting. Thus, even if you're not exactly into Java, the first part might still be of interest to you.

Read the full text

Building OpenJDK 8 on Mac OS X Mavericks

tech

java make gcc cmake apple openjdk mavericks osx homebrew xcode ffs


So You Have Set Out To Build OpenJDK

Everyone enjoys some good Adventure from time to time. One of my latest is building OpenJDK on Mac OS X Mavericks. This article is a mix of building instructions and my Adventure Log. If you are not interested in the latter, there's a TL;DR version available. I cannot guarantee that it will work in every single case, however. You may or may not encounter the same issues as I have. To have a better understanding of what's going on I recommend you to at least skim the whole of it.

Read the full text

CC0 Freely use this for any purpose whatsoever, in any way you can imagine