RFR: 8146800: Reorganize logging alias code.

Marcus Larsson marcus.larsson at oracle.com
Tue Jan 12 09:43:06 UTC 2016


Hi Max,

On 01/11/2016 06:02 PM, Max Ockner wrote:
> Hello all,
> Please review my fix which reorganizes the alias table for Unified 
> Logging.
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8146800
> webrev: http://cr.openjdk.java.net/~mockner/aliastable.03/
>

I just realized that instead of using additional macros you could call 
configure_stdout with a terminating __NO_TAG. For example:

LogConfiguration::configure_stdout(alf.level, alf.exactMatch, alf.tag, 
LogTag::__NO_TAG)

This works because configure_stdout looks at up to 5 (MaxTags) tags, but 
stops looking as soon as it finds a __NO_TAG.

Thanks,
Marcus

> Summary:
> How logging aliases used to handled - At the beginning of 
> parse_each_vm_init_arg() in arguments.cpp, each "-XX" argument would 
> be looked up in the logging alias table to see if there was a match. 
> If a match was found, then the entire argument would be replaced by a 
> corresponding unified logging argument. This argument would then 
> cascade through the giant case structure until it was caught and 
> handled close to the bottom of parse_each_vm_init_arg (which happens 
> hundreds of lines later).
>
> There is a section of code that handles aliases and deprecation for 
> -XX options already. After this fix, logging aliases will be handled 
> here instead of substituting entire logging expressions at the 
> beginning of parse_each_vm_init_arg.
>
> Tested with jtreg runtime tests. This includes several logging tests 
> for recently aliased flags.
>
> Thanks,
> Max
>



More information about the hotspot-runtime-dev mailing list