Changeset 7824
- Timestamp:
- Dec 5, 2007, 6:14:04 AM (17 years ago)
- Location:
- trunk/ccl/lisp-kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lisp-kernel/ppc-gc.c
r7137 r7824 25 25 #include <string.h> 26 26 #include <sys/time.h> 27 28 void 29 comma_output_decimal(char *buf, int len, natural n) 30 { 31 int nout = 0; 32 33 buf[--len] = 0; 34 do { 35 buf[--len] = n%10+'0'; 36 n = n/10; 37 if (n == 0) { 38 while (len) { 39 buf[--len] = ' '; 40 } 41 return; 42 } 43 if (len == 0) return; 44 nout ++; 45 if (nout == 3) { 46 buf[--len] = ','; 47 nout = 0; 48 } 49 } while (len >= 0); 50 } 27 51 28 52 /* Heap sanity checking. */ … … 2485 2509 2486 2510 if (GCverbose) { 2511 char buf[16]; 2512 2513 comma_output_decimal(buf,16,area_dnode(oldfree,a->low) << dnode_shift); 2487 2514 if (GCephemeral_low) { 2488 2515 fprintf(stderr, 2489 "\n\n;;; Starting E phemeralGC of generation %d",2516 "\n\n;;; Starting EGC of generation %d", 2490 2517 (from == g2_area) ? 2 : (from == g1_area) ? 1 : 0); 2491 2518 } else { 2492 2519 fprintf(stderr,"\n\n;;; Starting full GC"); 2493 2520 } 2494 fprintf(stderr, ", %ld bytes allocated.\n", area_dnode(oldfree,a->low) << dnode_shift);2521 fprintf(stderr, ", %s bytes allocated.\n", buf); 2495 2522 } 2496 2523 … … 2798 2825 *( (long long *) ptr_from_lispobj(((macptr *) ptr_from_lispobj(untag(val)))->address)) += justfreed; 2799 2826 if (GCverbose) { 2827 char buf[16]; 2800 2828 if (justfreed <= heap_segment_size) { 2801 2829 justfreed = 0; 2802 2830 } 2803 2831 if (note == tenured_area) { 2804 fprintf(stderr,";;; Finished full GC. Freed %lld bytes in %d.%06d s\n\n", justfreed, elapsed.tv_sec, elapsed.tv_usec);2832 fprintf(stderr,";;; Finished full GC. %s bytes freed in %d.%06d s\n\n", buf, elapsed.tv_sec, elapsed.tv_usec); 2805 2833 } else { 2806 fprintf(stderr,";;; Finished E phemeral GC of generation %d. Freed %lld bytesin %d.%06d s\n\n",2834 fprintf(stderr,";;; Finished EGC of generation %d. %s bytes freed in %d.%06d s\n\n", 2807 2835 (from == g2_area) ? 2 : (from == g1_area) ? 1 : 0, 2808 justfreed,2836 buf, 2809 2837 elapsed.tv_sec, elapsed.tv_usec); 2810 2838 } -
trunk/ccl/lisp-kernel/x86-gc.c
r7137 r7824 50 50 #endif 51 51 52 53 void 54 comma_output_decimal(char *buf, int len, natural n) 55 { 56 int nout = 0; 57 58 buf[--len] = 0; 59 do { 60 buf[--len] = n%10+'0'; 61 n = n/10; 62 if (n == 0) { 63 while (len) { 64 buf[--len] = ' '; 65 } 66 return; 67 } 68 if (len == 0) return; 69 nout ++; 70 if (nout == 3) { 71 buf[--len] = ','; 72 nout = 0; 73 } 74 } while (len >= 0); 75 } 52 76 53 77 /* Heap sanity checking. */ … … 2417 2441 2418 2442 if (GCverbose) { 2443 char buf[16]; 2444 2445 comma_output_decimal(buf,16,area_dnode(oldfree,a->low) << dnode_shift); 2419 2446 if (GCephemeral_low) { 2420 2447 fprintf(stderr, 2421 "\n\n;;; Starting E phemeralGC of generation %d",2448 "\n\n;;; Starting EGC of generation %d", 2422 2449 (from == g2_area) ? 2 : (from == g1_area) ? 1 : 0); 2423 2450 } else { 2424 2451 fprintf(stderr,"\n\n;;; Starting full GC"); 2425 2452 } 2426 fprintf(stderr, ", %ld bytes allocated.\n", area_dnode(oldfree,a->low) << dnode_shift);2453 fprintf(stderr, ", %s bytes allocated.\n", buf); 2427 2454 } 2428 2455 … … 2712 2739 *( (long long *) ptr_from_lispobj(((macptr *) ptr_from_lispobj(untag(val)))->address)) += justfreed; 2713 2740 if (GCverbose) { 2741 char buf[16]; 2714 2742 if (justfreed <= heap_segment_size) { 2715 2743 justfreed = 0; 2716 2744 } 2745 comma_output_decimal(buf,16,justfreed); 2717 2746 if (note == tenured_area) { 2718 fprintf(stderr,";;; Finished full GC. Freed %lld bytes in %d.%06d s\n\n", justfreed, elapsed.tv_sec, elapsed.tv_usec);2747 fprintf(stderr,";;; Finished full GC. %s bytes freed in %d.%06d s\n\n", buf, elapsed.tv_sec, elapsed.tv_usec); 2719 2748 } else { 2720 fprintf(stderr,";;; Finished E phemeral GC of generation %d. Freed %lld bytesin %d.%06d s\n\n",2749 fprintf(stderr,";;; Finished EGC of generation %d. %s bytes freed in %d.%06d s\n\n", 2721 2750 (from == g2_area) ? 2 : (from == g1_area) ? 1 : 0, 2722 justfreed,2751 buf, 2723 2752 elapsed.tv_sec, elapsed.tv_usec); 2724 2753 }
Note:
See TracChangeset
for help on using the changeset viewer.
