8240324: Improve is_boot_class_loader_data() by adding simple check

Check if cld is the null_cld before looking at the class loader oop

Reviewed-by: coleenp
This commit is contained in:
Harold Seigel 2020-03-03 15:50:20 +00:00
parent 52cfd292cc
commit cf89ff7a4b

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, 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
@ -39,8 +39,8 @@ inline oop ClassLoaderData::class_loader() const {
}
inline bool ClassLoaderData::is_boot_class_loader_data() const {
return class_loader() == NULL;
}
return this == _the_null_class_loader_data || class_loader() == NULL;
}
inline ClassLoaderData* ClassLoaderData::class_loader_data_or_null(oop loader) {
if (loader == NULL) {