On Thu, 19 Sep 2024 01:33:53 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Hi all,
>> 
>> Currently, the Unified Logging framework defaults to three decorators 
>> (uptime, level, tags) whenever the user does not specify otherwise through 
>> `-Xlog`. This can result in cumbersome input whenever a specific user that 
>> relies on a particular tag(s) has some predefined needs. For example, C2 
>> developers rarely need decorations, and having to manually specify this 
>> every time results inconvenient.
>> 
>> To address this, this PR enables the possibility of adding tag-specific 
>> default decorators to UL. These defaults are in no way overriding user input 
>> -- they will only act whenever `-Xlog` has no decorators supplied and there 
>> is a positive match with the pre-specified defaults. Such a match is based 
>> on the following:
>> 
>> - Inclusion: if `-Xlog:jit+compilation` is provided, a default for `jit` may 
>> be applied.
>> - Specificity: if, for the above line, there is a more specific default for 
>> `jit+compilation` the latter shall be applied. Upon equal specificity cases, 
>> both defaults will be applied.
>> - Additionally, defaults may target a specific log level.
>> 
>> Decorators are also associated with an output file, so an output device may 
>> only have one set of decorators. For this reason, if different 
>> `LogSelection`s trigger defaults, none is to be applied.
>> 
>> In summary, these defaults may be seen as a "tailored" or "flavoured" 
>> version of the existing "uptime-level-tags" current defaults.
>> 
>> Please consider this PR, and thanks!
>
> This affects all hotspot developers using UL so extending coverage:

@dholmes-ora in addition to the socialising comments that Roberto and Johan 
have already responded, I'll try to clarify the PR a little (I've updated the 
title as well to make it clearer):
- `Xlog:jit+inlining` is the same as `Xlog:inlining+jit`, and will get the same 
treatment
- Wildcards have been chosen to be ignored as you could potentially match too 
many defaults. In the end, these defaults only attempt to offer a "help" to 
developers using the same specific `-Xlog` option and that don't want to 
specify the tagset they are interested on every time
- I am not planning on changing the design idea of "decorators associated with 
output device". This PR enables having defaults for `-Xlog`-selected tagsets, 
but once the output device is configured we will end up with the same 
decorators throughout it (does not matter if it is stdout or a real file)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20988#issuecomment-2370395774

Reply via email to