RFR: Restore event descriptions immortality [v2]
Aleksey Shipilev
shade at openjdk.org
Wed Apr 12 14:59:19 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
Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:
- Drop GLOBAL from non-generational mode
- Restore GLOBAL
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/253/files
- new: https://git.openjdk.org/shenandoah/pull/253/files/a550586e..1d51c84b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=253&range=01
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=253&range=00-01
Stats: 29 lines in 3 files changed: 4 ins; 0 del; 25 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