Is there a way to obtain the leak check summary while xml=yes and leak-
check=summary are both enabled?

Scenario 1 (XML Enabled):

cd valgrind/test && gcc -g this_leaks.c 
cd valgrind/test && valgrind -v --log-file=valgrind/test/leak.log --xml=yes --
xml-file=valgrind/test/valgrind.xml --show-reachable=yes --error-limit=no --num-
callers=40 --leak-check=summary --leak-resolution=high valgrind/test/a.out

Result 1: 

--2778--
--2778-- Valgrind options:
--2778--    -v
--2778--    --log-
file=/scm/jenkins/home/jobs/JWC_Valgrind_2/workspace/valgrind/test/leak.log
--2778--    --xml=yes
--2778--    --xml-
file=/scm/jenkins/home/jobs/JWC_Valgrind_2/workspace/valgrind/test/valgrind.xml
--2778--    --show-reachable=yes
--2778--    --error-limit=no
--2778--    --num-callers=40
--2778--    --leak-check=summary
--2778--    --leak-resolution=high
--2778-- Contents of /proc/version:
--2778--   Linux version 2.6.18-164.el5 (mockbu...@builder16.centos.org) (gcc 
version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 03:33:56 EDT 2009
--2778-- Arch and hwcaps: X86, x86-sse1-sse2
--2778-- Page sizes: currently 4096, max supported 4096
--2778-- Valgrind library directory: /usr/local/lib/valgrind
--2778-- Reading syms from /lib/ld-2.5.so (0x54f000)
--2778-- Reading syms from 
/scm/jenkins/home/jobs/JWC_Valgrind_2/workspace/valgrind/test/a.out (0x8048000)
--2778-- Reading syms from /usr/local/lib/valgrind/memcheck-x86-linux 
(0x38000000)
--2778-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
--2778-- REDIR: 0x564730 (index) redirected to 0x38040b33 
(vgPlain_x86_linux_REDIR_FOR_index)
--2778-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-x86-linux.so 
(0x4001000)
--2778-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-x86-
linux.so (0x4003000)
==2778== WARNING: new redirection conflicts with existing -- ignoring it
--2778--     new: 0x00564730 (index               ) R-> 0x04006c50 index
--2778-- REDIR: 0x5648d0 (strlen) redirected to 0x4006e60 (strlen)
--2778-- Reading syms from /lib/libc-2.5.so (0x573000)
--2778-- REDIR: 0x5e36a0 (rindex) redirected to 0x4006b00 (rindex)
--2778-- REDIR: 0x5dee30 (malloc) redirected to 0x4005dd9 (malloc)
--2778-- REDIR: 0x5dc990 (free) redirected to 0x40059f3 (free)
--2778-- REDIR: 0x5e4540 (memset) redirected to 0x4007290 (memset)

Senario 2 (No XML):

cd ${WORKSPACE}/valgrind/test && valgrind -v --log-
file=${WORKSPACE}/valgrind/test/leak.log --show-reachable=yes --error-limit=no -
-num-callers=40 --leak-check=summary --leak-resolution=high 
${WORKSPACE}/valgrind/test/a.out

Result 2: 

==2894== Memcheck, a memory error detector
==2894== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==2894== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==2894== Command: 
/scm/jenkins/home/jobs/JWC_Valgrind_2/workspace/valgrind/test/a.out
==2894== Parent PID: 2893
==2894==
--2894--
--2894-- Valgrind options:
--2894--    -v
--2894--    --log-
file=/scm/jenkins/home/jobs/JWC_Valgrind_2/workspace/valgrind/test/leak.log
--2894--    --show-reachable=yes
--2894--    --error-limit=no
--2894--    --num-callers=40
--2894--    --leak-check=summary
--2894--    --leak-resolution=high
--2894-- Contents of /proc/version:
--2894--   Linux version 2.6.18-164.el5 (mockbu...@builder16.centos.org) (gcc 
version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 03:33:56 EDT 2009
--2894-- Arch and hwcaps: X86, x86-sse1-sse2
--2894-- Page sizes: currently 4096, max supported 4096
--2894-- Valgrind library directory: /usr/local/lib/valgrind
--2894-- Reading syms from /lib/ld-2.5.so (0x54f000)
--2894-- Reading syms from 
/scm/jenkins/home/jobs/JWC_Valgrind_2/workspace/valgrind/test/a.out (0x8048000)
--2894-- Reading syms from /usr/local/lib/valgrind/memcheck-x86-linux 
(0x38000000)
--2894--    object doesn't have a dynamic symbol table
--2894-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
--2894-- REDIR: 0x564730 (index) redirected to 0x38040b33 
(vgPlain_x86_linux_REDIR_FOR_index)
--2894-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-x86-linux.so 
(0x4001000)
--2894-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-x86-
linux.so (0x4003000)
==2894== WARNING: new redirection conflicts with existing -- ignoring it
--2894--     new: 0x00564730 (index               ) R-> 0x04006c50 index
--2894-- REDIR: 0x5648d0 (strlen) redirected to 0x4006e60 (strlen)
--2894-- Reading syms from /lib/libc-2.5.so (0x573000)
--2894-- REDIR: 0x5e36a0 (rindex) redirected to 0x4006b00 (rindex)
--2894-- REDIR: 0x5dee30 (malloc) redirected to 0x4005dd9 (malloc)
--2894-- REDIR: 0x5dc990 (free) redirected to 0x40059f3 (free)
--2894-- REDIR: 0x5e4540 (memset) redirected to 0x4007290 (memset)
==2894==
==2894== HEAP SUMMARY:
==2894==     in use at exit: 4 bytes in 1 blocks
==2894==   total heap usage: 1 allocs, 0 frees, 4 bytes allocated
==2894==
==2894== Searching for pointers to 1 not-freed blocks
==2894== Checked 48,076 bytes
==2894==
==2894== LEAK SUMMARY:
==2894==    definitely lost: 4 bytes in 1 blocks
==2894==    indirectly lost: 0 bytes in 0 blocks
==2894==      possibly lost: 0 bytes in 0 blocks
==2894==    still reachable: 0 bytes in 0 blocks
==2894==         suppressed: 0 bytes in 0 blocks
==2894== Rerun with --leak-check=full to see details of leaked memory
==2894==
==2894== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 12 from 8)
--2894--
--2894-- used_suppression:     12 dl-hack3
==2894==
==2894== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 12 from 8)





------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to