diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c index 1bccad2bcdf..cd72db93db8 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c @@ -602,10 +602,11 @@ static uintptr_t calc_prelinked_load_address(struct ps_prochandle* ph, int lib_f return load_addr; } -// Override vDSO path to kernel directory (/lib/modules//vdso) if possible. -// Then lib_name would be overwritten that path. -// Otherwise copy vDSO memory in coredump to temporal memory generated by memfd_create(). -// Returns FD for vDSO (should be closed by caller). +// Check for vDSO binary in kernel directory (/lib/modules//vdso), +// rewrite the given lib_name string if found. +// Otherwise copy vDSO memory in coredump to temporal memory generated by +// memfd_create(). +// Returns FD for vDSO (should be closed by caller), or -1 on error. static int handle_vdso(struct ps_prochandle* ph, char* lib_name, size_t lib_name_len) { int lib_fd; struct utsname uts;