8212949: Remove ConstantPoolCache::is_constantPoolCache
Remove relic of permgen, also is_constMethod too. Reviewed-by: dholmes
This commit is contained in:
parent
9badb07565
commit
671017bab8
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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 {
|
void ConstMethod::print_on(outputStream* st) const {
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
assert(is_constMethod(), "must be constMethod");
|
|
||||||
st->print_cr("%s", internal_name());
|
st->print_cr("%s", internal_name());
|
||||||
Method* m = method();
|
Method* m = method();
|
||||||
st->print(" - method: " INTPTR_FORMAT " ", p2i((address)m));
|
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
|
// Short version of printing ConstMethod* - just print the name of the
|
||||||
// method it belongs to.
|
// method it belongs to.
|
||||||
void ConstMethod::print_value_on(outputStream* st) const {
|
void ConstMethod::print_value_on(outputStream* st) const {
|
||||||
assert(is_constMethod(), "must be constMethod");
|
|
||||||
st->print(" const part of method " );
|
st->print(" const part of method " );
|
||||||
Method* m = method();
|
Method* m = method();
|
||||||
if (m != NULL) {
|
if (m != NULL) {
|
||||||
@ -487,8 +485,6 @@ void ConstMethod::collect_statistics(KlassSizeStats *sz) const {
|
|||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
void ConstMethod::verify_on(outputStream* st) {
|
void ConstMethod::verify_on(outputStream* st) {
|
||||||
guarantee(is_constMethod(), "object must be constMethod");
|
|
||||||
|
|
||||||
// Verification can occur during oop construction before the method or
|
// Verification can occur during oop construction before the method or
|
||||||
// other fields have been initialized.
|
// other fields have been initialized.
|
||||||
guarantee(method() != NULL && method()->is_method(), "should be method");
|
guarantee(method() != NULL && method()->is_method(), "should be method");
|
||||||
|
@ -241,8 +241,6 @@ public:
|
|||||||
MethodType mt,
|
MethodType mt,
|
||||||
TRAPS);
|
TRAPS);
|
||||||
|
|
||||||
bool is_constMethod() const { return true; }
|
|
||||||
|
|
||||||
// Inlined tables
|
// Inlined tables
|
||||||
void set_inlined_tables_length(InlineTableSizes* sizes);
|
void set_inlined_tables_length(InlineTableSizes* sizes);
|
||||||
|
|
||||||
|
@ -2523,11 +2523,6 @@ void ConstantPool::verify_on(outputStream* st) {
|
|||||||
guarantee(entry.get_symbol()->refcount() != 0, "should have nonzero reference count");
|
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) {
|
if (pool_holder() != NULL) {
|
||||||
// Note: pool_holder() can be NULL in temporary constant pools
|
// Note: pool_holder() can be NULL in temporary constant pools
|
||||||
// used during constant pool merging
|
// used during constant pool merging
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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
|
// Printing
|
||||||
|
|
||||||
void ConstantPoolCache::print_on(outputStream* st) const {
|
void ConstantPoolCache::print_on(outputStream* st) const {
|
||||||
assert(is_constantPoolCache(), "obj must be constant pool cache");
|
|
||||||
st->print_cr("%s", internal_name());
|
st->print_cr("%s", internal_name());
|
||||||
// print constant pool cache entries
|
// print constant pool cache entries
|
||||||
for (int i = 0; i < length(); i++) entry_at(i)->print(st, i);
|
for (int i = 0; i < length(); i++) entry_at(i)->print(st, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConstantPoolCache::print_value_on(outputStream* st) const {
|
void ConstantPoolCache::print_value_on(outputStream* st) const {
|
||||||
assert(is_constantPoolCache(), "obj must be constant pool cache");
|
|
||||||
st->print("cache [%d]", length());
|
st->print("cache [%d]", length());
|
||||||
print_address_on(st);
|
print_address_on(st);
|
||||||
st->print(" for ");
|
st->print(" for ");
|
||||||
@ -869,7 +867,6 @@ void ConstantPoolCache::print_value_on(outputStream* st) const {
|
|||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
void ConstantPoolCache::verify_on(outputStream* st) {
|
void ConstantPoolCache::verify_on(outputStream* st) {
|
||||||
guarantee(is_constantPoolCache(), "obj must be constant pool cache");
|
|
||||||
// print constant pool cache entries
|
// print constant pool cache entries
|
||||||
for (int i = 0; i < length(); i++) entry_at(i)->verify(st);
|
for (int i = 0; i < length(); i++) entry_at(i)->verify(st);
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,6 @@ class ConstantPoolCache: public MetaspaceObj {
|
|||||||
const intStack& cp_cache_map,
|
const intStack& cp_cache_map,
|
||||||
const intStack& invokedynamic_cp_cache_map,
|
const intStack& invokedynamic_cp_cache_map,
|
||||||
const intStack& invokedynamic_references_map, TRAPS);
|
const intStack& invokedynamic_references_map, TRAPS);
|
||||||
bool is_constantPoolCache() const { return true; }
|
|
||||||
|
|
||||||
int length() const { return _length; }
|
int length() const { return _length; }
|
||||||
void metaspace_pointers_do(MetaspaceClosure* it);
|
void metaspace_pointers_do(MetaspaceClosure* it);
|
||||||
|
@ -2403,7 +2403,6 @@ void Method::print_touched_methods(outputStream* out) {
|
|||||||
void Method::verify_on(outputStream* st) {
|
void Method::verify_on(outputStream* st) {
|
||||||
guarantee(is_method(), "object must be method");
|
guarantee(is_method(), "object must be method");
|
||||||
guarantee(constants()->is_constantPool(), "should be constant pool");
|
guarantee(constants()->is_constantPool(), "should be constant pool");
|
||||||
guarantee(constMethod()->is_constMethod(), "should be ConstMethod*");
|
|
||||||
MethodData* md = method_data();
|
MethodData* md = method_data();
|
||||||
guarantee(md == NULL ||
|
guarantee(md == NULL ||
|
||||||
md->is_methodData(), "should be method data");
|
md->is_methodData(), "should be method data");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user