Summer of Code


So, last week was quite eventful. Firstly, I got accepted for Google’s Summer of Code, working on the Jikes RVM project. I’ll be continuing in much the same vein as last year’s GSoC in implementing the java.lang.management extensions. It gives me a good excuse to finally play around with Jikes RVM again. The last time I tried was several years back when I first started hacking on Classpath, and I fell a victim to its build system, never even getting a running VM out of it. The build system has since been seriously re-jigged, so this time I intend to have more success. At least this time round, I know who to talk to if I don’t…. ;) Implementing the extensions on a VM is a good way to get to know the ins and outs, as it requires some fairly deep hooks. Hopefully, I won’t cause too many ruptions in the codebase…

Other than that, I’ve been playing around with GJDoc, trying valiently to get it to eat the latest Classpath CVS source. I finally succeeded in getting a run through last night, and the results are available on my website. File your bugs in the usual place; believe me, there are plenty!

Google has kindly extended the student deadline to 5pm PST on the 26th of March (which is 12am on the Tuesday, in UTC). Even so, this time is steadily approaching, so if you’re thinking of submitting an application (or several) for this year, you need to do so about now. Last night, I submitted a proposal for implementing the JMX stack on Jikes RVM, which should be an interesting task, combining my existing knowledge of this area with the new challenges of a Java-based VM that I’ve been meaning to play with for a while now.

I’ve also started pulling the FOSDEM movies from my camera, mainly because I was forced to as I needed the tape to film a lecture. I’m planning to encode in Ogg Theora/Vorbis in a range of sizes and also encode an MPEG-2 version to store on DVD (the originals are too big to keep). The first results of this can be seen

Still haven’t got round to looking at the stuff I captured at FOSDEM, and surprisingly it’s already over a week ago — how time flies. There are a few pictures, but I left most of this to Mario and Steph as they were much more well prepared and equipped than I. What I do have is video of the Runtime Rumble and a couple of the Sun talks (IIRC). I need to work out where I can dump multigigabytes worth of DV before anything else; I took two tapes full in all.

What’s been occupying my thoughts so far this week is the imminent start of Google’s Summer of Code for 2007. It starts quite a bit earlier this year (student deadline of March 24th), and with all the Sun kerfuffle, it’s a little more difficult to choose a project than I expected at the end of last year’s SoC. I don’t want to put in a proposal for something that might get shipwrecked by any imminent arrivals of Free Sun code…

I raised the matter on #classpath today, and got some good feedback. There are plenty of tasks on underlying stuff (rather than APIs) that I could tackle. Also, Ian Rogers from Jikes RVM and Tom Marble (Sun’s OpenJDK ambassador) mentioned that their respective projects may be acting as mentoring organisations, so there seems to be plenty of choice. Unfortunately, I can’t really make any firm decisions until the organisations are decided, which is the same time as student proposals open. Just have to be prepared I guess…

Seems like it’s again a month since I last blogged here… :( I’ve been a little outside the GNU Classpath sphere lately, and I really need to get back in the fold. Things have been a little crazy in real life, recently. At the beginning of the month, I had laser surgery, which slowed things down for a week or so afterwards while I recovered. Things have also been busy with the start of the new academic year here in the UK, and teaching duties once again starting up. I seem to be on top of things again now though, and hopefully will commit a bit more soon. I certainly need to do a merge tomorrow……

As a closure to Summer of Code, I went down to London to visit Google yesterday. It was an enjoyable experience, and certainly very interesting. The whole place is kinda like what our PhD research lab would be like if we had about ten times the space and a few million to spend… ;) I came away with a bag full of goodies, and some interesting insights. I’ll also be involved in Google’s Pizza ambassador scheme, once the European side gets going, and I plan to have another stab at SoC next year. It’ll be earlier than last year, probably sometime in February, so need to think about this sooner rather than later.

So it’s been more than a month since I last wrote here. Things have been a bit mad lately with my other life as a postgraduate student. I attended a conference in Manchester at the end of August, and then had to write a report (currently at 90+ pages) on why they should let me stay on for the next two years. So there’s not been much time left over for Classpath stuff unfortunately… it’s kind of good that SoC ended when it did after all.

Over the last week, I’ve added some more of the management stuff, trying to finish off large parts of the JMX stack. Primarily, I’d just like to get the server side of java.lang.management sorted (it still needs to reach 100%). It’s getting closer, but there’s still a fair bit to add.

This Thursday, I’ll be giving a seminar in Manchester in relation to GNU Classpath and its handling of the new language features in Java 1.5. I’ve included the contents of the e-mail about this below, and I’m also attaching the slides — comments welcome.

BTW, It seems SoC ends even sooner than I thought — just next Monday! (the 5th is the evaluation deadline). Now that Tom Tromey has merged our branches together, I need to add a bit more meat to the native management stubs that exist. The Classpath side has been a definite success, resulting in over half of javax.management being developed, all of javax.management.openmbean and the majority of java.lang.management (all but the bean server is complete).

———————————————————————————————————————–

“GNU Classpath and Java 1.5.0″

Thursday, 17th August 2006, 2:15pm

Lecture Theater 1.5, Kilburn Building

The APT group is delighted to have invited Andrew Hughes from the GNU
Classpath project to present on Thursday 17th of August. GNU Classpath
is the core library of most open source virtual machines and the GNU
Compiler for Java, part of the GNU Compiler Collection (GCC). Andrew is
the maintainer of the generics branch of GNU Classpath, this project
will allow open source JVMs to implement the richer language and API
features of Java 5.0.

Abstract
======

