RFR: 8274986: max code printed in hs-err logs should be configurable [v2]
Doug Simon
dnsimon at openjdk.java.net
Mon Oct 11 19:32:15 UTC 2021
On Mon, 11 Oct 2021 17:28:10 GMT, Tom Rodriguez <never at openjdk.org> wrote:
>> I don't think so. As far as I can see, the intent is to have a single line of output for an nmethod followed by an optional " for ..." suffix when `verbose == true`.
>> The `nm->print_nmethod(verbose)` call then prints extra multi-line detail for the nmethod with the number of lines printed governed by `verbose`.
>> This code seems like it went from being hard coded to always go to `tty` and was then parameterized to go to an arbitrary stream but the evolution accidentally overlooked some code that still goes to `tty`.
>> I don't want to make extensive changes here as there really should be a single effort to rationalize all dumping to ensure it's parameterized.
>
> I agree you might not want to bite this off in this PR, but this piece of code is reason you commonly see random nmethods appearing on the tty just before a crash. verbose is only ever true when called from findpc in debug.cpp. All the other non-verbose work print_nmethod does is useless, like writing to the xtty, and otherwise boils down to nm->print_on(tty). But all these printing paths could use a rework so I'm fine if you skip it.
As you convinced me in a side conversation, your suggestion has the advantage that we now at least get this output in a hs_err file instead of loosing it altogether.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5875
More information about the hotspot-dev
mailing list