Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8337994: [REDO] Native memory leak when not recording any events #1095

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,15 @@ static void write_classloaders() {
CompositeCldCallback callback(&_subsystem_callback, &ccldwwc);
do_class_loaders();
}
if (is_initial_typeset_for_chunk()) {
CldPtr bootloader = get_cld(Universe::boolArrayKlassObj());
assert(bootloader != nullptr, "invariant");
if (IS_NOT_SERIALIZED(bootloader)) {
write__classloader(_writer, bootloader);
assert(IS_SERIALIZED(bootloader), "invariant");
cldw.add(1);
}
}
_artifacts->tally(cldw);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,11 +634,7 @@ static void write_thread_local_buffer(JfrChunkWriter& chunkwriter, Thread* t) {

size_t JfrRecorderService::flush() {
size_t total_elements = flush_metadata(_chunkwriter);
const size_t storage_elements = flush_storage(_storage, _chunkwriter);
if (0 == storage_elements) {
return total_elements;
}
total_elements += storage_elements;
total_elements = flush_storage(_storage, _chunkwriter);
if (_string_pool.is_modified()) {
total_elements += flush_stringpool(_string_pool, _chunkwriter);
}
Expand Down