Debugging procedure print_allocs now writes to stderr.

This commit is contained in:
bal 1985-01-30 10:52:33 +00:00
parent 7f9dd27dc8
commit 31eab814f2

View file

@ -462,40 +462,40 @@ print_allocs(list)
short t; short t;
interv_p iv; interv_p iv;
printf("BEGIN ALLOCLIST of proc %d\n",curproc->p_id); fprintf(stderr,"BEGIN ALLOCLIST of proc %d\n",curproc->p_id);
for (m = list ; m != (alloc_p) 0; m = m->al_next) { for (m = list ; m != (alloc_p) 0; m = m->al_next) {
for (al = m; al != (alloc_p) 0; al = al->al_mates) { for (al = m; al != (alloc_p) 0; al = al->al_mates) {
item = al->al_item; item = al->al_item;
t = item->it_type; t = item->it_type;
printf("\nitem: [type = %s, ",str_types[t]); fprintf(stderr,"\nitem: [type = %s, ",str_types[t]);
switch(t) { switch(t) {
case GLOBL_ADDR: case GLOBL_ADDR:
printf("id = %d]\n", item->i_t.it_obj->o_id); fprintf(stderr,"id = %d]\n", item->i_t.it_obj->o_id);
break; break;
case PROC_ADDR: case PROC_ADDR:
printf("id = %d]\n", item->i_t.it_proc->p_id); fprintf(stderr,"id = %d]\n", item->i_t.it_proc->p_id);
break; break;
default: default:
printf("offset = %D]\n", item->i_t.it_off); fprintf(stderr,"offset = %D]\n", item->i_t.it_off);
} }
printf("#usages(static) = %d\n",al->al_susecount); fprintf(stderr,"#usages(static) = %d\n",al->al_susecount);
printf("#usages(dyn) = %d\n",al->al_dusecount); fprintf(stderr,"#usages(dyn) = %d\n",al->al_dusecount);
printf("#inits = %d\n",Lnrelems(al->al_inits)); fprintf(stderr,"#inits = %d\n",Lnrelems(al->al_inits));
printf("timespan = {"); fprintf(stderr,"timespan = {");
for (iv = al->al_timespan; iv != (interv_p) 0; for (iv = al->al_timespan; iv != (interv_p) 0;
iv = iv->i_next) { iv = iv->i_next) {
printf("(%d,%d) ",iv->i_start,iv->i_stop); fprintf(stderr,"(%d,%d) ",iv->i_start,iv->i_stop);
} }
printf("} \n"); fprintf(stderr,"} \n");
printf("busy = {"); fprintf(stderr,"busy = {");
for (iv = al->al_busy; iv != (interv_p) 0; for (iv = al->al_busy; iv != (interv_p) 0;
iv = iv->i_next) { iv = iv->i_next) {
printf("(%d,%d) ",iv->i_start,iv->i_stop); fprintf(stderr,"(%d,%d) ",iv->i_start,iv->i_stop);
} }
printf("} \n"); fprintf(stderr,"} \n");
printf("profits = %d\n",al->al_profits); fprintf(stderr,"profits = %d\n",al->al_profits);
printf("dummy local = %D\n",al->al_dummy); fprintf(stderr,"dummy local = %D\n",al->al_dummy);
printf("regnr = %d\n",al->al_regnr); fprintf(stderr,"regnr = %d\n",al->al_regnr);
} }
} }
} }