On 18 Sep 2024, at 21:11, Ioi Lam wrote: > On Wed, 18 Sep 2024 05:07:33 GMT, David Holmes <dhol...@openjdk.org> wrote: > … >> src/hotspot/share/cds/aotLinkedClassBulkLoader.cpp line 170: >> >>> 168: log_error(cds)("Unable to resolve %s class from CDS archive: >>> %s", category_name, ik->external_name()); >>> 169: log_error(cds)("Expected: " INTPTR_FORMAT ", actual: " >>> INTPTR_FORMAT, p2i(ik), p2i(actual)); >>> 170: log_error(cds)("JVMTI class retransformation is not >>> supported when archive was generated with -XX:+AOTClassLinking."); >> >> Nit: use a `logStream` instead of the three separate calls. > > Why?
If this were running millions of times a second, and it were a debug or trace log message, using a log stream might batch up the gating logic instead of executing it three times, and it might make for a more efficient output, with three lines grouped cleanly. But for a rare error message, those reasons are less important. Maybe the code would be more readable with a log stream? But I find this code readable enough. YMMV