[BACK]Return to gc-7.0-risa.diff CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000

Annotation of OpenXM_contrib2/asir2000/gc-7.0-risa.diff, Revision 1.8

1.7       ohara       1: diff -urN gc-7.2alpha6.orig/alloc.c gc-7.2alpha6/alloc.c
                      2: --- gc-7.2alpha6.orig/alloc.c  2011-06-01 00:27:11.000000000 +0900
                      3: +++ gc-7.2alpha6/alloc.c       2012-05-08 01:22:13.000000000 +0900
                      4: @@ -121,6 +121,7 @@
                      5:  #endif
1.1       ohara       6:
1.7       ohara       7:  word GC_free_space_divisor = GC_FREE_SPACE_DIVISOR;
1.1       ohara       8: +word GC_free_space_numerator = 1;
                      9:
1.7       ohara      10:  GC_INNER int GC_CALLBACK GC_never_stop_func(void)
                     11:  {
                     12: @@ -229,9 +230,9 @@
                     13:      scan_size = 2 * GC_composite_in_use + GC_atomic_in_use / 4
1.1       ohara      14:                + total_root_size;
1.7       ohara      15:      if (GC_incremental) {
1.1       ohara      16: -        return scan_size / (2 * GC_free_space_divisor);
                     17: +        return scan_size * GC_free_space_numerator / (2 * GC_free_space_divisor);
                     18:      } else {
                     19: -        return scan_size / GC_free_space_divisor;
1.7       ohara      20: +        return scan_size * GC_free_space_numerator / (2 * GC_free_space_divisor);
1.1       ohara      21:      }
                     22:  }
                     23:
1.7       ohara      24: @@ -597,6 +598,7 @@
                     25:          GET_TIME(start_time);
1.1       ohara      26:  #   endif
1.7       ohara      27:
1.1       ohara      28: +      GC_timerstart();
                     29:      STOP_WORLD();
1.7       ohara      30:  #   ifdef THREAD_LOCAL_ALLOC
                     31:        GC_world_stopped = TRUE;
                     32: @@ -629,6 +631,7 @@
                     33:                GC_world_stopped = FALSE;
                     34:  #           endif
1.1       ohara      35:                    START_WORLD();
                     36: +                              GC_timerstop();
                     37:                    return(FALSE);
                     38:            }
                     39:            if (GC_mark_some((ptr_t)(&dummy))) break;
1.7       ohara      40: @@ -651,6 +654,7 @@
                     41:        GC_world_stopped = FALSE;
                     42:  #   endif
1.1       ohara      43:      START_WORLD();
                     44: +    GC_timerstop();
1.7       ohara      45:  #   ifndef SMALL_CONFIG
1.1       ohara      46:      if (GC_print_stats) {
1.7       ohara      47:          unsigned long time_diff;
                     48: @@ -796,6 +800,7 @@
1.1       ohara      49:          /* FIXME: Add more checks.                            */
                     50:          GC_check_tls();
                     51:  #   endif
                     52: +      GC_timerstart();
                     53:
1.7       ohara      54:  #   ifndef SMALL_CONFIG
1.1       ohara      55:      if (GC_print_stats)
1.7       ohara      56: @@ -923,6 +928,7 @@
1.1       ohara      57:                      MS_TIME_DIFF(done_time,finalize_time));
                     58:      }
1.7       ohara      59:  #   endif
1.1       ohara      60: +    GC_timerstop();
                     61:  }
                     62:
1.7       ohara      63:  /* If stop_func == 0 then GC_default_stop_func is used instead.         */
                     64: @@ -1172,6 +1178,9 @@
                     65:           GC_heapsize + expansion_slop - 2*MAXHINCR*HBLKSIZE;
1.1       ohara      66:          if (GC_collect_at_heapsize < GC_heapsize /* wrapped */)
                     67:           GC_collect_at_heapsize = (word)(-1);
1.3       ohara      68: +#if defined(VISUAL)
1.1       ohara      69: +    SendHeapSize();
                     70: +#endif
                     71:      return(TRUE);
                     72:  }
                     73:
1.7       ohara      74: @@ -1281,6 +1290,21 @@
                     75:      GC_bool retry = FALSE;
1.1       ohara      76:
                     77:      if (gran == 0) return(0);
1.2       ohara      78: +#if defined(_MSC_VER)
1.1       ohara      79: +    {
                     80: +#include <signal.h>
                     81: +        extern int recv_intr;
                     82: +        if ( recv_intr ) {
                     83: +            if ( recv_intr == 1 ) {
                     84: +                recv_intr = 0;
                     85: +                int_handler();
                     86: +            } else {
                     87: +                recv_intr = 0;
                     88: +                ox_usr1_handler(0);
                     89: +            }
                     90: +        }
                     91: +    }
                     92: +#endif
