From 5561f509d7b345fa873b942f8ea1f835beed3510 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 6 Jan 2019 14:11:10 +0300 Subject: [PATCH] Replace "msecs" with "ms" in all comments and messages * README.md (Bugs): Replace "msecs" with "ms". * doc/README.environment (GC_PAUSE_TIME_TARGET): Likewise. * doc/gcdescr.md (Generational Collection and Dirty Bits): Likewise. * alloc.c [!NO_CLOCK] (full_gc_total_time): Replace "msecs" with "ms" in comment. * cord/tests/de.c [WIN32] (beep): Likewise. * pthread_support.c [USE_SPIN_LOCK] (GC_lock): Likewise. * alloc.c [!GC_DISABLE_INCREMENTAL && !NO_CLOCK] (GC_timeout_stop_func): Replace "msecs" with "ms" in the printed string. * alloc.c [!NO_CLOCK] (GC_try_to_collect_inner, GC_stopped_mark, GC_finish_collection): Likewise. * misc.c [!NO_CLOCK] (GC_dump_named): Likewise. * reclaim.c [!NO_CLOCK] (GC_reclaim_all): Likewise. * tests/test.c [!NO_CLOCK] (check_heap_stats): Likewise. --- README.md | 2 +- alloc.c | 13 ++++++------- cord/tests/de.c | 2 +- doc/README.environment | 23 ++++++++++++----------- doc/gcdescr.md | 2 +- misc.c | 2 +- pthread_support.c | 4 ++-- reclaim.c | 2 +- tests/test.c | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index ce54f8b..4aa7ce0 100644 --- a/README.md +++ b/README.md @@ -522,7 +522,7 @@ heap sizes. But collection pauses will increase for larger heaps. They will decrease with the number of processors if parallel marking is enabled. -(On 2007 vintage machines, GC times may be on the order of 5 msecs +(On 2007 vintage machines, GC times may be on the order of 5 ms per MB of accessible memory that needs to be scanned and processor. Your mileage may vary.) The incremental/generational collection facility may help in some cases. diff --git a/alloc.c b/alloc.c index 9c45d62..18a2401 100644 --- a/alloc.c +++ b/alloc.c @@ -69,7 +69,7 @@ word GC_non_gc_bytes = 0; /* Number of bytes not intended to be collected */ word GC_gc_no = 0; #ifndef NO_CLOCK - static unsigned long full_gc_total_time = 0; /* in msecs, may wrap */ + static unsigned long full_gc_total_time = 0; /* in ms, may wrap */ static GC_bool measure_performance = FALSE; /* Do performance measurements if set to true (e.g., */ /* accumulation of the total time of full collections). */ @@ -246,7 +246,7 @@ GC_API GC_stop_func GC_CALL GC_get_stop_func(void) time_diff = MS_TIME_DIFF(current_time,GC_start_time); if (time_diff >= GC_time_limit) { GC_COND_LOG_PRINTF( - "Abandoning stopped marking after %lu msecs (attempt %d)\n", + "Abandoning stopped marking after %lu ms (attempt %d)\n", time_diff, GC_n_attempts); return(1); } @@ -587,7 +587,7 @@ GC_INNER GC_bool GC_try_to_collect_inner(GC_stop_func stop_func) if (measure_performance) full_gc_total_time += time_diff; /* may wrap */ if (GC_print_stats) - GC_log_printf("Complete collection took %lu msecs\n", time_diff); + GC_log_printf("Complete collection took %lu ms\n", time_diff); } # endif if (GC_on_collection_event) @@ -873,9 +873,8 @@ STATIC GC_bool GC_stopped_mark(GC_stop_func stop_func) world_stopped_total_divisor = ++divisor; GC_ASSERT(divisor != 0); - GC_log_printf( - "World-stopped marking took %lu msecs (%u in average)\n", - time_diff, total_time / divisor); + GC_log_printf("World-stopped marking took %lu ms (%u in average)\n", + time_diff, total_time / divisor); } # endif return(TRUE); @@ -1151,7 +1150,7 @@ STATIC void GC_finish_collection(void) /* A convenient place to output finalization statistics. */ GC_print_finalization_stats(); # endif - GC_log_printf("Finalize plus initiate sweep took %lu + %lu msecs\n", + GC_log_printf("Finalize plus initiate sweep took %lu + %lu ms\n", MS_TIME_DIFF(finalize_time,start_time), MS_TIME_DIFF(done_time,finalize_time)); } diff --git a/cord/tests/de.c b/cord/tests/de.c index 2707405..f69edde 100644 --- a/cord/tests/de.c +++ b/cord/tests/de.c @@ -375,7 +375,7 @@ void fix_pos(void) } #if defined(WIN32) -# define beep() Beep(1000 /* Hz */, 300 /* msecs */) +# define beep() Beep(1000 /* Hz */, 300 /* ms */) #elif defined(MACINTOSH) # define beep() SysBeep(1) #else diff --git a/doc/README.environment b/doc/README.environment index c977388..1806f33 100644 --- a/doc/README.environment +++ b/doc/README.environment @@ -127,17 +127,18 @@ GC_ENABLE_INCREMENTAL - Turn on incremental collection at startup. Note that, to be transparent, it may cause unintended system call failures. Use with caution. -GC_PAUSE_TIME_TARGET - Set the desired garbage collector pause time in msecs. - This only has an effect if incremental collection is - enabled. If a collection requires appreciably more time - than this, the client will be restarted, and the collector - will need to do additional work to compensate. The - special value "999999" indicates that pause time is - unlimited, and the incremental collector will behave - completely like a simple generational collector. If - the collector is configured for parallel marking, and - run on a multiprocessor, incremental collection should - only be used with unlimited pause time. +GC_PAUSE_TIME_TARGET - Set the desired garbage collector pause time in + milliseconds (ms). This only has an effect if incremental + collection is enabled. If a collection requires + appreciably more time than this, the client will be + restarted, and the collector will need to do additional + work to compensate. The special value "999999" indicates + that pause time is unlimited, and the incremental + collector will behave completely like a simple + generational collector. If the collector is configured + for parallel marking, and run on a multiprocessor, + incremental collection should only be used with unlimited + pause time. GC_FULL_FREQUENCY - Set the desired number of partial collections between full collections. Matters only if GC_incremental is set. diff --git a/doc/gcdescr.md b/doc/gcdescr.md index fbc0208..2c1a1ad 100644 --- a/doc/gcdescr.md +++ b/doc/gcdescr.md @@ -377,7 +377,7 @@ of allocation have taken place. After `GC_full_freq` minor collections a major collection is started. All collections initially run uninterrupted until a predetermined amount -of time (50 msecs by default) has expired. If this allows the collection +of time (50 ms by default) has expired. If this allows the collection to complete entirely, we can avoid correcting for data structure modifications during the collection. If it does not complete, we return control to the mutator, and perform small amounts of additional GC work during those later diff --git a/misc.c b/misc.c index 2390796..7fb3abd 100644 --- a/misc.c +++ b/misc.c @@ -2273,7 +2273,7 @@ GC_API void * GC_CALL GC_do_blocking(GC_fn_type fn, void * client_data) } # ifndef NO_CLOCK /* Note that the time is wrapped in ~49 days if sizeof(long)==4. */ - GC_printf("Time since GC init: %lu msecs\n", + GC_printf("Time since GC init: %lu ms\n", MS_TIME_DIFF(current_time, GC_init_time)); # endif diff --git a/pthread_support.c b/pthread_support.c index b9d92b9..6f4f51d 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -2101,7 +2101,7 @@ yield: # define SLEEP_THRESHOLD 12 /* Under Linux very short sleeps tend to wait until */ /* the current time quantum expires. On old Linux */ - /* kernels nanosleep (<= 2 msecs) just spins. */ + /* kernels nanosleep (<= 2 ms) just spins. */ /* (Under 2.4, this happens only for real-time */ /* processes.) We want to minimize both behaviors */ /* here. */ @@ -2111,7 +2111,7 @@ yield: struct timespec ts; if (i > 24) i = 24; - /* Don't wait for more than about 15 msecs, */ + /* Don't wait for more than about 15 ms, */ /* even under extreme contention. */ ts.tv_sec = 0; ts.tv_nsec = 1 << i; diff --git a/reclaim.c b/reclaim.c index b2748ee..73292b4 100644 --- a/reclaim.c +++ b/reclaim.c @@ -755,7 +755,7 @@ GC_INNER GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old) CLOCK_TYPE done_time; GET_TIME(done_time); - GC_verbose_log_printf("Disposing of reclaim lists took %lu msecs\n", + GC_verbose_log_printf("Disposing of reclaim lists took %lu ms\n", MS_TIME_DIFF(done_time,start_time)); } # endif diff --git a/tests/test.c b/tests/test.c index e2f2256..d577ad8 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1804,7 +1804,7 @@ void check_heap_stats(void) # endif GC_printf("Completed %u collections", (unsigned)GC_get_gc_no()); # ifndef NO_CLOCK - GC_printf(" in %lu msecs", GC_get_full_gc_total_time()); + GC_printf(" in %lu ms", GC_get_full_gc_total_time()); # endif # ifdef PARALLEL_MARK GC_printf(" (using %d marker threads)", GC_get_parallel() + 1); -- 2.7.4