RFR: 8326106: Write and clear stack trace table outside of safepoint [v2]
Markus Grönlund
mgronlun at openjdk.org
Mon Feb 19 10:02:19 UTC 2024
> Greetings,
>
> When the chunk rotates, serializing the stack trace table happens in two passes:
>
> 1. The pre-safepoint writes as much as possible but does not delete nodes.
> 2. The safepoint writes new entries incrementally in addition to deleting nodes and resetting buckets.
>
> Since a global lock protects the stack trace table, hoisting the deletes and clearing the table outside safepoints makes sense. Doing so will minimize the stack trace table work needed during the safepoint. The tradeoff is that an identical stack trace can be written twice. However, this is low risk because the pre-safepoint and the safepoint operations happen back to back (i.e. there is only a tiny window for inserting a new stack trace).
>
> Testing: jdk_jfr, stress testing
>
> Thanks
> Markus
Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
restore updating _last_entries
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17905/files
- new: https://git.openjdk.org/jdk/pull/17905/files/cfd1f5fb..b6be1351
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17905&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17905&range=00-01
Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/17905.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17905/head:pull/17905
PR: https://git.openjdk.org/jdk/pull/17905
More information about the hotspot-jfr-dev
mailing list