提交 4cef28b1 编写于 作者: E ehelin

8049426: Minor cleanups after G1 class unloading

Reviewed-by: stefank, brutisso
上级 7191e3f7
...@@ -169,7 +169,7 @@ G1CodeRootSet::~G1CodeRootSet() { ...@@ -169,7 +169,7 @@ G1CodeRootSet::~G1CodeRootSet() {
void G1CodeRootSet::add(nmethod* method) { void G1CodeRootSet::add(nmethod* method) {
if (!contains(method)) { if (!contains(method)) {
// Find the first chunk thatisn't full. // Find the first chunk that isn't full.
G1CodeRootChunk* cur = _list.head(); G1CodeRootChunk* cur = _list.head();
while (cur != NULL) { while (cur != NULL) {
if (!cur->is_full()) { if (!cur->is_full()) {
......
...@@ -5330,7 +5330,7 @@ public: ...@@ -5330,7 +5330,7 @@ public:
// Do first pass of code cache cleaning. // Do first pass of code cache cleaning.
_code_cache_task.work_first_pass(worker_id); _code_cache_task.work_first_pass(worker_id);
// Let the threads, mark that the first pass is done. // Let the threads mark that the first pass is done.
_code_cache_task.barrier_mark(worker_id); _code_cache_task.barrier_mark(worker_id);
// Clean the Strings and Symbols. // Clean the Strings and Symbols.
......
...@@ -1969,8 +1969,7 @@ bool InstanceKlass::is_dependent_nmethod(nmethod* nm) { ...@@ -1969,8 +1969,7 @@ bool InstanceKlass::is_dependent_nmethod(nmethod* nm) {
if (nm == b->get_nmethod()) { if (nm == b->get_nmethod()) {
#ifdef ASSERT #ifdef ASSERT
int count = b->count(); int count = b->count();
assert(count >= 0, "Just check if we ever get here 1"); assert(count >= 0, err_msg("count shouldn't be negative: %d", count));
assert(count > 0, "Just check if we ever get here 2");
#endif #endif
return true; return true;
} }
......
...@@ -328,6 +328,8 @@ protected: ...@@ -328,6 +328,8 @@ protected:
static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); } static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }
// WhiteBox API helper. // WhiteBox API helper.
// Can't distinguish between array of length 0 and length 1,
// will always return 0 in those cases.
static int bytes_to_length(size_t bytes) { static int bytes_to_length(size_t bytes) {
assert(is_size_aligned(bytes, BytesPerWord), "Must be, for now"); assert(is_size_aligned(bytes, BytesPerWord), "Must be, for now");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册