Integrated: 8326106: Write and clear stack trace table outside of safepoint
Markus Grönlund
mgronlun at openjdk.org
Mon Feb 19 13:21:57 UTC 2024
On Sun, 18 Feb 2024 19:42:38 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
> 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
This pull request has now been integrated.
Changeset: a776104e
Author: Markus Grönlund <mgronlun at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a776104e210db212c4e32894844d3c0cbaac53c3
Stats: 17 lines in 3 files changed: 4 ins; 7 del; 6 mod
8326106: Write and clear stack trace table outside of safepoint
Reviewed-by: egahlin
-------------
PR: https://git.openjdk.org/jdk/pull/17905
More information about the hotspot-jfr-dev
mailing list