Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/doCall.cpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 7f813940ac35 |
children | 9d89c76b0505 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 2012, 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. |
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "ci/ciCPCache.hpp" | |
27 #include "ci/ciCallSite.hpp" | 26 #include "ci/ciCallSite.hpp" |
28 #include "ci/ciMethodHandle.hpp" | 27 #include "ci/ciMethodHandle.hpp" |
29 #include "classfile/vmSymbols.hpp" | 28 #include "classfile/vmSymbols.hpp" |
30 #include "compiler/compileBroker.hpp" | 29 #include "compiler/compileBroker.hpp" |
31 #include "compiler/compileLog.hpp" | 30 #include "compiler/compileLog.hpp" |
390 // Then we may introduce a run-time check and inline on the path where it succeeds. | 389 // Then we may introduce a run-time check and inline on the path where it succeeds. |
391 // The other path may uncommon_trap, check for another receiver, or do a v-call. | 390 // The other path may uncommon_trap, check for another receiver, or do a v-call. |
392 | 391 |
393 // Choose call strategy. | 392 // Choose call strategy. |
394 bool call_is_virtual = is_virtual_or_interface; | 393 bool call_is_virtual = is_virtual_or_interface; |
395 int vtable_index = methodOopDesc::invalid_vtable_index; | 394 int vtable_index = Method::invalid_vtable_index; |
396 ciMethod* callee = orig_callee; | 395 ciMethod* callee = orig_callee; |
397 | 396 |
398 // Try to get the most accurate receiver type | 397 // Try to get the most accurate receiver type |
399 if (is_virtual_or_interface) { | 398 if (is_virtual_or_interface) { |
400 Node* receiver_node = stack(sp() - nargs); | 399 Node* receiver_node = stack(sp() - nargs); |
537 pop(); | 536 pop(); |
538 push(cast_obj); | 537 push(cast_obj); |
539 } | 538 } |
540 } | 539 } |
541 } else { | 540 } else { |
542 assert(ct == rt, err_msg_res("unexpected mismatch rt=%d, ct=%d", rt, ct)); | 541 assert(ct == rt, err_msg("unexpected mismatch rt=%d, ct=%d", rt, ct)); |
543 // push a zero; it's better than getting an oop/int mismatch | 542 // push a zero; it's better than getting an oop/int mismatch |
544 retnode = pop_node(rt); | 543 retnode = pop_node(rt); |
545 retnode = zerocon(ct); | 544 retnode = zerocon(ct); |
546 push_node(ct, retnode); | 545 push_node(ct, retnode); |
547 } | 546 } |
834 void Parse::count_compiled_calls(bool at_method_entry, bool is_inline) { | 833 void Parse::count_compiled_calls(bool at_method_entry, bool is_inline) { |
835 if( CountCompiledCalls ) { | 834 if( CountCompiledCalls ) { |
836 if( at_method_entry ) { | 835 if( at_method_entry ) { |
837 // bump invocation counter if top method (for statistics) | 836 // bump invocation counter if top method (for statistics) |
838 if (CountCompiledCalls && depth() == 1) { | 837 if (CountCompiledCalls && depth() == 1) { |
839 const TypeOopPtr* addr_type = TypeOopPtr::make_from_constant(method()); | 838 const TypePtr* addr_type = TypeMetadataPtr::make(method()); |
840 Node* adr1 = makecon(addr_type); | 839 Node* adr1 = makecon(addr_type); |
841 Node* adr2 = basic_plus_adr(adr1, adr1, in_bytes(methodOopDesc::compiled_invocation_counter_offset())); | 840 Node* adr2 = basic_plus_adr(adr1, adr1, in_bytes(Method::compiled_invocation_counter_offset())); |
842 increment_counter(adr2); | 841 increment_counter(adr2); |
843 } | 842 } |
844 } else if (is_inline) { | 843 } else if (is_inline) { |
845 switch (bc()) { | 844 switch (bc()) { |
846 case Bytecodes::_invokevirtual: increment_counter(SharedRuntime::nof_inlined_calls_addr()); break; | 845 case Bytecodes::_invokevirtual: increment_counter(SharedRuntime::nof_inlined_calls_addr()); break; |