Today's public service announcement:
Java's Object
#hashCode
() method returns an int which allows for negative hashcodes.
Don't use the hashcode % array length to calculate an array index
Java needs to change to become "phase aware".
Native images and checkpoint/restore use cases require a better ways to "say what you mean" to enable fast(er) startup.
. Great to hear that
@openj9
's -Xshareclasses cache brings
@micronautfw
startup "down to 400ms" out of the box and without restrictions on library, reflection, or dynamic loading, etc.
Mentioned the benefits of OpenJ9 @ 43:50 in reesponse to questions:
"As part of our continuing commitment to Eclipse Adoptium and the Eclipse OpenJ9 Java Virtual Machine, IBM will build and publish Java SE TCK-certified JDK binaries with OpenJ9 at no cost."
Great news for
@openj9
users from our friends at
@IBM
New t-shirt arrived today. Thanks
@QuarkusIO
!
It's awesome the ways that
@QuarkusIO
recognizes contributors - even those (like me!) with minor contributions.
That feeling when you recoil during a reviewing code, spend an hour investigating, and come to the conclusion "yup, that's the best this code can be without rewriting massive areas"
Answer: a resounding no!
Never been a better time to choose java. Language improvements,
#eclipse
foundation as new JavaEE / JakartaEE steward, microprofile innovation, and the amazing
@openj9
JVM.
Plus binaries from
@adoptopenjdk
Ecosystem had never been stronger!
Really excited for
@devnexus
next week!
If you're interested in hearing more about
@openj9
, find me at my talk "It's always sunny with OpenJ9", at the IBM booth, or during the "Open JDK Panel"
Starting my trip to
@Devoxx
. First in-person conference in a few years. So excited to see people again!
Unfortunately conflicts with Canadian Thanksgiving. Good thing my family's forgiving ;)
@cpurdy
Some languages don't even have specifications. And most that do, merely document what the "official" implementation does. But the true value of a specification is the discipline it enforces -- but only if you take seriously the idea that others will implement from the spec alone.
My son, flying into the room:
"We're having popcorn and watching a movie! Too bad you have to work. Bye."
Now I have to plot a popcorn heist. So much for getting anything done this afternoon ;)
I fixed a bike gear shifter today resulting in a happy kid.
The real heroes though are people who put up how-to-video's on youtube. It's incredible the detailed walkthroughs of just about everything. Really makes DIY of random tasks approachable
Really excited to see this PR to optimize
@openj9
's startup by changing how verification works -
Run with `-XX:+ClassRelationshipVerifier` to try it out on tonight's nightly builds!
Awesome work from Sharon to get this implemented!
Just received this email and am honoured to be a
#CodeOne
Star. Many thanks to everyone who enjoyed my talk last year on
@openj9
!
Hope we can connect again this year at my sessions or at the IBM booth.
Congrats, fellow CodeOne Stars!
MethodHandles can be used in much the same ways as reflection - but has tiny overhead in comparison.
This means you could build performant JDK 8-compatible libraries that pick up and use newer APIs if you run on a later JDK.
I've written up some thoughts on phase-aware source code and a couple of different execution patterns that are possible with checkpoint/restore and potentially native Java.
@SamuelHulick
@poiThePoi
@patio11
Decisions get made before they are communicated to 40+ person meetings (think all hands for a team). The time to call the decision wrong is when its being made, or in a smaller, private discussion afterwards.
That level of callout in such a large meeting is very disruptive
Off to
#CodeOne
. Looking forward to seeing everyone and hearing some great talks.
Interested in NestMates, Condy, & Constable, check out my talk on Wed 11:30am - Moscone South - Room 205.
Or if ML is more your thing, join the panel Thur 12:15am - Moscone South - Room 201.
I still miss writing smalltalk. Nothing like coding away, adding "self halt", executing your code and then continuing to develop in the debugger. Adding methods and classes as needed.
Building
@EclipseCollect
with many amazing developers in the open source community has rekindled the joy of programming I first learned with Smalltalk. Experience the power of Java with the wisdom of Smalltalk. You will be surprised by what is possible.
Excited to see this focus on startup and footprint!
@openj9
's -Xshareclasses option and dynamic AOT play well in this world!
Here's to fast
#JVM
startup and small footprint.
Reviewing
@openj9
's MethodHandle code as part of the move to
#OpenJDK
's MH impl.
We did some neat things with our approach, like allowing MH's to hold onto J9Method* while still avoiding full heap walks to on hot code replace:
NullPointerException vs. IllegalArgumentException for unexpected null parameters is one of my favorite
@java
discussions.
What do you prefer?
Feel free to retweet for reach.
Back home after my first
@JCreteUnconf
. What an amazing group of people. Great discussion, great food, and lots of new friends!
Big thanks to all the disorganizers for all you do to make this happen!
Really surprised by the number of recent issues where I find -Xverify:none in the command line.
If your app doesn't run with the verifier enabled, it shouldn't run at all.
Super excited my talk on
#openj9
was accepted to
@Jfokus
! Looking forward to my second Jfokus and more time in Stockholm! If you're in the area and want to talk JVMs, hit me up.
Listening to
@t_mammarella
and
@KadiGrigg
talk about how to expect the unexpected. Pandemic wedding planning as a metaphor for software disaster planning.
#Devoxx
That's an awesome book shelf. Smalltalk with style is a great intro to get new devs thinking in smalltalk.
Still grumpy someone took off with my copy of the
#bluebook
.
Newly updated article on eclipse openj9's shared classes feature.
One command line option to get dynamic AOT and class sharing for core class loaders and all urlclassloader subclasses
Important lesson: Add the **why** for subtle changes directly in the code. That's what comments are for!
Otherwise, reviewers need to reverse engineer the context and that takes way longer.
Plus 6 months down the road you'll thank yourself when you have debug it.
It's 3am, I have to be up at a reasonable time tomorrow, and all I want to do is keep reading my book.
Books, especially good ones I haven't reread for years and years, are worth losing some sleep over 🙂
Time to get busy in adding lazy static finals to the language (aka expose constant_dynamic) and allow them to be looked up lazily with all the perf warm fuzzies.
"JEP 416: Reimplement Core Reflection with Method Handles" was integrated into JDK 18. A few useful bits from the JEP follow:
"Method, Constructor, and Field instances should be held in static final fields so that they can be constant-folded by the JIT." (1/4)
My 5th gr teacher gave me an old TRS-80 she didn't want anymore. Started with Logo and moved to basic. Eventually split on the cost of a used 386 with my parents and started with those "type in the game" books.
@maxandersen
JDK 9 added a new "JDK_JAVA_OPTIONS" env var to allow specifying these kinds of options in a way that won't break 8 (which doesn't process this env var)
It's interesting how divided users are on the importance of startup time. For some, it's critical. Others just don't care.
It makes finding the tradeoffs in this space incredibly difficult.
See reddit discussion:
"... but what about JVMTI?"
Sometimes it feels like my role is mostly reminding people of the jvmti spec and the challenges it brings to our nice clean designs
Helped my kids make paper ninja stars today. After they started hitting each other in the face with them, I used my stellar parenting
... and had them wear sunglasses to protect their eyes.
Start testing your eclipse plugins now so you're ready. And while you're at it, update any apps you develop to run on JDK 11 now.
Need a JDK 11 to test with? Grab it from
@adoptopenjdk
(and pick the
@openj9
variant, it's the best 🙂)
Plan ahead: in 6 months I'll require Java 11 to run (but will still support development of your project targeting an older version of Java, of course)!
@kcpeppe
Time to first request is definitely more interesting than JVM startup time. I think that's what most people mean when they say "startup".
Finding ways to shift deployment & app init work out of the critical deployment path (ie: scaling out) is the area to improve.
Official AdoptOpenJDK RPM and DEB files are now ready! Give them a try and let us know how you get on! Massive thank you to
@jfrog
for providing us with the Artifactory instance to host these!
#openjdk
#linux
#adoptopenjdk
Need to pick a
#jdk
distribution? Great article explains why
@adoptopenjdk
should be the first choice.
"... every AdoptOpenJDK build runs through a ‘we test the hell out of it’ job ;)"
Love seeing `-XX:+ClassRelationshipVerifier` show up in lists of JVM options on unrelated github issues. A great way to boost startup by loading fewer classes.
fyi
@openj9
Like it or not, memory matters and will continue to change the way aid are written and run. It's part of why we're so proud of
@openj9
's memory footprint advantages.
I find it fascinating that "memory is cheap" has now become "memory is expensive" based solely on the fact that cloud providers charge too much to rent RAM. We're mutilating solid apps into microservices and functions just so we can fit into Amazon's pricing models.
@guizmaii
@strokyl
For JDK17 and later, both Hotspot and OpenJ9 use the same MethodHandle implementation (which is used by Lambdas).
The extra frame in the stack trace is due to different rules for hiding implementation stack frames.
Good news - it's been fixed. Next release will match Hotspot
Faster start-up for Java applications on Open Liberty with CRIU snapshots - a new blog post on the potential of CRIU for Java apps in serverless environments:
@jerrinot
Hotspot has both C1 and C2.
@openj9
's jit is called Testarossa.
Trade-offs tend to be about the whole runtime's characteristics, not just the JIT.
Had an discussion today about container startup time. Not time to first request, but time to get the container started to execute your code.
Is anyone measuring that these days? Working to optimize the container engines for startup?