mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-07 17:08:53 +00:00
8159799: Tests using jcmd fails intermittently with Could not open PerfMemory on Windows
Reviewed-by: gtriantafill, dholmes, sla, fparain
This commit is contained in:
parent
d7ea0d733b
commit
37a92b35cd
@ -1404,12 +1404,14 @@ static HANDLE open_sharedmem_object(const char* objectname, DWORD ofm_access, TR
|
||||
objectname); /* name for object */
|
||||
|
||||
if (fmh == NULL) {
|
||||
DWORD lasterror = GetLastError();
|
||||
if (PrintMiscellaneous && Verbose) {
|
||||
warning("OpenFileMapping failed for shared memory object %s:"
|
||||
" lasterror = %d\n", objectname, GetLastError());
|
||||
" lasterror = %d\n", objectname, lasterror);
|
||||
}
|
||||
THROW_MSG_(vmSymbols::java_lang_Exception(),
|
||||
"Could not open PerfMemory", INVALID_HANDLE_VALUE);
|
||||
THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
|
||||
err_msg("Could not open PerfMemory, error %d", lasterror),
|
||||
INVALID_HANDLE_VALUE);
|
||||
}
|
||||
|
||||
return fmh;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user