From: Eric M. M. <emo...@be...> - 2003-05-05 18:37:24
|
All, I just started using valgrind to debug my program. To date, the program has not crashed and so I have not seen if valgrind will flag any errors, but I am trying to understand the output for the normal case. I run valgrind from within a shell script that I'll be asking my users to execute. The shell script is as follows: #!/bin/sh LD_LIBRARY_PATH=/home/emonsler/usr/local/lib:/usr/lib:/usr/openwin/lib:/usr/local/lib /home/emonsler/testing/bin/valgrind --num-callers=8 --logfile=/tmp/LindaCrash --workaround-gcc296-bugs=yes --leak-check=yes --run-libc-freeres=no -v /home/emonsler/usr/local/bin/avdisplay2.55 $* Below is the error summary at exit of my program. I understand the 195000 bytes in 3 block possibly lost, and it isn't a bug. The part that I don't understand, and can't seem to find an explanation for in the documents, is the section running from the line of "TT/TC:" down to "reg-alloc:". Where are those documented? Are the values shown errors or warnings? Thanks in advance, valgrind looks very promising and I wish that I had known about it when first debugging this program. Please cc:me on responses, as I am not subscribed to the list. TIA, Eric Monsler ==9748== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 28 from 1) --9748-- --9748-- supp: 28 write(buf)/libc-2.2.4.so/libX11.so.6.2/libX11.so.6.2(Param) ==9748== malloc/free: in use at exit: 476605 bytes in 3358 blocks. ==9748== malloc/free: 13320394 allocs, 13317036 frees, 2516779165 bytes allocate d. ==9748== ==9748== searching for pointers to 3358 not-freed blocks. ==9748== checked 8135900 bytes. ==9748== ==9748== 195000 bytes in 3 blocks are possibly lost in loss record 72 of 72 ==9748== at 0x40169340: malloc (vg_clientfuncs.c:103) ==9748== by 0x40485AF6: g_malloc (gmem.c:177) ==9748== by 0x80636EE: vReadIncomingUDP (avd_disp_msgs.c:1439) ==9748== by 0x403B6A1B: gdk_io_invoke (gdkevents.c:882) ==9748== by 0x4048274B: g_io_unix_dispatch (giounix.c:137) ==9748== by 0x4048453B: g_main_dispatch (gmain.c:656) ==9748== by 0x40484D6D: g_main_iterate (gmain.c:877) ==9748== by 0x40484F5B: g_main_run (gmain.c:935) ==9748== ==9748== LEAK SUMMARY: ==9748== definitely lost: 0 bytes in 0 blocks. ==9748== possibly lost: 195000 bytes in 3 blocks. ==9748== still reachable: 281605 bytes in 3355 blocks. ==9748== suppressed: 0 bytes in 0 blocks. ==9748== Reachable blocks (those to which a pointer was found) are not shown. ==9748== To see them, rerun with: --show-reachable=yes ==9748== --9748-- TT/TC: 0 tc sectors discarded. --9748-- 24798 chainings, 0 unchainings. --9748-- translate: new 32046 (514035 -> 7150204; ratio 139:10) --9748-- discard 0 (0 -> 0; ratio 0:10). --9748-- dispatch: 8293450000 jumps (bb entries), of which 1422416883 (17%) wer e unchained. --9748-- 165870/31416415 major/minor sched events. 2408860 tt_fast m isses. --9748-- reg-alloc: 4906 t-req-spill, 1313936+30807 orig+spill uis, 158696 total -reg-r. --9748-- sanity: 165871 cheap, 6635 expensive checks. --9748-- ccalls: 161306 C calls, 57% saves+restores avoided (544328 bytes) --9748-- 205701 args, avg 0.88 setup instrs each (45330 bytes) --9748-- 0% clear the stack (483918 bytes) --9748-- 63626 retvals, 35% of reg-reg movs avoided (43554 bytes) ( |