RFR: 8353727: HeapDumpPath doesn't expand %p [v2]

Kevin Walls kevinw at openjdk.org
Wed Apr 9 09:34:02 UTC 2025


On Wed, 9 Apr 2025 00:00:28 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - length checking update
>>  - Chris feedback
>
> test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java line 100:
> 
>> 98:         output.shouldContain("Dumping heap to " + type + ".hprof");
>> 99:         File dump = new File(heapdumpFilename);
>> 100:         Asserts.assertTrue(dump.exists() && dump.isFile(), "Could not find dump file " + dump.getAbsolutePath());
> 
> I. think you could just update the test to use
> heapdumpFilename = type + ".%p.hprof";
> we don't need test twice, it is quite expensive.

sure, it's a few seconds but we can save that time 8-)

> test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java line 115:
> 
>> 113:         output.stdoutShouldNotBeEmpty();
>> 114:         String actualHeapdumpFilename = type + "." + output.pid() + ".hprof";
>> 115:         output.shouldContain("Dumping heap to " + actualHeapdumpFilename);
> 
> This better to be something like expectedlHeapdumpFilename and 
> "Expected heap dump file".
> 
> Not very important, but make log cleaner.

sure, done!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24482#discussion_r2034931003
PR Review Comment: https://git.openjdk.org/jdk/pull/24482#discussion_r2034931425


More information about the hotspot-runtime-dev mailing list