removed the debugging message about gc stats at end of run

This commit is contained in:
Abdulaziz Ghuloum 2006-11-29 18:45:13 -05:00
parent 9eaaf3c438
commit c9516d07d6
5 changed files with 19 additions and 17 deletions

View File

@ -5,3 +5,4 @@
.bzrignore .bzrignore
.bzrignore .bzrignore
./ikarus.boot.back ./ikarus.boot.back
.DS_Store

Binary file not shown.

View File

@ -11,7 +11,6 @@
#include <errno.h> #include <errno.h>
#define forward_ptr ((ikp)-1) #define forward_ptr ((ikp)-1)
//#define DEBUG_STACK 0
#define minimum_heap_size (pagesize * 1024 * 4) #define minimum_heap_size (pagesize * 1024 * 4)
#define maximum_heap_size (pagesize * 1024 * 8) #define maximum_heap_size (pagesize * 1024 * 8)
#define minimum_stack_size (pagesize * 128) #define minimum_stack_size (pagesize * 128)
@ -553,16 +552,16 @@ static void collect_stack(gc_t* gc, ikp top, ikp end){
for(i=0; i<bytes_in_mask; i++, fp-=8){ for(i=0; i<bytes_in_mask; i++, fp-=8){
unsigned char m = mask[i]; unsigned char m = mask[i];
#if DEBUG_STACK #if DEBUG_STACK
fprintf(stderr, "m=0x%x\n", m); fprintf(stderr, "m[%d]=0x%x\n", i, m);
#endif #endif
if(m & 0x01) { fp[-0] = add_object(gc, fp[-0], "frame2"); } if(m & 0x01) { fp[-0] = add_object(gc, fp[-0], "frame0"); }
if(m & 0x02) { fp[-1] = add_object(gc, fp[-1], "frame3"); } if(m & 0x02) { fp[-1] = add_object(gc, fp[-1], "frame1"); }
if(m & 0x04) { fp[-2] = add_object(gc, fp[-2], "frame4"); } if(m & 0x04) { fp[-2] = add_object(gc, fp[-2], "frame2"); }
if(m & 0x08) { fp[-3] = add_object(gc, fp[-3], "frame5"); } if(m & 0x08) { fp[-3] = add_object(gc, fp[-3], "frame3"); }
if(m & 0x10) { fp[-4] = add_object(gc, fp[-4], "frame6"); } if(m & 0x10) { fp[-4] = add_object(gc, fp[-4], "frame4"); }
if(m & 0x20) { fp[-5] = add_object(gc, fp[-5], "frame7"); } if(m & 0x20) { fp[-5] = add_object(gc, fp[-5], "frame5"); }
if(m & 0x40) { fp[-6] = add_object(gc, fp[-6], "framea"); } if(m & 0x40) { fp[-6] = add_object(gc, fp[-6], "frame6"); }
if(m & 0x80) { fp[-7] = add_object(gc, fp[-7], "frameb"); } if(m & 0x80) { fp[-7] = add_object(gc, fp[-7], "frame7"); }
} }
} }
top += framesize; top += framesize;

View File

@ -27,12 +27,14 @@ int main(int argc, char** argv){
char* fasl_file = argv[i]; char* fasl_file = argv[i];
ik_fasl_load(pcb, fasl_file); ik_fasl_load(pcb, fasl_file);
} }
/*
fprintf(stderr, "collect time: %d.%03d utime, %d.%03d stime (%d collections)\n", fprintf(stderr, "collect time: %d.%03d utime, %d.%03d stime (%d collections)\n",
pcb->collect_utime.tv_sec, pcb->collect_utime.tv_sec,
pcb->collect_utime.tv_usec/1000, pcb->collect_utime.tv_usec/1000,
pcb->collect_stime.tv_sec, pcb->collect_stime.tv_sec,
pcb->collect_stime.tv_usec/1000, pcb->collect_stime.tv_usec/1000,
pcb->collection_id ); pcb->collection_id );
*/
ik_delete_pcb(pcb); ik_delete_pcb(pcb);
return 0; return 0;
} }

View File

@ -746,7 +746,7 @@ ikrt_open_output_file(ikp fname, ikp flagptr, ikpcb* pcb){
int flags; int flags;
int f = unfix(flagptr); int f = unfix(flagptr);
if(f == 0){ if(f == 0){
flags = O_WRONLY; flags = O_WRONLY | O_CREAT;
} else if(f == 1){ } else if(f == 1){
unlink(string_data(fname)); unlink(string_data(fname));
flags = O_WRONLY | O_CREAT; flags = O_WRONLY | O_CREAT;
@ -762,7 +762,7 @@ ikrt_open_output_file(ikp fname, ikp flagptr, ikpcb* pcb){
int fd = open(string_data(fname), flags, int fd = open(string_data(fname), flags,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if(fd == -1){ if(fd == -1){
fprintf(stderr, "openfile failed!\n"); fprintf(stderr, "openfile failed: %s\n", strerror(errno));
return false_object; return false_object;
} else { } else {
return fix(fd); return fix(fd);