RFR (S) 8015329: Print reason for failed MiniDumpWriteDump() call

Staffan Larsen staffan.larsen at oracle.com
Fri May 24 09:28:09 PDT 2013


Looks good.

/Staffan

On 24 maj 2013, at 15:30, Christian Tornqvist <christian.tornqvist at oracle.com> wrote:

> Hi David,
> 
> First of all, thanks for your feedback :)
> 
> I think I've addressed your concerns along with some (offline) feedback from
> Peter Allwin, updated webrev can be found at:
> 
> http://cr.openjdk.java.net/~ctornqvi/webrev/8015329/webrev.01/
> 
> Thanks,
> Christian
> 
> -----Original Message-----
> From: David Holmes [mailto:david.holmes at oracle.com] 
> Sent: den 23 maj 2013 22:42
> To: Christian Tornqvist
> Cc: 'Peter Allwin'; markus.gronlund at oracle.com; 'Staffan Larsen';
> hotspot-runtime-dev at openjdk.java.net
> Subject: Re: RFR (S) 8015329: Print reason for failed MiniDumpWriteDump()
> call
> 
> Hi Christian,
> 
> I wasn't familiar with the FormatMessage call but based on the one other use
> we have, and on:
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms679351%28v=vs.85%2
> 9.aspx
> 
> I think you want to just pass zero for the language ID not
> MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT).
> 
> You should also check that FormatMessage succeeds (and just print the
> original error code, skipping the human-readable string).
> 
> And you should call LocalFree for the allocated buffer after the
> jio_snprintf.
> 
> Thanks,
> David
> 
> On 24/05/2013 8:54 AM, Christian Tornqvist wrote:
>> Hi everyone,
>> 
>> Please review this small change, we now print the reason for a failed 
>> call to MiniDumpWriteDump(). Also changed so that we now produce 
>> minidumps by default on client versions of Windows when running with a 
>> debug build of the JVM. Note that it is still possible to turn this 
>> off by -XX:-CreateMinidumpOnCrash
>> 
>> Tested the change by failing the call to MiniDumpWriteDump in a 
>> debugger and manually verified the output. Verified the minidump on 
>> debug builds change by running:
>> 
>> java -XX:ErrorHandlerTest=9 -version
>> 
>> java -XX:-CreateMinidumpOnCrash -XX:ErrorHandlerTest=9 -version
>> 
>> java -XX:+CreateMinidumpOnCrash -XX:ErrorHandlerTest=9 -version
>> 
>> Webrev: http://cr.openjdk.java.net/~ctornqvi/webrev/8015329/webrev.00/
>> 
>> Bug (link not yet visible at time of posting):
>> http://bugs.sun.com/view_bug.do?bug_id=8015329
>> 
>> Thanks,
>> 
>> Christian
>> 
> 



More information about the hotspot-runtime-dev mailing list