JDK-8293069 : Make -XX:+Verbose less verbose
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20,21,22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-08-30
  • Updated: 2024-04-08
  • Resolved: 2023-06-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21 JDK 22
21.0.4-oracleFixed 22 b03Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
-XX:+Verbose is often used to enable additional output for other print flags (for example, when printing C2 types) and should not enable new/unrelated printing. Currently, just running with -XX:+Verbose (and/or -XX:-TieredCompilation and/or -Xcomp) prints many messages and makes the log hard to read.

JDK-8286104 added noisy debug printing:

[unstable_if] kill local#11:  330  CastII  === 320 191  [[ 340 346 333 397 366 379 ]]   Type:int:>=0:www !jvms: java.lang.String::checkIndex @ bci:5 (line 4578) java.lang.StringLatin1::charAt @ bci:3 (line 46) java.lang.String::charAt @ bci:12 (line 1535) jdk.internal.module.ModuleInfo$ConstantPool::checkUnqualifiedName @ bci:56 (line 869)

[unstable_if] kill local#9:   38  CastPP  === 30 13  [[ 398 129 113 366 340 325 253 253 113 65 65 178 165 152 ]]   Oop:java/lang/String:NotNull:exact * !jvms: jdk.internal.module.ModuleInfo$ConstantPool::checkUnqualifiedName @ bci:1 (line 863)

[unstable_if] kill local#10:  119  RShiftI  === _ 83 114  [[ 398 129 129 121 253 178 366 340 404 152 152 165 165 178 325 ]]   Type:int !jvms: java.lang.String::length @ bci:9 (line 1499) jdk.internal.module.ModuleInfo$ConstantPool::checkUnqualifiedName @ bci:1 (line 863)

I think we should guard it by an additional flag like -XX:+PrintOpto

We should also guard this code by PrintOpto:
https://github.com/openjdk/jdk/blob/4a28f3798d25b64d44aad557f94d1045c253cdfb/src/hotspot/share/opto/doCall.cpp#L857

And remove this code:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/ci/ciEnv.cpp#L1342

We should check if the same problem exists with -XX:+WizardMode.

Of course, all of this should at some point be replaced by unified logging.
Comments
Fix request [21u] I backport this for parity with 21.0.4-oracle. Low risk, touches debug printouts. Clean backport. SAP nightly testing passed.
06-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u-dev/pull/452 Date: 2024-04-05 07:11:28 +0000
05-04-2024

Changeset: 238c51e6 Author: Eric Nothum <eric.nothum@oracle.com> Committer: Roberto CastaƱeda Lozano <rcastanedalo@openjdk.org> Date: 2023-06-16 09:57:57 +0000 URL: https://git.openjdk.org/jdk/commit/238c51e621d17a24d35085a54c129ce99ad6d0d8
16-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14420 Date: 2023-06-12 15:17:35 +0000
13-06-2023