diff src/share/vm/code/debugInfoRec.cpp @ 15433:8638307944be

Add flag to always enable debug info sharing (true ifdef GRAAL)
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 29 Apr 2014 16:11:54 +0200
parents fe11cb3c7882
children b888ded3ee42
line wrap: on
line diff
--- 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;