[jdk17] RFR: 8267952: async logging supports to dynamically change tags and decorators
Xin Liu
xliu at openjdk.java.net
Wed Jun 23 20:25:37 UTC 2021
This patch fixed intermittent crashes of gtest/AsyncLogGtest.java. The root cause
is that previous flush() can't guarantee flush all pending messages in AsyncLog
buffer. This patch implements flush() using a synchronizaton token and waits for
completion. This approach isn't MT-safe but it can serialize all flush() calls in
a thread.
Two concurrent tests are appended to cover the hazard cases.
This patch also comments LogConfiguration::configure_output() MT-safety.
-------------
Commit messages:
- 8267952: async logging supports to dynamically change tags and decorators
Changes: https://git.openjdk.java.net/jdk17/pull/130/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=130&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8267952
Stats: 195 lines in 9 files changed: 159 ins; 14 del; 22 mod
Patch: https://git.openjdk.java.net/jdk17/pull/130.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/130/head:pull/130
PR: https://git.openjdk.java.net/jdk17/pull/130
More information about the hotspot-runtime-dev
mailing list