RFR: JDK-8059586: hs_err report should treat redirected core pattern.
thomas.stuefe at gmail.com
Tue Dec 9 08:09:15 UTC 2014
On Tue, Dec 9, 2014 at 6:39 AM, David Holmes <david.holmes at oracle.com>
> Hi Thomas,
> On 8/12/2014 8:27 PM, Thomas Stüfe wrote:
>> I do not really like the handling of the leading pipe symbol:
> To be fair to Yasumasa this aspect of the fix has been the same since Oct
> and was not flagged.
You are right, I did not read those mails close enough.
> So, we read the core_pattern, and if the pipe symbol is detected, we
>> write the core pattern minus the pipe symbol but plus a leading quote to
>> the output; the leading quote then serves as a info to the layer above
>> in os_posix.cpp to treat this case specially. This means the logic
>> spills out of the platform dependend os_linux.cpp to shared code and
>> this is also difficult to read.
>> This comes from the fact that "get_core_path()" assumes the core file is
>> written to the file system. I think it just does not fit anymore, better
>> would be to replace it with something like
>> "os::print_core_file_location(outputStream* os)", and the OS handles
>> both core path retrieval and the printing. Because then the shared code
>> does not need to know whether core file gets printed traditionally or
>> piped to a executable or whatever.
> This sounds like a refactoring that I suggested would be too disruptive.
I do not think that this would be such a big a change, but it also could be
done with another patch.
Apart from my reservations I stated above the code looks fine and is
definitly an improvement (just last week I was helplessly looking for a
core on a machine where core_pattern turned out to be a redirection to
Kind Regards, Thomas
More information about the hotspot-dev