~ chicken-core (chicken-5) fcc46092bd00c595f939d405605d204b5b5904c8
commit fcc46092bd00c595f939d405605d204b5b5904c8 Merge: 07d0bedb 2033ec7f Author: felix <felix@call-with-current-continuation.org> AuthorDate: Tue Aug 10 03:35:51 2010 -0400 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Tue Aug 10 03:35:51 2010 -0400 merged flonum-milliseconds branch diff --cc runtime.c index 2e13f5a3,31484444..b47a262b --- a/runtime.c +++ b/runtime.c @@@ -479,10 -478,8 +479,8 @@@ static int C_fcall hash_string(int len static C_word C_fcall lookup(C_word key, int len, C_char *str, C_SYMBOL_TABLE *stable) C_regparm; static double compute_symbol_table_load(double *avg_bucket_len, int *total); static C_word C_fcall convert_string_to_number(C_char *str, int radix, C_word *fix, double *flo) C_regparm; - static long C_fcall milliseconds(void); - static long C_fcall cpu_milliseconds(void); static void C_fcall remark_system_globals(void) C_regparm; -static void C_fcall remark(C_word *x) C_regparm; +static void C_fcall really_remark(C_word *x) C_regparm; static C_word C_fcall intern0(C_char *name) C_regparm; static void C_fcall update_locative_table(int mode) C_regparm; static LF_LIST *find_module_handle(C_char *name); @@@ -2655,12 -2638,9 +2652,12 @@@ C_regparm void C_fcall C_reclaim(void * /* Entry point for second-level GC (on explicit request or because of full fromspace): */ if(C_setjmp(gc_restart) || (start = C_fromspace_top) >= C_fromspace_limit) { - if(gc_bell) C_putchar(7); + if(gc_bell) { + C_putchar(7); + C_fflush(stdout); + } - tgc = cpu_milliseconds(); + tgc = C_cpu_milliseconds(); if(gc_mode == GC_REALLOC) { C_rereclaim2(percentage(heap_size, C_heap_growth), 0); @@@ -3893,9 -3869,9 +3890,9 @@@ C_regparm C_word C_fcall C_set_gc_repor C_regparm C_word C_fcall C_start_timer(void) { mutation_count = 0; - gc_count_1 = 0; + gc_count_1_total = 0; gc_count_2 = 0; - timer_start_ms = cpu_milliseconds(); + timer_start_ms = C_cpu_milliseconds(); gc_ms = 0; return C_SCHEME_UNDEFINED; } @@@ -3907,11 -3883,12 +3904,12 @@@ void C_ccall C_stop_timer(C_word c, C_w C_word ab[ WORDS_PER_FLONUM * 2 + 7 ], /* 2 flonums, 1 vector of 6 elements */ *a = ab, - elapsed = C_flonum(&a, (double)t0 / 1000.0), - gc_time = C_flonum(&a, (double)gc_ms / 1000.0), + elapsed = C_flonum(&a, t0 / 1000.0), + gc_time = C_flonum(&a, gc_ms / 1000.0), info; - info = C_vector(&a, 6, elapsed, gc_time, C_fix(mutation_count), C_fix(gc_count_1_total), C_fix(gc_count_2)); - info = C_vector(&a, 6, elapsed, gc_time, C_fix(mutation_count), C_fix(gc_count_1), ++ info = C_vector(&a, 6, elapsed, gc_time, C_fix(mutation_count), C_fix(gc_count_1_total), + C_fix(gc_count_2)); C_kontinue(k, info); }Trap