src/share/vm/opto/runtime.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/runtime.cpp	Mon Sep 14 23:13:36 2015
--- new/src/share/vm/opto/runtime.cpp	Mon Sep 14 23:13:36 2015

*** 100,114 **** --- 100,109 ---- address OptoRuntime::_rethrow_Java = NULL; address OptoRuntime::_slow_arraycopy_Java = NULL; address OptoRuntime::_register_finalizer_Java = NULL; # ifdef ENABLE_ZAP_DEAD_LOCALS address OptoRuntime::_zap_dead_Java_locals_Java = NULL; address OptoRuntime::_zap_dead_native_locals_Java = NULL; # endif ExceptionBlob* OptoRuntime::_exception_blob; // This should be called in an assertion at the start of OptoRuntime routines // which are entered from compiled code (all of them) #ifdef ASSERT
*** 150,163 **** --- 145,154 ---- gen(env, _rethrow_Java , rethrow_Type , rethrow_C , 2 , true , false, true ); gen(env, _slow_arraycopy_Java , slow_arraycopy_Type , SharedRuntime::slow_arraycopy_C , 0 , false, false, false); gen(env, _register_finalizer_Java , register_finalizer_Type , register_finalizer , 0 , false, false, false); # ifdef ENABLE_ZAP_DEAD_LOCALS gen(env, _zap_dead_Java_locals_Java , zap_dead_locals_Type , zap_dead_Java_locals_C , 0 , false, true , false ); gen(env, _zap_dead_native_locals_Java , zap_dead_locals_Type , zap_dead_native_locals_C , 0 , false, true , false ); # endif return true; } #undef gen
*** 602,628 **** --- 593,602 ---- const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields); return TypeFunc::make(domain, range); } # ifdef ENABLE_ZAP_DEAD_LOCALS // Type used for stub generation for zap_dead_locals. // No inputs or outputs const TypeFunc *OptoRuntime::zap_dead_locals_Type() { // create input type (domain) const Type **fields = TypeTuple::fields(0); const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms,fields); // create result type (range) fields = TypeTuple::fields(0); const TypeTuple *range = TypeTuple::make(TypeFunc::Parms,fields); return TypeFunc::make(domain,range); } # endif //----------------------------------------------------------------------------- // Monitor Handling const TypeFunc *OptoRuntime::complete_monitor_enter_Type() { // create input type (domain) const Type **fields = TypeTuple::fields(2);
*** 1646,1714 **** --- 1620,1624 ---- tty->print_cr("]"); } #endif // PRODUCT # ifdef ENABLE_ZAP_DEAD_LOCALS // Called from call sites in compiled code with oop maps (actually safepoints) // Zaps dead locals in first java frame. // Is entry because may need to lock to generate oop maps // Currently, only used for compiler frames, but someday may be used // for interpreter frames, too. int OptoRuntime::ZapDeadCompiledLocals_count = 0; // avoid pointers to member funcs with these helpers static bool is_java_frame( frame* f) { return f->is_java_frame(); } static bool is_native_frame(frame* f) { return f->is_native_frame(); } void OptoRuntime::zap_dead_java_or_native_locals(JavaThread* thread, bool (*is_this_the_right_frame_to_zap)(frame*)) { assert(JavaThread::current() == thread, "is this needed?"); if ( !ZapDeadCompiledLocals ) return; bool skip = false; if ( ZapDeadCompiledLocalsFirst == 0 ) ; // nothing special else if ( ZapDeadCompiledLocalsFirst > ZapDeadCompiledLocals_count ) skip = true; else if ( ZapDeadCompiledLocalsFirst == ZapDeadCompiledLocals_count ) warning("starting zapping after skipping"); if ( ZapDeadCompiledLocalsLast == -1 ) ; // nothing special else if ( ZapDeadCompiledLocalsLast < ZapDeadCompiledLocals_count ) skip = true; else if ( ZapDeadCompiledLocalsLast == ZapDeadCompiledLocals_count ) warning("about to zap last zap"); ++ZapDeadCompiledLocals_count; // counts skipped zaps, too if ( skip ) return; // find java frame and zap it for (StackFrameStream sfs(thread); !sfs.is_done(); sfs.next()) { if (is_this_the_right_frame_to_zap(sfs.current()) ) { sfs.current()->zap_dead_locals(thread, sfs.register_map()); return; } } warning("no frame found to zap in zap_dead_Java_locals_C"); } JRT_LEAF(void, OptoRuntime::zap_dead_Java_locals_C(JavaThread* thread)) zap_dead_java_or_native_locals(thread, is_java_frame); JRT_END // The following does not work because for one thing, the // thread state is wrong; it expects java, but it is native. // Also, the invariants in a native stub are different and // I'm not sure it is safe to have a MachCalRuntimeDirectNode // in there. // So for now, we do not zap in native stubs. JRT_LEAF(void, OptoRuntime::zap_dead_native_locals_C(JavaThread* thread)) zap_dead_java_or_native_locals(thread, is_native_frame); JRT_END # endif

src/share/vm/opto/runtime.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File