--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp Wed Oct 30 16:14:56 2019 +0100
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp Wed Oct 30 19:43:52 2019 +0100
@@ -73,7 +73,7 @@
}
static bool current_epoch() {
- return _class_unload;
+ return _class_unload || _flushpoint;
}
static bool previous_epoch() {
@@ -246,7 +246,7 @@
static void do_klass(Klass* klass) {
assert(klass != NULL, "invariant");
assert(_subsystem_callback != NULL, "invariant");
- if (current_epoch()) {
+ if (_flushpoint) {
if (USED_THIS_EPOCH(klass)) {
_subsystem_callback->do_artifact(klass);
return;
@@ -911,10 +911,11 @@
return total_count;
}
-static void setup(JfrCheckpointWriter* writer, JfrCheckpointWriter* leakp_writer, bool class_unload) {
+static void setup(JfrCheckpointWriter* writer, JfrCheckpointWriter* leakp_writer, bool class_unload, bool flushpoint) {
_writer = writer;
_leakp_writer = leakp_writer;
_class_unload = class_unload;
+ _flushpoint = flushpoint;
if (_artifacts == NULL) {
_artifacts = new JfrArtifactSet(class_unload);
} else {
@@ -928,10 +929,10 @@
/**
* Write all "tagged" (in-use) constant artifacts and their dependencies.
*/
-size_t JfrTypeSet::serialize(JfrCheckpointWriter* writer, JfrCheckpointWriter* leakp_writer, bool class_unload) {
+size_t JfrTypeSet::serialize(JfrCheckpointWriter* writer, JfrCheckpointWriter* leakp_writer, bool class_unload, bool flushpoint) {
assert(writer != NULL, "invariant");
ResourceMark rm;
- setup(writer, leakp_writer, class_unload);
+ setup(writer, leakp_writer, class_unload, flushpoint);
// write order is important because an individual write step
// might tag an artifact to be written in a subsequent step
if (!write_klasses()) {