This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Major debugging breakage


On Thu, Jan 03, 2002 at 07:51:14PM -0800, Zack Weinberg wrote:
>On Thu, Jan 03, 2002 at 08:00:31PM -0700, law@redhat.com wrote:
>>>I would rather not have a "solution" which invalidates mmap under
>>>cygwin.  I think that could have some real performance losses right?
>>In an ideal world we'd have some test which would tell us if mmap was
>>broken.  If it was broken, then we'd fall back to the old style garbage
>>collector.  I don't know if that's feasible in this case or not.
>>
>>And yes, there is a significant compile-time performance penalty for
>>not supporting mmap..
>
>I just want to point out that the current problem with mmap under
>cygwin does _not_ affect the garbage collector.  It only affects
>cpplib's use of mmap to read files.  The performance difference between
>mmap and read is pretty darn small, and I've only measured it on Linux
>where mmap has been made very fast.  It might be a total loss under
>Windows for all I know.

Ok.  We've admitted defeat on this one.  Windows 9x wins.  Sigh.

So we have to turn off this feature for all Windows platforms since it
is possible that a gcc built on Windows NT (where mmap works fine) will
be run on Windows 98 (where it doesn't).

Does the below patch make sense?  I qualified the BROKENness of mmap
because, as Zack suggested, it seems to work fine elsewhere and so we
don't want to slow down gcc's garbage collection.

cgf

2002-01-10  Christopher Faylor  <cgf@redhat.com>

	* config/i386/cygwin.h: Define HAVE_BROKEN_CPP_MMAP.
	* cppfiles.c: Throughout, avoid using mmap when HAVE_BROKEN_CPP_MMAP.

Index: cppfiles.c
===================================================================
RCS file: /cvs/uberbaum/gcc/cppfiles.c,v
retrieving revision 1.142
diff -u -p -r1.142 cppfiles.c
--- cppfiles.c	2002/01/03 21:43:00	1.142
+++ cppfiles.c	2002/01/10 22:03:05
@@ -28,6 +28,10 @@ Foundation, 59 Temple Place - Suite 330,
 #include "mkdeps.h"
 #include "splay-tree.h"
 
+#ifdef HAVE_BROKEN_CPP_MMAP
+# undef HAVE_MMAP_FILE
+#endif
+
 #ifdef HAVE_MMAP_FILE
 # include <sys/mman.h>
 # ifndef MMAP_THRESHOLD
Index: config/i386/cygwin.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/cygwin.h,v
retrieving revision 1.61
diff -u -p -r1.61 cygwin.h
--- cygwin.h	2002/01/03 17:40:01	1.61
+++ cygwin.h	2002/01/10 22:03:07
@@ -486,6 +486,8 @@ extern int i386_pe_dllimport_name_p PARA
 #endif /* not CROSS_COMPILE */
 #endif /* not WIN32_NO_ABSOLUTE_INST_DIRS */
 
+#define HAVE_BROKEN_CPP_MMAP
+
 #undef TREE
 
 #ifndef BUFSIZ


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]