RFR: 8295851: Do not use ttyLock in BytecodeTracer::trace

Coleen Phillimore coleenp at openjdk.org
Fri Jun 20 11:55:09 UTC 2025


This didn't need ttyLock for synchronization, the code only needs to see if the method changes so it can print the method name before the bytecodes, like:

[490166] static void java.lang.String.<clinit>()
[490166]       13    18  putstatic 613 <java/lang/String.CASE_INSENSITIVE_ORDER:Ljava/util/Comparator;>
[490166]       14    21  return

[490166] static void java.lang.System.<clinit>()
[490166]       15     0  invokestatic 471 <java/lang/System.registerNatives()V>
[490166]       16     3  aconst_null
[490166]       17     4  putstatic 474 <java/lang/System.in:Ljava/io/InputStream;>

Verified manually and added some parallelism to the test, and fixed trace() to initialize is_linked(), which it always is.
Also ran tier1-4.

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

Commit messages:
 - 8295851: Do not use ttyLock in BytecodeTracer::trace

Changes: https://git.openjdk.org/jdk/pull/25915/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25915&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8295851
  Stats: 67 lines in 2 files changed: 36 ins; 13 del; 18 mod
  Patch: https://git.openjdk.org/jdk/pull/25915.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25915/head:pull/25915

PR: https://git.openjdk.org/jdk/pull/25915


More information about the hotspot-runtime-dev mailing list