comparison src/share/vm/c1/c1_GraphBuilder.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 7eca5de9e0b6
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
885 if (!obj->is_loaded() 885 if (!obj->is_loaded()
886 || (PatchALot && obj->klass() != ciEnv::current()->String_klass())) { 886 || (PatchALot && obj->klass() != ciEnv::current()->String_klass())) {
887 patch_state = copy_state_before(); 887 patch_state = copy_state_before();
888 t = new ObjectConstant(obj); 888 t = new ObjectConstant(obj);
889 } else { 889 } else {
890 assert(!obj->is_klass(), "must be java_mirror of klass"); 890 assert(obj->is_instance(), "must be java_mirror of klass");
891 t = new InstanceConstant(obj->as_instance()); 891 t = new InstanceConstant(obj->as_instance());
892 } 892 }
893 break; 893 break;
894 } 894 }
895 default : ShouldNotReachHere(); 895 default : ShouldNotReachHere();
1432 assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet"); 1432 assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet");
1433 1433
1434 if (compilation()->env()->dtrace_method_probes()) { 1434 if (compilation()->env()->dtrace_method_probes()) {
1435 // Report exit from inline methods 1435 // Report exit from inline methods
1436 Values* args = new Values(1); 1436 Values* args = new Values(1);
1437 args->push(append(new Constant(new ObjectConstant(method())))); 1437 args->push(append(new Constant(new MethodConstant(method()))));
1438 append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args)); 1438 append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args));
1439 } 1439 }
1440 1440
1441 // If the inlined method is synchronized, the monitor must be 1441 // If the inlined method is synchronized, the monitor must be
1442 // released before we jump to the continuation block. 1442 // released before we jump to the continuation block.
1885 code == Bytecodes::_invokespecial || 1885 code == Bytecodes::_invokespecial ||
1886 code == Bytecodes::_invokevirtual || 1886 code == Bytecodes::_invokevirtual ||
1887 code == Bytecodes::_invokeinterface; 1887 code == Bytecodes::_invokeinterface;
1888 Values* args = state()->pop_arguments(target->arg_size_no_receiver()); 1888 Values* args = state()->pop_arguments(target->arg_size_no_receiver());
1889 Value recv = has_receiver ? apop() : NULL; 1889 Value recv = has_receiver ? apop() : NULL;
1890 int vtable_index = methodOopDesc::invalid_vtable_index; 1890 int vtable_index = Method::invalid_vtable_index;
1891 1891
1892 #ifdef SPARC 1892 #ifdef SPARC
1893 // Currently only supported on Sparc. 1893 // Currently only supported on Sparc.
1894 // The UseInlineCaches only controls dispatch to invokevirtuals for 1894 // The UseInlineCaches only controls dispatch to invokevirtuals for
1895 // loaded classes which we weren't able to statically bind. 1895 // loaded classes which we weren't able to statically bind.
3542 int bci = SynchronizationEntryBCI; 3542 int bci = SynchronizationEntryBCI;
3543 if (compilation()->env()->dtrace_method_probes()) { 3543 if (compilation()->env()->dtrace_method_probes()) {
3544 // Report exit from inline methods. We don't have a stream here 3544 // Report exit from inline methods. We don't have a stream here
3545 // so pass an explicit bci of SynchronizationEntryBCI. 3545 // so pass an explicit bci of SynchronizationEntryBCI.
3546 Values* args = new Values(1); 3546 Values* args = new Values(1);
3547 args->push(append_with_bci(new Constant(new ObjectConstant(method())), bci)); 3547 args->push(append_with_bci(new Constant(new MethodConstant(method())), bci));
3548 append_with_bci(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args), bci); 3548 append_with_bci(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args), bci);
3549 } 3549 }
3550 3550
3551 if (lock) { 3551 if (lock) {
3552 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); 3552 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing");
3730 inline_sync_entry(lock, sync_handler); 3730 inline_sync_entry(lock, sync_handler);
3731 } 3731 }
3732 3732
3733 if (compilation()->env()->dtrace_method_probes()) { 3733 if (compilation()->env()->dtrace_method_probes()) {
3734 Values* args = new Values(1); 3734 Values* args = new Values(1);
3735 args->push(append(new Constant(new ObjectConstant(method())))); 3735 args->push(append(new Constant(new MethodConstant(method()))));
3736 append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args)); 3736 append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args));
3737 } 3737 }
3738 3738
3739 if (profile_inlined_calls()) { 3739 if (profile_inlined_calls()) {
3740 profile_invocation(callee, copy_state_before_with_bci(SynchronizationEntryBCI)); 3740 profile_invocation(callee, copy_state_before_with_bci(SynchronizationEntryBCI));