< prev index next >

src/share/vm/code/nmethod.cpp

Print this page

        

*** 562,572 **** // class hierarchy above the loaded class, checking only nmethods // which are dependent on those classes. The slow way is to // check every nmethod for dependencies which makes it linear in // the number of methods compiled. For applications with a lot // classes the slow way is too slow. ! for (Dependencies::DepStream deps(nm); deps.next(); ) { if (deps.type() == Dependencies::call_site_target_value) { // CallSite dependencies are managed on per-CallSite instance basis. oop call_site = deps.argument_oop(0); MethodHandles::add_dependent_nmethod(call_site, nm); } else { --- 562,573 ---- // class hierarchy above the loaded class, checking only nmethods // which are dependent on those classes. The slow way is to // check every nmethod for dependencies which makes it linear in // the number of methods compiled. For applications with a lot // classes the slow way is too slow. ! int total = 0; ! for (Dependencies::DepStream deps(nm); deps.next(); total++) { if (deps.type() == Dependencies::call_site_target_value) { // CallSite dependencies are managed on per-CallSite instance basis. oop call_site = deps.argument_oop(0); MethodHandles::add_dependent_nmethod(call_site, nm); } else {
*** 576,585 **** --- 577,588 ---- } // record this nmethod as dependent on this klass InstanceKlass::cast(klass)->add_dependent_nmethod(nm); } } + Dependencies::_perf_dependencies_total_count->inc(total); + NOT_PRODUCT(nmethod_stats.note_nmethod(nm)); if (PrintAssembly || CompilerOracle::has_option_string(method, "PrintAssembly")) { Disassembler::decode(nm); } }
< prev index next >