< prev index next >

src/share/vm/code/dependencies.cpp

Print this page

        

*** 115,126 **** check_ctxk(ctxk); assert_common_1(no_finalizable_subclasses, ctxk); } void Dependencies::assert_call_site_target_value(ciCallSite* call_site, ciMethodHandle* method_handle) { ! check_ctxk(call_site->klass()); ! assert_common_2(call_site_target_value, call_site, method_handle); } // Helper function. If we are adding a new dep. under ctxk2, // try to find an old dep. under a broader* ctxk1. If there is // --- 115,127 ---- check_ctxk(ctxk); assert_common_1(no_finalizable_subclasses, ctxk); } void Dependencies::assert_call_site_target_value(ciCallSite* call_site, ciMethodHandle* method_handle) { ! ciKlass* ctxk = call_site->get_context(); ! check_ctxk(ctxk); ! assert_common_3(call_site_target_value, ctxk, call_site, method_handle); } // Helper function. If we are adding a new dep. under ctxk2, // try to find an old dep. under a broader* ctxk1. If there is //
*** 386,396 **** 1, // concrete_with_no_concrete_subtype ctxk 2, // unique_concrete_method ctxk, m 3, // unique_concrete_subtypes_2 ctxk, k1, k2 3, // unique_concrete_methods_2 ctxk, m1, m2 1, // no_finalizable_subclasses ctxk ! 2 // call_site_target_value call_site, method_handle }; const char* Dependencies::dep_name(Dependencies::DepType dept) { if (!dept_in_mask(dept, all_types)) return "?bad-dep?"; return _dep_name[dept]; --- 387,397 ---- 1, // concrete_with_no_concrete_subtype ctxk 2, // unique_concrete_method ctxk, m 3, // unique_concrete_subtypes_2 ctxk, k1, k2 3, // unique_concrete_methods_2 ctxk, m1, m2 1, // no_finalizable_subclasses ctxk ! 3 // call_site_target_value ctxk, call_site, method_handle }; const char* Dependencies::dep_name(Dependencies::DepType dept) { if (!dept_in_mask(dept, all_types)) return "?bad-dep?"; return _dep_name[dept];
*** 592,602 **** if (_deps == NULL && xtty == NULL) return; // fast cutout for runtime ResourceMark rm; const int nargs = argument_count(); GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs); for (int j = 0; j < nargs; j++) { ! if (type() == call_site_target_value) { args->push(argument_oop(j)); } else { args->push(argument(j)); } } --- 593,603 ---- if (_deps == NULL && xtty == NULL) return; // fast cutout for runtime ResourceMark rm; const int nargs = argument_count(); GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs); for (int j = 0; j < nargs; j++) { ! if (is_oop_argument(j)) { args->push(argument_oop(j)); } else { args->push(argument(j)); } }
*** 612,622 **** void Dependencies::DepStream::print_dependency(Klass* witness, bool verbose) { ResourceMark rm; int nargs = argument_count(); GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs); for (int j = 0; j < nargs; j++) { ! if (type() == call_site_target_value) { args->push(argument_oop(j)); } else { args->push(argument(j)); } } --- 613,623 ---- void Dependencies::DepStream::print_dependency(Klass* witness, bool verbose) { ResourceMark rm; int nargs = argument_count(); GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs); for (int j = 0; j < nargs; j++) { ! if (is_oop_argument(j)) { args->push(argument_oop(j)); } else { args->push(argument(j)); } }
*** 708,718 **** /** * Returns a unique identifier for each dependency argument. */ uintptr_t Dependencies::DepStream::get_identifier(int i) { ! if (has_oop_argument()) { return (uintptr_t)(oopDesc*)argument_oop(i); } else { return (uintptr_t)argument(i); } } --- 709,719 ---- /** * Returns a unique identifier for each dependency argument. */ uintptr_t Dependencies::DepStream::get_identifier(int i) { ! if (is_oop_argument(i)) { return (uintptr_t)(oopDesc*)argument_oop(i); } else { return (uintptr_t)argument(i); } }
*** 735,745 **** return (Klass*)k; } } // Some dependencies are using the klass of the first object ! // argument as implicit context type (e.g. call_site_target_value). { int ctxkj = dep_implicit_context_arg(type()); if (ctxkj >= 0) { Klass* k = argument_oop(ctxkj)->klass(); assert(k != NULL && k->is_klass(), "type check"); --- 736,746 ---- return (Klass*)k; } } // Some dependencies are using the klass of the first object ! // argument as implicit context type. { int ctxkj = dep_implicit_context_arg(type()); if (ctxkj >= 0) { Klass* k = argument_oop(ctxkj)->klass(); assert(k != NULL && k->is_klass(), "type check");
*** 1506,1518 **** if (changes != NULL) search_at = changes->new_type(); // just look at the new bit return find_finalizable_subclass(search_at); } ! Klass* Dependencies::check_call_site_target_value(oop call_site, oop method_handle, CallSiteDepChange* changes) { ! assert(call_site ->is_a(SystemDictionary::CallSite_klass()), "sanity"); ! assert(method_handle->is_a(SystemDictionary::MethodHandle_klass()), "sanity"); if (changes == NULL) { // Validate all CallSites if (java_lang_invoke_CallSite::target(call_site) != method_handle) return call_site->klass(); // assertion failed } else { --- 1507,1526 ---- if (changes != NULL) search_at = changes->new_type(); // just look at the new bit return find_finalizable_subclass(search_at); } ! Klass* Dependencies::check_call_site_target_value(Klass* recorded_ctxk, oop call_site, oop method_handle, CallSiteDepChange* changes) { ! assert(call_site->is_a(SystemDictionary::CallSite_klass()), "sanity"); ! assert(!oopDesc::is_null(method_handle), "sanity"); ! ! Klass* call_site_ctxk = MethodHandles::get_call_site_context(call_site); ! assert(!Klass::is_null(call_site_ctxk), "call site context should be initialized already"); ! if (recorded_ctxk != call_site_ctxk) { ! // Stale context ! return recorded_ctxk; ! } if (changes == NULL) { // Validate all CallSites if (java_lang_invoke_CallSite::target(call_site) != method_handle) return call_site->klass(); // assertion failed } else {
*** 1523,1533 **** } } return NULL; // assertion still valid } - void Dependencies::DepStream::trace_and_log_witness(Klass* witness) { if (witness != NULL) { if (TraceDependencies) { print_dependency(witness, /*verbose=*/ true); } --- 1531,1540 ----
*** 1584,1594 **** Dependencies::check_valid_dependency_type(type()); Klass* witness = NULL; switch (type()) { case call_site_target_value: ! witness = check_call_site_target_value(argument_oop(0), argument_oop(1), changes); break; default: witness = NULL; break; } --- 1591,1601 ---- Dependencies::check_valid_dependency_type(type()); Klass* witness = NULL; switch (type()) { case call_site_target_value: ! witness = check_call_site_target_value(context_type(), argument_oop(1), argument_oop(2), changes); break; default: witness = NULL; break; }
< prev index next >