mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8361451: Test vmTestbase/metaspace/stressHierarchy/stressHierarchy012/TestDescription.java fails with OutOfMemoryError: Metaspace
Reviewed-by: dholmes, lmesnik, iklam, syan
This commit is contained in:
parent
65b3239418
commit
92e380c59c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 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
|
||||
@ -136,8 +136,17 @@ public class PerformChecksHelper {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (InvocationTargetException ite) {
|
||||
Throwable cause = ite.getCause();
|
||||
if (cause != null && (cause instanceof OutOfMemoryError) && cause.getMessage().contains("Metaspace")) {
|
||||
// avoid string concatenation, which may create more classes.
|
||||
System.out.println("Got OOME in metaspace in PerformChecksHelper.callMethods(Class clazz). ");
|
||||
System.out.println("This is possible with -triggerUnloadingByFillingMetaspace");
|
||||
} else {
|
||||
throw ite;
|
||||
}
|
||||
} catch (OutOfMemoryError e) {
|
||||
if (e.getMessage().trim().toLowerCase().contains("metaspace")) {
|
||||
if (e.getMessage().contains("Metaspace")) {
|
||||
// avoid string concatenation, which may create more classes.
|
||||
System.out.println("Got OOME in metaspace in PerformChecksHelper.callMethods(Class clazz). ");
|
||||
System.out.println("This is possible with -triggerUnloadingByFillingMetaspace");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user