1.7       ohara      93:
1.1       ohara      94:      while (*flh == 0) {
                     95:        ENTER_GC();
1.7       ohara      96: diff -urN gc-7.2alpha6.orig/misc.c gc-7.2alpha6/misc.c
                     97: --- gc-7.2alpha6.orig/misc.c   2011-06-01 00:27:11.000000000 +0900
                     98: +++ gc-7.2alpha6/misc.c        2012-05-08 01:17:58.000000000 +0900
                     99: @@ -141,6 +141,93 @@
                    100:  GC_INNER long GC_large_alloc_warn_interval = GC_LARGE_ALLOC_WARN_INTERVAL;
                    101:                          /* Interval between unsuppressed warnings.      */
1.2       ohara     102:
                    103: +#include <time.h>
                    104: +
                    105: +#if defined(_MSC_VER)
                    106: +#include <windows.h>
                    107: +
                    108: +static double get_clock()
                    109: +{
                    110: +      static int initialized = 0;
                    111: +      static int is_winnt = 0;
                    112: +      static HANDLE curproc;
                    113: +
                    114: +      if ( !initialized ) {
                    115: +              OSVERSIONINFO vinfo;
                    116: +
                    117: +              curproc = GetCurrentProcess();
                    118: +              vinfo.dwOSVersionInfoSize = sizeof(vinfo);
                    119: +              GetVersionEx(&vinfo);
                    120: +              if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
                    121: +                      is_winnt = 1;
                    122: +              else
                    123: +                      is_winnt = 0;
                    124: +      }
                    125: +      if ( is_winnt ) {
                    126: +              FILETIME c,e,k,u;
                    127: +
                    128: +              GetProcessTimes(curproc,&c,&e,&k,&u);
                    129: +              return ((double)k.dwLowDateTime+(double)u.dwLowDateTime
                    130: +                      +4294967296.0*((double)k.dwHighDateTime+(double)u.dwHighDateTime))/10000000.0;
                    131: +      } else
                    132: +//            return (double)clock()/(double)CLOCKS_PER_SEC;
                    133: +              return ((double)GetTickCount())/1000.0;
                    134: +}
                    135: +
                    136: +#elif defined(THINK_C) || defined(__MWERKS__) || defined(MSWIN32)
                    137: +
                    138: +static double get_clock()
                    139: +{
                    140: +      clock_t c;
                    141: +
                    142: +      c = clock();
                    143: +      return (double)c/(double)CLOCKS_PER_SEC;
                    144: +}
                    145: +
                    146: +#elif defined(_PA_RISC1_1) || defined(__svr4__) || defined(__CYGWIN__)
                    147: +
1.4       noro      148: +#include <sys/times.h>
1.2       ohara     149: +#include <limits.h>
                    150: +
                    151: +static double get_clock()
                    152: +{
                    153: +      struct tms buf;
                    154: +
                    155: +      times(&buf);
                    156: +      return (double)(buf.tms_utime+buf.tms_stime)/(double)CLK_TCK;
                    157: +}
                    158: +
                    159: +#else
                    160: +
                    161: +#include <sys/time.h>
                    162: +#include <sys/resource.h>
                    163: +
                    164: +static double get_clock()
                    165: +{
                    166: +      int tv_sec,tv_usec;
                    167: +      struct rusage ru;
                    168: +
                    169: +      getrusage(RUSAGE_SELF,&ru);
                    170: +      tv_sec = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec;
                    171: +      tv_usec = ru.ru_utime.tv_usec + ru.ru_stime.tv_usec;
                    172: +      return (double)tv_sec+(double)tv_usec/(double)1000000;
                    173: +}
                    174: +#endif
                    175: +
                    176: +static double gctime, gcstart;
                    177: +
                    178: +void GC_timerstart() {
                    179: +      gcstart = get_clock();
                    180: +}
                    181: +
                    182: +void GC_timerstop() {
                    183: +      gctime += get_clock() - gcstart;
                    184: +}
                    185: +
                    186: +double GC_get_gctime() {
                    187: +      return gctime;
                    188: +}
                    189: +
                    190:  /*ARGSUSED*/
1.7       ohara     191:  STATIC void * GC_CALLBACK GC_default_oom_fn(size_t bytes_requested)
1.2       ohara     192:  {
1.7       ohara     193: diff -urN gc-7.2alpha6.orig/reclaim.c gc-7.2alpha6/reclaim.c
                    194: --- gc-7.2alpha6.orig/reclaim.c        2011-06-01 00:27:11.000000000 +0900
                    195: +++ gc-7.2alpha6/reclaim.c     2012-05-08 01:25:00.000000000 +0900
                    196: @@ -590,6 +590,7 @@
                    197:
                    198:        if (GC_print_stats == VERBOSE)
                    199:          GET_TIME(start_time);
                    200: +      GC_timerstart();
                    201:  #   endif
                    202:
                    203:      for (kind = 0; kind < GC_n_kinds; kind++) {
                    204: @@ -614,6 +615,7 @@
                    205:          }
                    206:      }
                    207:  #   ifndef SMALL_CONFIG
                    208: +      GC_timerstop();
                    209:        if (GC_print_stats == VERBOSE) {
                    210:          GET_TIME(done_time);
                    211:          GC_log_printf("Disposing of reclaim lists took %lu msecs\n",
1.8     ! ohara     212: diff -urN gc-7.2.orig/NT_X64_STATIC_THREADS_MAKEFILE gc-7.2/NT_X64_STATIC_THREADS_MAKEFILE
        !           213: --- gc-7.2.orig/NT_X64_STATIC_THREADS_MAKEFILE 2012-05-12 02:09:00.000000000 +0900
        !           214: +++ gc-7.2/NT_X64_STATIC_THREADS_MAKEFILE      2013-06-13 14:43:07.000000000 +0900
        !           215: @@ -22,13 +22,13 @@
        !           216:  all: gctest.exe cord\de.exe test_cpp.exe
        !           217:
        !           218:  .c.obj:
        !           219: -      $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4701
        !           220: +      $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE -DLARGE_CONFIG $*.c /Fo$*.obj /wd4701
        !           221:  # Disable "may not be initialized" warnings.  They're too approximate.
        !           222:  # Disable crt security warnings, since unfortunately they warn about all sorts
        !           223:  # of safe uses of strncpy.  It would be nice to leave the rest enabled.
        !           224:
        !           225:  .cpp.obj:
        !           226: -      $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj
        !           227: +      $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE -DLARGE_CONFIG $*.cpp /Fo$*.obj
        !           228:
        !           229:  $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
        !           230:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>