RFR: 8204551: Event descriptions are truncated in logs

Thomas Stüfe thomas.stuefe at gmail.com
Fri Feb 15 08:33:12 UTC 2019


On Fri, Feb 15, 2019 at 1:39 AM Yasumasa Suenaga <yasuenag at gmail.com> wrote:

> Hi Thomas,
>
> 2019年2月15日(金) 2:22 Thomas Stüfe <thomas.stuefe at gmail.com>:
> >
> > Hi Yasumasa,
> >
> > looks fine but could you please remove the new "this->" prefixes? They
> clutter up the code and make the change unnecessary large.
>
> I tried to remove `this->` from my change, but errors occurred as below;
>
> ```
> In file included from
>
> /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/shared/collectedHeap.hpp:36,
>                  from
>
> /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/precompiled/precompiled.hpp:37:
> /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/utilities/events.hpp: In
> member function 'void TemplatedStringEventLog<bufsz>::logv(Thread*,
> const char*, __va_list_tag*)':
> /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/utilities/events.hpp:156:10:
> error: there are no arguments to 'should_log' that depend on a
> template parameter, so a declaration of 'should_log' must be available
> [-fpermissive]
>      if (!should_log()) return;
>           ^~~~~~~~~~
> ```
>
> So I want to keep `this->`.
>
>
>
Oh, I see. That is why I dislike templates sometimes...

Your patch is fine otherwise.

Maybe we can have a more fluid solution at some point (like your first
proposal without the added costs) but this is an improvement.

Cheers, Thomas


> Thanks,
>
> Yasumasa
>
>
> > Thank you,
> >
> > Thomas
> >
> >
> > On Thu, Feb 14, 2019 at 5:19 AM Yasumasa Suenaga <yasuenag at gmail.com>
> wrote:
> >>
> >> Hi,
> >>
> >> I posted the issue that some log messages in hs_err and VM.info are
> truncated.
> >>
> >>
> https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2018-June/028410.html
> >>
> >> I've had some discussion about it on JBS, and I uploaded webrev for it.
> >> I use THIS_FILE macro for internal exceptions, and I expanded to 512
> bytes
> >> for capacity of internal exception.
> >> It has passed submit repo tests. Could you review it?
> >>
> >>   JBS: https://bugs.openjdk.java.net/browse/JDK-8204551
> >>   webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8204551/webrev.02/
> >>
> >>
> >> Thanks,
> >>
> >> Yasumasa
>


More information about the hotspot-runtime-dev mailing list