# HG changeset patch # User coleenp # Date 1548937720 18000 # Node ID f72661ff02943b5fe30a413ba84012a0206f0e68 # Parent 051b5f7510d52cba281ca7ecbea0e4b0132c50d1 8212949: Remove ConstantPoolCache::is_constantPoolCache Summary: remove relic of permgen, also is_constMethod too. Reviewed-by: dholmes diff -r 051b5f7510d5 -r f72661ff0294 src/hotspot/share/oops/constMethod.cpp --- a/src/hotspot/share/oops/constMethod.cpp Thu Jan 31 07:24:28 2019 -0500 +++ b/src/hotspot/share/oops/constMethod.cpp Thu Jan 31 07:28:40 2019 -0500 @@ -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::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 @@ // 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 @@ // 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"); diff -r 051b5f7510d5 -r f72661ff0294 src/hotspot/share/oops/constMethod.hpp --- a/src/hotspot/share/oops/constMethod.hpp Thu Jan 31 07:24:28 2019 -0500 +++ b/src/hotspot/share/oops/constMethod.hpp Thu Jan 31 07:28:40 2019 -0500 @@ -241,8 +241,6 @@ MethodType mt, TRAPS); - bool is_constMethod() const { return true; } - // Inlined tables void set_inlined_tables_length(InlineTableSizes* sizes); diff -r 051b5f7510d5 -r f72661ff0294 src/hotspot/share/oops/constantPool.cpp --- a/src/hotspot/share/oops/constantPool.cpp Thu Jan 31 07:24:28 2019 -0500 +++ b/src/hotspot/share/oops/constantPool.cpp Thu Jan 31 07:28:40 2019 -0500 @@ -2523,11 +2523,6 @@ 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 diff -r 051b5f7510d5 -r f72661ff0294 src/hotspot/share/oops/cpCache.cpp --- a/src/hotspot/share/oops/cpCache.cpp Thu Jan 31 07:24:28 2019 -0500 +++ b/src/hotspot/share/oops/cpCache.cpp Thu Jan 31 07:28:40 2019 -0500 @@ -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 @@ // 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 @@ // 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); } diff -r 051b5f7510d5 -r f72661ff0294 src/hotspot/share/oops/cpCache.hpp --- a/src/hotspot/share/oops/cpCache.hpp Thu Jan 31 07:24:28 2019 -0500 +++ b/src/hotspot/share/oops/cpCache.hpp Thu Jan 31 07:28:40 2019 -0500 @@ -444,7 +444,6 @@ 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); diff -r 051b5f7510d5 -r f72661ff0294 src/hotspot/share/oops/method.cpp --- a/src/hotspot/share/oops/method.cpp Thu Jan 31 07:24:28 2019 -0500 +++ b/src/hotspot/share/oops/method.cpp Thu Jan 31 07:28:40 2019 -0500 @@ -2403,7 +2403,6 @@ 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");