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:**

When `LogConfiguration::find_output()` compares file outputs, use 
`os::same_files` to check whether their paths refer to the same file.

**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).

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

Commit messages:
 - 8392135: Unified logging creates extra log files

Changes: https://git.openjdk.org/jdk/pull/33090/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33090&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8392135
  Stats: 128 lines in 5 files changed: 124 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/33090.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33090/head:pull/33090

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

Reply via email to