8323188: JFR: Needless RESOURCE_ARRAY when sending EventOSInformation

Reviewed-by: mgronlun
This commit is contained in:
Denghui Dong 2024-01-11 07:17:28 +00:00
parent 26de9e247a
commit af942a693b

View File

@ -115,10 +115,10 @@ TRACE_REQUEST_FUNC(JVMInformation) {
TRACE_REQUEST_FUNC(OSInformation) {
ResourceMark rm;
char* os_name = NEW_RESOURCE_ARRAY(char, 2048);
JfrOSInterface::os_version(&os_name);
char* os_version = nullptr;
JfrOSInterface::os_version(&os_version);
EventOSInformation event;
event.set_osVersion(os_name);
event.set_osVersion(os_version);
event.commit();
}