mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8345493: JFR: JVM.flush hangs intermittently
Reviewed-by: egahlin
This commit is contained in:
parent
a0f7982e44
commit
4257215a9f
@ -650,4 +650,8 @@ public final class PlatformRecorder {
|
||||
public RepositoryChunk getCurrentChunk() {
|
||||
return currentChunk;
|
||||
}
|
||||
|
||||
public synchronized void flush() {
|
||||
MetadataRepository.getInstance().flush();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,8 @@ package jdk.jfr.internal.periodic;
|
||||
|
||||
import jdk.jfr.internal.JVM;
|
||||
import jdk.jfr.internal.MetadataRepository;
|
||||
import jdk.jfr.internal.PlatformRecorder;
|
||||
import jdk.jfr.internal.PrivateAccess;
|
||||
import jdk.jfr.internal.util.Utils;
|
||||
|
||||
/**
|
||||
@ -44,7 +46,8 @@ final class FlushTask extends PeriodicTask {
|
||||
|
||||
@Override
|
||||
public void execute(long timestamp, PeriodicType periodicType) {
|
||||
MetadataRepository.getInstance().flush();
|
||||
PlatformRecorder recorder = PrivateAccess.getInstance().getPlatformRecorder();
|
||||
recorder.flush();
|
||||
Utils.notifyFlush();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user