Hotspot Debugger on Mac OS X Java 1.6 32-bit
Derek Shinaberry
email.openjdk-serviceability-dev at shinaberry.dyndns.org
Wed Feb 3 12:34:27 PST 2010
All I know for certain about the source is that MacPorts pulls the
source tarball from the link http://download.java.net/openjdk/jdk6/promoted/b16/openjdk-6-src-b16-24_apr_2009.tar.gz
. It looks like there is now a b17, but I have no idea whether it
would build on a Mac or if it would work if it did build. Maybe
that's the source of my troubles. I think maybe I'll give that a
try. I was afraid that maybe HSDB hadn't been ported. Thanks for the
info about the debug callable functions. Those might go a long way
towards understanding what's going on. I tried to peek at some of the
data structures, but quickly descended into casting and pointer
dereferencing hell.
On Feb 3, 2010, at 7:32 PM, Tom Rodriguez wrote:
> I assume the bits used by MacPorts are coming from http://hg.openjdk.java.net/bsd-port/bsd-port?
> That's the only working port of openjdk on the mac as far as I
> know. I know there are issues with 16 byte alignment in hotspot but
> I assume all of them had been fixed in the bsd-port. If this is
> something they missed I'm sure they'd like to know. You might try
> their alias at http://mail.openjdk.java.net/mailman/listinfo/bsd-port-dev
> . As far as HSDB I don't believe it's been ported to bsd/mac. It
> needs either a core file reader, which would be different on the mac
> since I assume it's Mach-O, or an API for control a live process
> like ptrace, and I don't think either has been written. If you have
> a debug build of hotspot there are functions that are callable from
> the debugger which can be used to figure some things out, like
> findpc which will try to indentify what a piece of generated code is
> and ps which will dump a Java stack trace. The full set is in src/
> share/vm/utilities/debug.cpp.
>
> tom
>
> On Feb 3, 2010, at 8:06 AM, Daniel D. Daugherty wrote:
>
>> Forwarding to hotspot-dev at ...
>>
>> Dan
>>
>>
>> Derek Shinaberry wrote:
>>> I am so far out of my depth here that I am not even sure which
>>> mailing list to start with, but the serviceability-dev seemed as
>>> good a place as any to begin.
>>>
>>> First of all, I am NOT well versed in Java, particularly the
>>> minutia and all things VM related. I am well versed in C++, which
>>> led me to believe that I might have half a chance when it comes to
>>> debugging a problem inside the VM.
>>>
>>> I'm running Mac OS X 10.5.8 on a 32-bit Core Duo processor, which
>>> doesn't support Java 6. So, I'm attempting to use OpenJDK 6
>>> installed using MacPorts.
>>>
>>> After some issues getting the build to work, I figured out what
>>> needed patching and succeeded in building and installing
>>> openjdk6. So far, so good.
>>>
>>> The program I'm running that required Java 6, called Marketcetera,
>>> crashes fairly frequently. Using gdb to investigate the crash, I
>>> figured out that it has to do with 16-byte stack alignment
>>> requirements on Mac OS X. I discovered a patch by Landon Fuller
>>> that attempts to address the issues. I fought for a while to get
>>> that patch integrated and building, but it finally built and
>>> installed. Still having the same crash and it is still related to
>>> stack alignment.
>>>
>>> I've tracked it down to code that is being generated at runtime,
>>> so gdb isn't much use in discovering exactly what code is the
>>> source of the problem. Enter the Hotspot Debugger. (Finally, he
>>> gets to the point!)
>>>
>>> It doesn't appear that HSDB is built by MacPorts on Mac OS X. It
>>> doesn't even look like there is a bsd directory which would
>>> presumably contain that code. Has anyone successfully used HSDB
>>> on Mac OS X? Can anyone point me in the right direction for being
>>> able to understand what is going on inside the VM on Mac OS X?
>>> Any help would be much appreciated.
>>>
>>> Cheers,
>>> Derek
>
>
More information about the hotspot-dev
mailing list