1.1 --- a/src/share/vm/oops/compiledICHolder.cpp Tue Aug 08 12:02:01 2017 +0100 1.2 +++ b/src/share/vm/oops/compiledICHolder.cpp Fri Sep 29 14:30:05 2017 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -32,12 +32,28 @@ 1.11 volatile int CompiledICHolder::_live_not_claimed_count; 1.12 1.13 1.14 +bool CompiledICHolder::is_loader_alive(BoolObjectClosure* is_alive) { 1.15 + if (_holder_metadata->is_method()) { 1.16 + if (!((Method*)_holder_metadata)->method_holder()->is_loader_alive(is_alive)) { 1.17 + return false; 1.18 + } 1.19 + } else if (_holder_metadata->is_klass()) { 1.20 + if (!((Klass*)_holder_metadata)->is_loader_alive(is_alive)) { 1.21 + return false; 1.22 + } 1.23 + } 1.24 + if (!_holder_klass->is_loader_alive(is_alive)) { 1.25 + return false; 1.26 + } 1.27 + return true; 1.28 +} 1.29 + 1.30 // Printing 1.31 1.32 void CompiledICHolder::print_on(outputStream* st) const { 1.33 st->print("%s", internal_name()); 1.34 - st->print(" - method: "); holder_method()->print_value_on(st); st->cr(); 1.35 - st->print(" - klass: "); holder_klass()->print_value_on(st); st->cr(); 1.36 + st->print(" - metadata: "); holder_metadata()->print_value_on(st); st->cr(); 1.37 + st->print(" - klass: "); holder_klass()->print_value_on(st); st->cr(); 1.38 } 1.39 1.40 void CompiledICHolder::print_value_on(outputStream* st) const { 1.41 @@ -48,6 +64,6 @@ 1.42 // Verification 1.43 1.44 void CompiledICHolder::verify_on(outputStream* st) { 1.45 - guarantee(holder_method()->is_method(), "should be method"); 1.46 + guarantee(holder_metadata()->is_method() || holder_metadata()->is_klass(), "should be method or klass"); 1.47 guarantee(holder_klass()->is_klass(), "should be klass"); 1.48 }