RFR: 8278125: Some preallocated OOMEs are missing stack trace [v3]

Coleen Phillimore coleenp at openjdk.java.net
Mon Dec 20 23:19:52 UTC 2021


On Mon, 20 Dec 2021 23:11:09 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Sorry Coleen I do not understand what you mean by this. How do you compare the "interned" oop String with the incoming `char*` text?
>
> OopHandle Universe::_metaspace_string;
> ...
> msg = String::intern("Metaspace", CHECK);
> java_lang_Throwable::set_message(oom_array->obj_at(_oom_metaspace, msg());
> Universe::_metaspace_string = OopHandle(vm_global(), msg);
> ...
> bool Universe::is_metaspace_oome(oop exc) {
>   return java_lang_Throwable::get_message(exc) == _metaspace_string.resolve();
> }

Maybe not.  Maybe the exception you're checking could be newly allocated and not use an interned string.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6672


More information about the hotspot-runtime-dev mailing list