RFR (S): 7129724: Fix location of core file in dump message on macosx

David Holmes david.holmes at oracle.com
Mon Jun 25 23:31:29 PDT 2012


Hi Mikael,

On 26/06/2012 8:22 AM, Mikael Vidstedt wrote:
> If HotSpot crashes the dump message prints the default location of the
> generated core file. On other "posix" like OSes the path is normally
> <cwd>/core or core.<pid>, but on macosx the cores always end up in
> /cores/core.<pid>. This change aims to reflect that. Verified manually
> on Linux and macosx. Passes JPRT.
>
> Webrev: http://cr.openjdk.java.net/~mikael/7129724/webrev.00

I don't like this - sorry. The whole point of introducing 
os_posix.cpp/hpp was to capture common "posix" functionality. The very 
fact you need to add this change indicates this is not in fact "common 
posix functionality". Seems to me that the default core location should 
be a platform specific value:

os::get_corefile_path(char* buf, int buflen)

and then each os_*.cpp can define it as needed, with Solaris and Linux 
simply delegating to the existing os::get_current_directory(buf, len).

That aside, it really bugs me that BSD/OSX things are conditionalized on 
__APPLE__ ! Should be BSD or OSX or our internally defined values like 
TARGET_OS_FAMILY_xxx

Cheers,
David
----


More information about the hotspot-runtime-dev mailing list