mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-28 15:51:02 +00:00
8168304: Make all of DependencyContext_test available in product mode
Enable the utility inspection function `DependencyContext::is_dependent_method` and therefore the test in the product mode. Reviewed-by: eosterlund, thartmann
This commit is contained in:
parent
32cba67284
commit
66c8794c81
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2022, 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
|
||||
@ -244,6 +244,7 @@ void DependencyContext::print_dependent_nmethods(bool verbose) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //PRODUCT
|
||||
|
||||
bool DependencyContext::is_dependent_nmethod(nmethod* nm) {
|
||||
for (nmethodBucket* b = dependencies_not_unloading(); b != NULL; b = b->next_not_unloading()) {
|
||||
@ -258,8 +259,6 @@ bool DependencyContext::is_dependent_nmethod(nmethod* nm) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif //PRODUCT
|
||||
|
||||
int nmethodBucket::decrement() {
|
||||
return Atomic::sub(&_count, 1);
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 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
|
||||
@ -129,7 +129,7 @@ class DependencyContext : public StackObj {
|
||||
|
||||
#ifndef PRODUCT
|
||||
void print_dependent_nmethods(bool verbose);
|
||||
bool is_dependent_nmethod(nmethod* nm);
|
||||
#endif //PRODUCT
|
||||
bool is_dependent_nmethod(nmethod* nm);
|
||||
};
|
||||
#endif // SHARE_CODE_DEPENDENCYCONTEXT_HPP
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
@ -77,7 +77,7 @@ static void test_remove_dependent_nmethod(int id) {
|
||||
nmethod* nm = &c._nmethods[id];
|
||||
depContext.remove_dependent_nmethod(nm);
|
||||
|
||||
NOT_PRODUCT(ASSERT_FALSE(depContext.is_dependent_nmethod(nm)));
|
||||
ASSERT_FALSE(depContext.is_dependent_nmethod(nm));
|
||||
}
|
||||
|
||||
TEST_VM(code, dependency_context) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user