8287113: JFR: Periodic task thread uses period for method sampling events

Reviewed-by: jbachorik
This commit is contained in:
Erik Gahlin 2022-05-23 15:12:21 +00:00
parent 940e94f194
commit 8122466fbb
2 changed files with 5 additions and 1 deletions

View File

@ -85,7 +85,7 @@ public final class MetadataRepository {
// annotations, such as Period and Threshold.
if (pEventType.hasPeriod()) {
pEventType.setEventHook(true);
if (!(Type.EVENT_NAME_PREFIX + "ExecutionSample").equals(type.getName())) {
if (!pEventType.isMethodSampling()) {
requestHooks.add(new RequestHook(pEventType));
}
}

View File

@ -327,4 +327,8 @@ public final class PlatformEventType extends Type {
public void setLargeSize() {
largeSize = true;
}
public boolean isMethodSampling() {
return isMethodSampling;
}
}