A. Sundararajan's Weblog:
This is amazing news! It has, in fact, in one stroke returned my faith in the continuing evolution of Java as a valuable tool. You see, I have been thinking along similar lines for quite a long while. My thoughts, however, where not centered around the heap dump, but on integrating a heap query language into the Eclipse debugger. But given this OQL support JHat, I think it should be fairly straightforward to integrate this into the debugger. Imagine being able to define OQL queries as watch expressions, complete with difference highlighting from snapshot to snapshot. It would make debugging the state change of complex structures a breeze.
I already started a hobby project, POJOQL, which implements a small query language for heap objects. However, so far I have not found a way to traverse the heap globally. So it only runs on a given starting object. The language is different from OQL, and, I believe, better suited to quick, ad-hoc queries for structured information. For example,
Of course, LINQ in C# 3.0 clearly blows Java out of the water in this respect, but I still like the fact that Sun is thinking along these lines too.
"As I mentioned earlier, Mustang (Java SE 6) comes with jhat - Java Heap Analysis Tool. We have added more features to jhat as of build 53 (released on Sep, 22, 2005). jhat now comes with mechanism to query the heap. jhat supports OQL - Object Query Language -- a SQL-like language to query your Java heap!"
This is amazing news! It has, in fact, in one stroke returned my faith in the continuing evolution of Java as a valuable tool. You see, I have been thinking along similar lines for quite a long while. My thoughts, however, where not centered around the heap dump, but on integrating a heap query language into the Eclipse debugger. But given this OQL support JHat, I think it should be fairly straightforward to integrate this into the debugger. Imagine being able to define OQL queries as watch expressions, complete with difference highlighting from snapshot to snapshot. It would make debugging the state change of complex structures a breeze.
I already started a hobby project, POJOQL, which implements a small query language for heap objects. However, so far I have not found a way to traverse the heap globally. So it only runs on a given starting object. The language is different from OQL, and, I believe, better suited to quick, ad-hoc queries for structured information. For example,
name; children{ name; children< }lists the name of a top level object and, recursively, the names of all its children, displaying the result as a properly nested and indented structure.
Of course, LINQ in C# 3.0 clearly blows Java out of the water in this respect, but I still like the fact that Sun is thinking along these lines too.
Comments