-
Sub-task
-
Resolution: Unresolved
-
P4
-
24
Many compiler logging flags are ad-hoc and present a few issues due to their nature. One of them is overlapping of information, where two flags are used to print similar information. This non-disjoint flags present a series of issues when attempting to migrate them to the UnifiedLogging framework.
Consider the case:
if (PrintOpto || PrintInlining) {
tty->print("ilk");
}
Migrating that to UnifiedLogging would mean considering the case where each of them is active and also both:
if (ul_enabled(PrintOpto) || ul_enabled(PrintInlining) || ul_enabled(PrintOpto, PrintInlining)) {
...
}
This adds unnecessary verbosity to the code. Additionally, when emitting logging we may need to tag logs accordingly, i.e.
* PrintOpto is the only one enabled, so we want to log(PrintOpto)("ilk")
* PrintInlining is the only one enabled, so log(PrintInlining)("ilk")
* Both are enabled, and therefore log(PrintOpto, PrintInlining)("ilk")
Additionally, if -Xlog:PrintOpto,PrintInlining has been specified, the message has to be "solomonically" tagged with either of those tags, as tagging it with both will not log it as per JDK-8343384
Consider the case:
if (PrintOpto || PrintInlining) {
tty->print("ilk");
}
Migrating that to UnifiedLogging would mean considering the case where each of them is active and also both:
if (ul_enabled(PrintOpto) || ul_enabled(PrintInlining) || ul_enabled(PrintOpto, PrintInlining)) {
...
}
This adds unnecessary verbosity to the code. Additionally, when emitting logging we may need to tag logs accordingly, i.e.
* PrintOpto is the only one enabled, so we want to log(PrintOpto)("ilk")
* PrintInlining is the only one enabled, so log(PrintInlining)("ilk")
* Both are enabled, and therefore log(PrintOpto, PrintInlining)("ilk")
Additionally, if -Xlog:PrintOpto,PrintInlining has been specified, the message has to be "solomonically" tagged with either of those tags, as tagging it with both will not log it as per JDK-8343384