Java

OpenJDK on AArch64: We have a release

We at the AArch64 Port Project are pleased to announce the first release of OpenJDK on the Linux/AArch64 platform.  It is the first implementation of the Java platform to be made available for this processor architecture.

For those who haven’t heard: AArch64 is the latest architecture from ARM.  It is an entirely new instruction set, not compatible with the earlier generation of 32-bit ARM processors, so we need a new OpenJDK port for it.

Continue reading “OpenJDK on AArch64: We have a release”

Share

XML editing with Bash script

Photo by seeweb

Countless products uses XML files, whether it is for data persistence, serialization or mere configuration. This is even more true when it comes to the Red Hat middleware portfolio, the JBoss projects having always been keen on using this format for configuration files – on top of the ones specified by JEE such as the famous (or infamous ?) web.xml.  While the XML format has some definitive qualities, it is not the easiest format to parse, and this often causes issues when integrating product inside an RPM or designing an automated installation procedure.

As I’ve been working on such automation for most of my career, I’ve picked up a bunch of nifty tricks and also designed some useful practices that I wanted to share on this blog.

Continue reading “XML editing with Bash script”

Share

Performance Regression Analysis with Performance Co-Pilot [video]

In an earlier post we looked into using the Performance Co-Pilot toolkit to explore performance characteristics of complex systems.  While surprisingly rewarding, and often unexpectedly insightful, this kind of analysis can be rightly criticized for being “hit and miss”.  When a system has many thousands of metric values it is not feasible to manually explore the entire metric search space in a short amount of time.  Or the problem may be less obvious than the example shown – perhaps we are looking at a slow degradation over time.

There are other tools that we can use to help us quickly reduce the search space and find interesting nuggets.  To illustrate, here’s a second example from our favorite ACME Co. production system. 

Continue reading “Performance Regression Analysis with Performance Co-Pilot “

Share

Exploratory Performance Analysis with Performance Co-Pilot [video]

Investigating performance in a complex system is a fascinating undertaking.  When that system spans multiple, closely-cooperating machines and has open-ended input sources (shared storage, or faces the Internet, etc) then the degree of difficulty of such investigations ratchets up quickly.  There are often many confounding factors, with many things going on all at the same time.

The observable behaviour of the system as a whole can be frequently changing even while at a micro level things may appear the same.  Or vice-versa – the system may appear healthy, average and 95th percentile response times are in excellent shape, yet a small subset of tasks are taking an unusually large amount of time to complete, just today perhaps.  Fascinating stuff!

Let’s first consider endearing characteristics of the performance tools we’d want to have at our disposal for exploring performance in this environment. 

Continue reading “Exploratory Performance Analysis with Performance Co-Pilot “

Share

OpenJDK, AArch64, and Fedora

For the really impatient reader: OpenJDK for AArch64 on Fedora is now available. Skip to the end of this blog for information about how you can get it.

For everyone else:
This is the first of my AArch64 OpenJDK blogs. I’m the project lead of the AArch64 OpenJDK port, and I’ll be blogging here from time to time. There may not be many people reading this blog who don’t know what AArch64 is, but it’s the new 64-bit version of the wildly popular ARM processor. General availability of real AArch64 hardware isn’t going to be for a while yet, but we really want OpenJDK to be ready as soon as it is.

Oh, and OpenDK is the reference implementation – the gold standard – of the Java system and programming language.

We’ve been porting the OpenJDK implementation of Java to the new AArch64 processor architecture for a while now, and it’s starting to come together.

Continue reading “OpenJDK, AArch64, and Fedora”

Share

Changing objects in flight, without a Debugger

How to change data in-flight, without a Debugger

Do you ever wish you could change the behavior of some object in the middle of a bunch of method calls?  I sometimes do.

Maybe you want to set some properties on an object to replicate a fault.  Maybe you’d like to force a specific return value from a method for some reason.  These are both very possible, without altering the source code for your application.

I like to do this through Byteman.  Byteman is a JBoss project that deals with bytecode injection.  This means that you can inject code you want to run, specifying where you want to run it.  It’s sort of like AOP, except I think it allows more freedom for the user.  It’s also pretty easy to use.

Here’s how:

1)  Make a helper class to do the work you want done
2)  Put the helper class in a .jar
3)  Write the Byteman rule that tells the helper class to do it’s thing

That’s it!  So here’s the example.

Part 1, the helper class
**********************************

public void addMarker(Message msg){
System.out.println(“Changing Message contents.”);
Body msgBody = msg.getBody();
msgBody.add(“Hey, I’ve got changed content”);
System.out.println(“Done changing Message contents”);
}
***********************************

Continue reading “Changing objects in flight, without a Debugger”

Share

From upstream OpenJDK to RPMs on your machine

Over the past few years, I have been asked on and off as to what the process is for the RPMs that get into Red Hat Enterprise Linux and Fedora repositories. Over those years, the answer has evolved as we attempt to better the process. As it stands right now, there is a difference between how OpenJDK6, OpenJDK7 and OpenJDK8 (preview in Fedora 19) end up into RPMs. This post will shed some light into what those processes are.

OpenJDK6
This was the first (well, technically second, if you count the brief period when IcedTea7 was in Fedora before OpenJDK6) OpenJDK based JDK that was introduced in Fedora and RHEL.

OpenJDK6 has been EOLd by Oracle as of February 2013, and Red Hat has taken over maintainer-ship since. Since the goal of Fedora is to have the latest and greatest, we allowed OpenJDK6 in Fedora to EOL after Fedora 16 in favour of OpenJDK7. Enterprises however have much longer cycles and we continue to ship and support OpenJDK6 in RHEL-5 and RHEL-6 today.

OpenJDK6 in Fedora and RHEL has always been provided via a project named IcedTea. IcedTea was started by Red Hat to address build and binary plug issues that were in the initial version of OpenJDK. The purpose of IcedTea was to provide build scaffolding that made it easy to build OpenJDK, to provide open-source replacements for binary plugs, and to provide fixes that couldn’t otherwise make it into upstream OpenJDK.

The process for shipping new OpenJDK6 releases in Fedora and RHEL hasn’t really changed over the years and it is as follows:

Continue reading “From upstream OpenJDK to RPMs on your machine”

Share