-
Enhancement
-
Resolution: Fixed
-
P3
-
8-pool-perf, 17-pool-oracle, 21-pool-oracle
-
b11
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8330777 | 22.0.2 | Sean Coffey | P3 | Resolved | Fixed | b04 |
JDK-8333336 | 21.0.5 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8329192 | 21.0.4-oracle | Ludvig Janiuk | P3 | Resolved | Fixed | b01 |
JDK-8333635 | 17.0.13 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8329242 | 17.0.12-oracle | Ludvig Janiuk | P3 | Resolved | Fixed | b02 |
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).
For example:
diff --git a/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp b/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
index a9f0cecb53c..8b019cbc8a2 100644
--- a/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
+++ b/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
@@ -573,9 +573,7 @@ void JfrRecorderService::pre_safepoint_write() {
ObjectSampleCheckpoint::on_rotation(ObjectSampler::acquire());
}
write_storage(_storage, _chunkwriter);
- if (_stack_trace_repository.is_modified()) {
- write_stacktrace(_stack_trace_repository, _chunkwriter, false);
- }
+ write_stacktrace(_stack_trace_repository, _chunkwriter, true); // true == clear the table
}
void JfrRecorderService::invoke_safepoint_write() {
- backported by
-
JDK-8329192 Write and clear stack trace table outside of safepoint
- Resolved
-
JDK-8329242 Write and clear stack trace table outside of safepoint
- Resolved
-
JDK-8330777 Write and clear stack trace table outside of safepoint
- Resolved
-
JDK-8333336 Write and clear stack trace table outside of safepoint
- Resolved
-
JDK-8333635 Write and clear stack trace table outside of safepoint
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/d6087781
-
Commit openjdk/jdk21u-dev/b56f0c0b
-
Commit openjdk/jdk22u/5f333b57
-
Commit openjdk/jdk/a776104e
-
Review openjdk/jdk17u-dev/2514
-
Review openjdk/jdk21u-dev/615
-
Review openjdk/jdk22u/155
-
Review openjdk/jdk/17905