Hello, for the Valgrind simulations inside our company I wrote a tool to
prettify/format the output from Valgrind-Memcheck logs while adding
additional information to the output

   - Combines the valgrind logs from many test runs
   - Aggregates multiple occurrences of issues with same stack trace into
   one
   - Full paths to source files
   - Indexes repos to find the source files
   - Source code context for each line
   - Git/BK repo annotation of source code
   - Simple regexp waivers instead of suppressions
   - Highlights offending source code line

If there is interest in it, I can look into putting it up on GitHub. Here
is an example output
+-------------------------------------------------------------------------------------------------+-----------------+
|
Log
| Occurrences     |
+-------------------------------------------------------------------------------------------------+-----------------+
|
Total
| 13              |
+-------------------------------------------------------------------------------------------------+-----------------+
|
./<test_path>/<valgrind_log>
| 13              |
+-------------------------------------------------------------------------------------------------+-----------------+
{
Invalid read of size \d+
    at: std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(std::string const&) (in
/<path>/libstdc++.so.6.0.9)
    by: Array::Array(Array const&) (/<repo>/<location_in_repo>/Array.h:49)
0047:  2012/12/10 user1    1.5       | source code here
0048:  2011/07/11 user2    1.1       |
0049:* 2013/08/05 user1    1.13.2.2  | valgrind issue here
0050:  2012/11/10 user1    1.4       | more source here
0051:  2012/11/10 user1    1.4       |
    by: Array::DumpArray() (/<repo>/<location_in_repo>/Array.cpp:1221)
1219:  2012/12/10 user2    1.8       |   // Iterate through the Array
1220:  2012/12/10 user2    1.8       |   while(itr != m_ArrayMap.end()){
1221:* 2013/08/05 user2    1.18.2.2  |     Array aInfo = itr->second;
1222:  2013/08/05 user2    1.18.2.2  |     logfile << "Array
name:             \t" << itr->first.c_str() << endl;
1223:  2013/08/05 user2    1.18.2.2  |     logfile << "\tnumber of
entries:      " << aInfo.sEntries.c_str() << endl;
...
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to