RFR: Restore event descriptions immortality
Aleksey Shipilev
shade at openjdk.org
Wed Apr 12 10:36:26 UTC 2023
Upstream code has event descriptions as immortal strings for a reason: they are passed inside the logging classes, and so the references to them may outlive the scope of the current method. We have seen logs corruption because of that before, e.g. in hs_err-s `Events` section. This PR restores the immortality of event descriptions, producing const strings with macros.
This also stops emitting "(GLOBAL)" for global collections, which I think is what non-generational Shenandoah mode prints. Please tell me if we still need to print "(GLOBAL)" in generational mode.
Tangentially, this also improves performance for compilers that choose to initialize the automatic storage for `char msg[1024]`, see https://isocpp.org/files/papers/P2723R0.html.
Additional testing:
- [x] Eyeballing the GC logs
-------------
Commit messages:
- Touchups
- Restore event names immortality
Changes: https://git.openjdk.org/shenandoah/pull/253/files
Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=253&range=00
Stats: 57 lines in 5 files changed: 33 ins; 5 del; 19 mod
Patch: https://git.openjdk.org/shenandoah/pull/253.diff
Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/253/head:pull/253
PR: https://git.openjdk.org/shenandoah/pull/253
More information about the shenandoah-dev
mailing list