From: David S. W. <dw...@us...> - 2008-09-15 18:47:45
|
Update of /cvsroot/xsb/XSB/emu In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15199 Modified Files: emuloop.c heap_xsb.c Log Message: Minor change in when string (or atom) garbage collection is triggered. Keeps it from being called too often. (Also minor changes in emuloop print tracing, usu (and now) commented out.) Index: emuloop.c =================================================================== RCS file: /cvsroot/xsb/XSB/emu/emuloop.c,v retrieving revision 1.193 retrieving revision 1.194 diff -u -r1.193 -r1.194 --- emuloop.c 25 Jul 2008 20:56:50 -0000 1.193 +++ emuloop.c 15 Sep 2008 18:47:45 -0000 1.194 @@ -83,7 +83,7 @@ #include "call_graph_xsb.h" /* incremental evaluation */ #include "cinterf.h" -//FILE *logfile; +// FILE *logfile; /* * Variable ans_var_pos_reg is a pointer to substitution factor of an * answer in the heap. It is used and set in function @@ -2519,7 +2519,7 @@ ADVANCE_PC(size_xxxX); cpreg = lpcreg; psc = (Psc)op1; - // fprintf(logfile,"call %s/%d (h:%p,e:%p,pc:%p,b:%p,hs:%lx)\n",get_name(psc),get_arity(psc),hreg,ereg,lpcreg,breg,top_of_localstk-hreg); + // if (flags[PIL_TRACE]) fprintf(logfile,"%ld:call %s/%d (h:%p,e:%p,pc:%p,b:%p,hs:%lx)\n",(long)(cpu_time() * 1000),get_name(psc),get_arity(psc),hreg,ereg,lpcreg,breg,top_of_localstk-hreg); #ifdef CP_DEBUG pscreg = psc; #endif @@ -2728,7 +2728,7 @@ #ifdef CP_DEBUG pscreg = psc; #endif - // printf("exec %s/%d (h:%p,e:%p,pc:%p,b:%p,hs:%lx)\n",get_name(psc),get_arity(psc),hreg,ereg,lpcreg,breg,top_of_localstk-hreg); + // if (flags[PIL_TRACE]) fprintf(logfile,"%ld:exec %s/%d (h:%p,e:%p,pc:%p,b:%p,hs:%lx)\n",(long)(cpu_time()*1000),get_name(psc),get_arity(psc),hreg,ereg,lpcreg,breg,top_of_localstk-hreg); call_sub(psc); XSB_End_Instr() Index: heap_xsb.c =================================================================== RCS file: /cvsroot/xsb/XSB/emu/heap_xsb.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- heap_xsb.c 20 Aug 2008 19:47:57 -0000 1.71 +++ heap_xsb.c 15 Sep 2008 18:47:46 -0000 1.72 @@ -615,7 +615,7 @@ int rnum_in_reg_array = (reg_arrayptr-reg_array)+1; DECL_GC_PROFILE; - // printf("start gc: e:%p,h:%p,hf:%p\n",ereg,hreg,hfreg); + // printf("start gc(%ld): e:%p,h:%p,hf:%p\n",(long)(cpu_time()*1000),ereg,hreg,hfreg); INIT_GC_PROFILE; if (pflags[GARBAGE_COLLECT] != NO_GC) { num_gc++ ; @@ -679,7 +679,7 @@ } gc_strings = ifStringGC; /* default */ - if (!gc_strings) gc_strings = should_gc_strings(); + gc_strings = should_gc_strings(); // collect strings for any reason? marked = mark_heap(CTXTc arity, &marked_dregs); end_marktime = cpu_time(); @@ -867,7 +867,7 @@ GC_PROFILE_POST_REPORT; #endif /* GC */ - // printf(" end gc, hf:%p,h:%p, space=%d\n",hfreg,hreg,(pb)top_of_localstk - (pb)top_of_heap); + // printf(" end gc(%ld), hf:%p,h:%p, space=%d\n",(long)(cpu_time()*1000),hfreg,hreg,(pb)top_of_localstk - (pb)top_of_heap); return(TRUE); |