What Have I Been Up To?

So, I've been cagey about writing about work here. While it's no longer a secret what I've been up to, I guess I still have a residual amount of hesitance to writing about my work. So here I am, trying to push back against my hesitance! 

JavaOne

JavaOne was last week, and IBM had some representation, including some people I work with. 

Perhaps the most important presentation for sharing what I'm working on, was that of my team lead, Daryl Maier, who presented the following on Wednesday (video here).

In it, he covers the work I'm most closely connected with: The refactoring and reshaping of an existing runtime system into a language agnostic set of recyclable components, which we want to open source!

Our focus, as the JIT team has of course been on the refactoring of the JIT compiler, however, other teams in the IBM Runtimes area are also involved.For example, below is a slide deck from Charlie Gracie describing the Garbage Collection portion of the effort. 

In addition to refactoring, my personal focus has been on the Ruby JIT, improving functionality, and exploring approaches to compilation for Ruby.

I've learned an immense amount about virtual machines, JIT compilation and software engineering over the last year or so. I'm planning on doing some in-depth writing about the JIT, and I will link to / republish it here as soon as I've gotten to it.

I'll also be presenting at a conference next month!  (More on that later!) 

One last thing: If any of this sounds interesting, if you have questions, or want to come work with us? Drop me a line: magaudet <> ca.ibm.com!, @MattStudies

Learn your tools: GDB and Replay

Lesson

Pay attention to what your tools give you. Sometimes it's exactly what you want. 

Story

I have been trying to figure something out inside the Ruby interpreter for a couple of days now. Trying to find something that happens only after hundreds of method executions can be painful; Putting a breakpoint is difficult when the breakpoint will be executed hundreds of thousands of times before it becomes interesting. Conditional breakpoints help, but still aren't perfect, as sometimes formulating the right condition can be difficult.

Mozilla's rr put me in the mind of replay. I even went so far as to find a machine to run it on . Turns out however, Ruby, or our JIT hooked up to Ruby uses a system call unimplemented in rr, and so it didn't work.

While looking for something else though, I noticed the replay family of commands in GDB's help menu. Some googling led to the documentation. Not going to lie though, it really took the tutorial to help me get a handle on it.

What a revelation!

Replay allowed my to very quickly find something I'd spent the day before trying to track down.

reverse-step, you are a dear friend now.


What about rr? As it turns out, for my issue, rr is almost certainly overkill. rr aims to catch non-deterministic failures; where mine is perfectly deterministic. I do hope to spend more time playing with rr though, as it's very cool tech.