RFR (L): Adding core file parsing on Mac OS X to SA
staffan.larsen at oracle.com
Mon May 21 10:07:03 PDT 2012
I'm looking for a Reviewer for the change detailed below. I've added the hotspot-dev alias to the request. For the discussion so far see: http://mail.openjdk.java.net/pipermail/serviceability-dev/2012-May/005979.html
Short version: Add core file parsing to SA on Mac OS X by incorporating the KJDB tool developed by Kevin Walls.
Please let me know if you can review the code. It's quite a bit of code. Both myself and Kevin can answer questions on the code.
On 8 maj 2012, at 19:20, Staffan Larsen wrote:
> Here are some late breaking additions that Kevin sent me. These are only changes to the kjdb core.
> Full webrev: http://cr.openjdk.java.net/~sla/kjdb/webrev.02/
> Difference from the last webrev: http://cr.openjdk.java.net/~sla/kjdb/webrev.02-delta/
> And I should add credit where credit is due. The kjdb implementation is all Kevin Walls' great work. Integration in SA and tests are my work. Any errors are of course my fault as well.
> On 8 maj 2012, at 14:10, Kevin Walls wrote:
>> Hi -
>> Just a note that I'd like to contribute a cleaner way for the Debugger and Process classes here to load a core file, which I hadn't yet handed over. I'll have that ready shortly...
>> On 08/05/12 12:11, Staffan Larsen wrote:
>>> The Serviceability Agent currently has an outage on Mac OS X compared to other platforms in that we cannot read core files. We plan to address this for 7u6 by incorporating code from a separate tool called "kjdb" developed at Oracle. Kjdb is a cross-platform core-file debugger written completely in Java that currently works on ELF (solaris, linux) and Mach-O (mac) core files. Since it is written in Java it can read core files from a different system than the system you are running kjdb on, which is very useful.
>>> The alternative to incorporating the kjdb technology would have been to implement this in C as is done for the other platforms, but reusing existing code saves us some trouble. The kjdb debugger backend will automatically be enabled when you are opening a Mach-O core file (or if you explicitly set the -Duse.kjdb property when starting SA).
>>> The risks with this is that this is a large addition of relatively new code to SA (around 100 files). It also means that debugging a live process or a core file on OS X will use different debugger backends which may have different behavior and bugs.
>>> This change also adds a basic test that creates a core file and uses SA to print the thread dumps in the core. This test runs on all platforms, not just Mac OS X. Other than that test, some level of manual testing has been done with various core files.
>>> Please see the webrev at: http://cr.openjdk.java.net/~sla/kjdb/webrev.01/ <http://cr.openjdk.java.net/%7Esla/kjdb/webrev.01/>
>>> There are quite a number of added files in this webrev, so it's probably best to concentrate on the changes in the existing files.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-dev