RFR(S): 8176298: Log tags in -Xlog:help not sorted

Thomas Stüfe thomas.stuefe at gmail.com
Thu Feb 15 17:20:52 UTC 2018


Hi Marcus,

I am confused, are the logtags in logTag.hpp not sorted already? So, the
name array should be already sorted?

Beside that, some small nits:

- In LogConfiguration::print_command_line_help(), could we not use the
stream for the whole function? Or, better yet, make the function take an
outputStream* instead of a FILE*? That would fit nicely with
LogConfiguration::describe_available().

- LogTag::list_tags(): I am a tiny bit concerned about using up stack space
here, especially if this is used during error reporting. The array is - if
I am not mistaken - sizeof(enum) * ~120, so 400-500 bytes. Maybe use malloc
instead?

Otherwise, this looks fine.

Best Regards, Thomas

On Thu, Feb 15, 2018 at 9:12 AM, Marcus Larsson <marcus.larsson at oracle.com>
wrote:

> Hi,
>
> Please review the following patch to keep log tags sorted when listed.
>
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8176298
>
> Webrev:
> http://cr.openjdk.java.net/~mlarsson/8176298/webrev.00
>
> Verified with new unit test.
>
> Thanks,
> Marcus
>


More information about the hotspot-runtime-dev mailing list