[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.13

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

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