The GNU Classpath project focuses on creating a clean-room
implementation of the class libraries used by virtual machines and
compilers for the Java programming language, under a Free Software
license. The recent additions to the Java programming language in
version 1.5 have introduced new issues for the project, due to the
necessity to introduce changes across the board, in the compiler, the VM
and the library itself. In this talk, I will briefly describe the
changes made to the Java programming language in version 1.5, and then
show how developers on the GNU Classpath project, and associated
compiler and VM projects (such as Kaffe, GCJ and JikesRVM) have worked
to ensure that there can exist a Free implementation of this material.

Biography
========
I’ve been a developer on the GNU Classpath project for just over two
years. During this time, my work has focused on maintaining the
‘generics branch’ of the project, which attempts to handle the changes
in Java 1.5. Recently, I’ve also been involved in a Google Summer of
Code project. This was also related to GNU Classpath, but focused on
bringing support for the low-level management features in
java.lang.management to the project. My work on the project takes place
in what spare time I have available, aside from my commitments to the
postgraduate degree I’m currently undertaking at the University of
Sheffield, in the area of process algebraic research.

I checked the finish date for SoC the other day and realised that it is in fact quite close; only September 5th. It seems to have lasted hardly any time at all.

As far as my project goes, the Classpath side is largely complete. Each bean is now a fully paid up dynamic bean, that can be probed for its attributes. They also return a descriptor using a limited set of open types, and provide conversion to these types in an implementation of getAttribute, which overrides the one in StandardMBean.

As part of doing this, javax.management.openmbean has become 100% complete according to JAPI, which is a nice indication of the work done. java.lang.management is also approaching this; we just need a platform server now. Unfortunately, it will never reach 100% on HEAD until the generics branch is merged in, as 12% accounts for an enumeration (which seems to weigh quite a lot, but then it does have both its own methods and all those derived from Enum and Object, none of which I had to write).

The gcj-eclipse-jmx branch is nearly in a buildable state. All the build problems I’ve had are now sorted, and I’m actually at the point where the errors are clear linking errors, caused by missing native methods (of which they are quite a few, due to the introduction of the concurrency stuff too). It should be usable soon, and it already includes a working implementation of the runtime bean.

Again, it’s been a while since I blogged, so time for another update. The current status is quite different from the last time I wrote. Classpath CVS HEAD now includes implementations of all the beans, with VM interfaces, and is just awaiting a few finishing touches that require stuff from the javax.management blob of packages (which are slowly getting implemented on a as-needed basis). Last week, I added support for the open management bean CompositeData class, and a translation from instances of that into instances of ThreadInfo and MemoryUsage. Today, notification support was largely added; all that is needed now is to implement the bit in the memory bean that actually implements the required interface and creates appropriate instances on a callback from the VM.

After that, the beans need to become real management beans (i.e. implementations of DynamicMBean really), and then be made available via an MBeanServer instance (the platform server). This will require most of the rest of javax.management, I guess, and javax.management.openmbean. I think the rest can wait until the SoC project finishes.

On the GCJ front, the copyright issues were sorted out, and I now have a branch: gcj-eclipse-jmx, which is based on Tom Tromey’s gcj-eclipse branch, but with a more up-to-date copy of the generics branch, including the management changes. I currently have a implementation of the Runtime bean on there, but things aren’t really buildable at present. Still a fair bit to sort out, but certainly things seem feasible in the time remaining.

Again, it’s been a while since I blogged, so time for another update. The current status is quite different from the last time I wrote. Classpath CVS HEAD now includes implementations of all the beans, with VM interfaces, and is just awaiting a few finishing touches that require stuff from the javax.management blob of packages (which are slowly getting implemented on a as-needed basis). Last week, I added support for the open management bean CompositeData class, and a translation from instances of that into instances of ThreadInfo and MemoryUsage. Today, notification support was largely added; all that is needed now is to implement the bit in the memory bean that actually implements the required interface and creates appropriate instances on a callback from the VM.

After that, the beans need to become real management beans (i.e. implementations of DynamicMBean really), and then be made available via an MBeanServer instance (the platform server). This will require most of the rest of javax.management, I guess, and javax.management.openmbean. I think the rest can wait until the SoC project finishes.

On the GCJ front, the copyright issues were sorted out, and I now have a branch: gcj-eclipse-jmx, which is based on Tom Tromey’s gcj-eclipse branch, but with a more up-to-date copy of the generics branch, including the management changes. I currently have a implementation of the Runtime bean on there, but things aren’t really buildable at present. Still a fair bit to sort out, but certainly things seem feasible in the time remaining.

It’s been a little while since I last blogged, and things have moved on quite a bit with the SoC project. Last week, I finally got a copy of the huge GCC tree (all several gigabytes of it), and played about with GCJ. I now have an implementation of the runtime bean for it.

Unfortunately, it’s not going anywhere fast, as I still don’t have a copyright assignment for GCC. For some reason, the FSF folks now want a disclaimer from the University, which seems to be nigh on impossible to obtain (no-one I’ve spoken to knows anything about the legal stuff at the Uni) and unnecessary (I’m not working on this for my research, which is what the Uni policy covers).

That aside, I’ve broken our original proposed strategy to avoid this problem, and started writing some more beans. This week, I added the class loading and thread bean interfaces to HEAD, along with an implementation and new VM interface for the class loading bean. The thread bean is proving to be quite an undertaking. For one thing, we were missing some 1.5 threading methods which are needed by the bean. It seems to want lots of information about the thread, including monitoring when it changes state, how many times it goes in to the blocked, waiting and timed_waiting states, and, if contention monitoring is supported, how long it spent in these states. Phew! The changes were so big I haven’t written the bean yet; I thought just the interface and the ThreadInfo class would be enough in one patch. Hopefully, the others will be less disruptive to the VMs.

« Previous PageNext Page »