src/share/vm/oops/compiledICHolder.cpp

changeset 9185
82f9d3b7e317
parent 8997
f8a45a60bc6b
child 9203
53eec13fbaa5
equal deleted inserted replaced
9184:fbcbfd2753b5 9185:82f9d3b7e317
1 /* 1 /*
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2018, 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.
22 * 22 *
23 */ 23 */
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "oops/compiledICHolder.hpp" 26 #include "oops/compiledICHolder.hpp"
27 #include "oops/klass.hpp"
28 #include "oops/method.hpp"
29 #include "oops/oop.inline2.hpp" 27 #include "oops/oop.inline2.hpp"
30 28
31 volatile int CompiledICHolder::_live_count; 29 volatile int CompiledICHolder::_live_count;
32 volatile int CompiledICHolder::_live_not_claimed_count; 30 volatile int CompiledICHolder::_live_not_claimed_count;
33 31
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 32
51 // Printing 33 // Printing
52 34
53 void CompiledICHolder::print_on(outputStream* st) const { 35 void CompiledICHolder::print_on(outputStream* st) const {
54 st->print("%s", internal_name()); 36 st->print("%s", internal_name());

mercurial