# HG changeset patch # User Gilles Duboscq # Date 1398780714 -7200 # Node ID 8638307944beff7a52a42836a342fbc314fd021b # Parent 62f455eba8c516ee7859e6d7332b6370adc15be6 Add flag to always enable debug info sharing (true ifdef GRAAL) diff -r 62f455eba8c5 -r 8638307944be src/share/vm/code/debugInfoRec.cpp --- a/src/share/vm/code/debugInfoRec.cpp Tue Apr 29 16:16:27 2014 +0200 +++ b/src/share/vm/code/debugInfoRec.cpp Tue Apr 29 16:11:54 2014 +0200 @@ -235,16 +235,13 @@ int DebugInformationRecorder::find_sharable_decode_offset(int stream_offset) { - // It's always a space win to share and Graal generates quite a bit - // of scopes data so always enable the sharing logic with Graal. - // Presumably this is disabled in regular HotSpot because it makes - // recording more expensive? -#ifndef GRAAL - // Only pull this trick if non-safepoint recording - // is enabled, for now. - if (!recording_non_safepoints()) + if (FLAG_IS_DEFAULT(ShareDebugInfo)) { + if (!ShareDebugInfo && !recording_non_safepoints()) { + return serialized_null; + } + } else if (!ShareDebugInfo) { return serialized_null; -#endif + } NOT_PRODUCT(++dir_stats.chunks_queried); int stream_length = stream()->position() - stream_offset; diff -r 62f455eba8c5 -r 8638307944be src/share/vm/runtime/globals.hpp --- a/src/share/vm/runtime/globals.hpp Tue Apr 29 16:16:27 2014 +0200 +++ b/src/share/vm/runtime/globals.hpp Tue Apr 29 16:11:54 2014 +0200 @@ -980,6 +980,9 @@ product(bool, PrintNMethodStatistics, false, \ "Print a summary statistic for the generated nmethods") \ \ + product(bool, ShareDebugInfo, IS_GRAAL_DEFINED, \ + "Always tries to share similar debug info inside a nmethod") \ + \ diagnostic(bool, PrintNMethods, false, \ "Print assembly code for nmethods when generated") \ \