On Wed, 21 Oct 2026 10:59:52 GMT, Yunbo Zhang <[email protected]> wrote:

>> Please review this small fix.
>> 
>> Configuring the same log file as `vm.log`, `$PWD/vm.log`, and `./vm.log` 
>> creates separate outputs, splitting the messages across multiple files.
>> 
>> **Fix:**
>> 
>> Let each output match its own name through `matches_name()`. For file 
>> outputs, also check `os::same_files()` so different paths to the same file 
>> reuse the existing output.
>> 
>> **Testing:**
>> 
>> - Added `TestEquivalentLogFilePaths.java`.
>> - `gtest:LogConfiguration/server`: 21 passed, 0 failed.
>> - `test/hotspot/jtreg/serviceability/logging`: 7 passed, 0 failed.
>> - `test/hotspot/jtreg/runtime/logging`: 33 passed, 0 failed.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Yunbo Zhang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8392135: Unified logging creates extra log files
>   
>   Synchronize file identity comparisons with rotation using the existing 
> semaphore, and add a concurrent alias-matching regression test.

The fix looks good. I've posted one nit request though.

test/hotspot/jtreg/serviceability/logging/TestEquivalentLogFilePaths.java line 
60:

> 58:                 "-Xlog:gc=info:" + name,
> 59:                 "-Xlog:class+load=info:" + quote + log.toAbsolutePath() + 
> quote,
> 60:                 "-Xlog:safepoint=info:./" + name,

Nit: There is no check for this log configuration messages below.

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

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/33090#pullrequestreview-5619823297
PR Review Comment: https://git.openjdk.org/jdk/pull/33090#discussion_r4352689034

Reply via email to