8212949: Remove ConstantPoolCache::is_constantPoolCache

Remove relic of permgen, also is_constMethod too.

Reviewed-by: dholmes
This commit is contained in:
Coleen Phillimore 2019-01-31 07:28:40 -05:00
parent 9badb07565
commit 671017bab8
6 changed files with 2 additions and 18 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -426,7 +426,6 @@ void ConstMethod::metaspace_pointers_do(MetaspaceClosure* it) {
void ConstMethod::print_on(outputStream* st) const {
ResourceMark rm;
assert(is_constMethod(), "must be constMethod");
st->print_cr("%s", internal_name());
Method* m = method();
st->print(" - method: " INTPTR_FORMAT " ", p2i((address)m));
@ -444,7 +443,6 @@ void ConstMethod::print_on(outputStream* st) const {
// Short version of printing ConstMethod* - just print the name of the
// method it belongs to.
void ConstMethod::print_value_on(outputStream* st) const {
assert(is_constMethod(), "must be constMethod");
st->print(" const part of method " );
Method* m = method();
if (m != NULL) {
@ -487,8 +485,6 @@ void ConstMethod::collect_statistics(KlassSizeStats *sz) const {
// Verification
void ConstMethod::verify_on(outputStream* st) {
guarantee(is_constMethod(), "object must be constMethod");
// Verification can occur during oop construction before the method or
// other fields have been initialized.
guarantee(method() != NULL && method()->is_method(), "should be method");

View File

@ -241,8 +241,6 @@ public:
MethodType mt,
TRAPS);
bool is_constMethod() const { return true; }
// Inlined tables
void set_inlined_tables_length(InlineTableSizes* sizes);

View File

@ -2523,11 +2523,6 @@ void ConstantPool::verify_on(outputStream* st) {
guarantee(entry.get_symbol()->refcount() != 0, "should have nonzero reference count");
}
}
if (cache() != NULL) {
// Note: cache() can be NULL before a class is completely setup or
// in temporary constant pools used during constant pool merging
guarantee(cache()->is_constantPoolCache(), "should be constant pool cache");
}
if (pool_holder() != NULL) {
// Note: pool_holder() can be NULL in temporary constant pools
// used during constant pool merging

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2019, 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
@ -851,14 +851,12 @@ void ConstantPoolCache::metaspace_pointers_do(MetaspaceClosure* it) {
// Printing
void ConstantPoolCache::print_on(outputStream* st) const {
assert(is_constantPoolCache(), "obj must be constant pool cache");
st->print_cr("%s", internal_name());
// print constant pool cache entries
for (int i = 0; i < length(); i++) entry_at(i)->print(st, i);
}
void ConstantPoolCache::print_value_on(outputStream* st) const {
assert(is_constantPoolCache(), "obj must be constant pool cache");
st->print("cache [%d]", length());
print_address_on(st);
st->print(" for ");
@ -869,7 +867,6 @@ void ConstantPoolCache::print_value_on(outputStream* st) const {
// Verification
void ConstantPoolCache::verify_on(outputStream* st) {
guarantee(is_constantPoolCache(), "obj must be constant pool cache");
// print constant pool cache entries
for (int i = 0; i < length(); i++) entry_at(i)->verify(st);
}

View File

@ -444,7 +444,6 @@ class ConstantPoolCache: public MetaspaceObj {
const intStack& cp_cache_map,
const intStack& invokedynamic_cp_cache_map,
const intStack& invokedynamic_references_map, TRAPS);
bool is_constantPoolCache() const { return true; }
int length() const { return _length; }
void metaspace_pointers_do(MetaspaceClosure* it);

View File

@ -2403,7 +2403,6 @@ void Method::print_touched_methods(outputStream* out) {
void Method::verify_on(outputStream* st) {
guarantee(is_method(), "object must be method");
guarantee(constants()->is_constantPool(), "should be constant pool");
guarantee(constMethod()->is_constMethod(), "should be ConstMethod*");
MethodData* md = method_data();
guarantee(md == NULL ||
md->is_methodData(), "should be method data");