RFR: 8361255: CTW: Tolerate more NCDFE problems [v3]
Vladimir Kozlov
kvn at openjdk.org
Thu Jul 3 22:53:40 UTC 2025
On Thu, 3 Jul 2025 13:33:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> We routinely CTW 3rd party JARs to make sure our compilers work. By the nature of the JARs, they have dependencies on other JARs, and CTW runner frequently warns out with NCDFE. It does so very crudely, missing opportunities to compile the methods that _do not_ trigger NCDFEs. CTW should be made more tolerant to this. I think the normal "modules" CTW runs into the similar problem, but on a lesser scale, as we do not have a very hairy dependency graph within JDK.
>>
>> The CTW logs are also fairly noisy with full exception traces when NCDFE is semi-expected. This PR does _not_ print exception stack traces in these cases, only "NOTE"-s about it. This makes the log fairly clean and more understandable.
>>
>> Motivational scope improvement compiling a sample 3rd party JAR (cassandra-2.1.4.0.jar):
>>
>>
>> Before: Done (2487 classes, 9866 methods, 24584 ms)
>> After: Done (2487 classes, 10074 methods, 24150 ms) ; +2% more methods
>>
>>
>> Additional testing:
>> - [x] Linux x86_64 server fastdebug, `applications/ctw/modules`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Just use printf directly
test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java line 89:
> 87: UNSAFE.ensureClassInitialized(aClass);
> 88: } catch (NoClassDefFoundError e) {
> 89: CompileTheWorld.OUT.printf("[%d]\t%s\tNOTE unable to init class : %s%n",
Do you mean `\n` here and in all other outputs? `%n` needs local variable to store size of output.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26090#discussion_r2183886728
More information about the hotspot-compiler-dev
mailing list