src/share/vm/oops/compiledICHolder.cpp

changeset 8997
f8a45a60bc6b
parent 6198
55fb97c4c58d
child 9041
95a08233f46c
child 9185
82f9d3b7e317
equal deleted inserted replaced
8996:2667e5c45e24 8997:f8a45a60bc6b
1 /* 1 /*
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
30 30
31 volatile int CompiledICHolder::_live_count; 31 volatile int CompiledICHolder::_live_count;
32 volatile int CompiledICHolder::_live_not_claimed_count; 32 volatile int CompiledICHolder::_live_not_claimed_count;
33 33
34 34
35 bool CompiledICHolder::is_loader_alive(BoolObjectClosure* is_alive) {
36 if (_holder_metadata->is_method()) {
37 if (!((Method*)_holder_metadata)->method_holder()->is_loader_alive(is_alive)) {
38 return false;
39 }
40 } else if (_holder_metadata->is_klass()) {
41 if (!((Klass*)_holder_metadata)->is_loader_alive(is_alive)) {
42 return false;
43 }
44 }
45 if (!_holder_klass->is_loader_alive(is_alive)) {
46 return false;
47 }
48 return true;
49 }
50
35 // Printing 51 // Printing
36 52
37 void CompiledICHolder::print_on(outputStream* st) const { 53 void CompiledICHolder::print_on(outputStream* st) const {
38 st->print("%s", internal_name()); 54 st->print("%s", internal_name());
39 st->print(" - method: "); holder_method()->print_value_on(st); st->cr(); 55 st->print(" - metadata: "); holder_metadata()->print_value_on(st); st->cr();
40 st->print(" - klass: "); holder_klass()->print_value_on(st); st->cr(); 56 st->print(" - klass: "); holder_klass()->print_value_on(st); st->cr();
41 } 57 }
42 58
43 void CompiledICHolder::print_value_on(outputStream* st) const { 59 void CompiledICHolder::print_value_on(outputStream* st) const {
44 st->print("%s", internal_name()); 60 st->print("%s", internal_name());
45 } 61 }
46 62
47 63
48 // Verification 64 // Verification
49 65
50 void CompiledICHolder::verify_on(outputStream* st) { 66 void CompiledICHolder::verify_on(outputStream* st) {
51 guarantee(holder_method()->is_method(), "should be method"); 67 guarantee(holder_metadata()->is_method() || holder_metadata()->is_klass(), "should be method or klass");
52 guarantee(holder_klass()->is_klass(), "should be klass"); 68 guarantee(holder_klass()->is_klass(), "should be klass");
53 } 69 }

mercurial