|
From: Eyal L. <ey...@ey...> - 2003-03-14 10:34:08
|
Nicholas Nethercote wrote:
>
> On Fri, 14 Mar 2003, Eyal Lebedinsky wrote:
> > I added a line saying
> >
> > ==nnnn== Time: dddddd-hh:mm:ss
>
> > Is there a standard was to request such timestamping? I would
> > not mind learning how to properly add it to the package, with
> > a proper --time-stap=yes option.
>
> Just choose an existing option and copy the way it's done. For example,
> search for "--gdb-attach" and "VG_(clo_GDB_attach)" in the source ("clo"
> is short for "command line option).
OK, here is a humble patch that adds a new option
--time-stamp=[no|yes]
which yields the report below. I find that localtime() fails to account
for timezone when used in valgrind, if anyone can fix it please do so.
$ date ; valgrind --time-stamp=yes ls
Fri Mar 14 21:31:01 EST 2003
==18272== Memcheck, a.k.a. Valgrind, a memory error detector for
x86-linux.
==18272== Copyright (C) 2002, and GNU GPL'd, by Julian Seward.
==18272== Using valgrind-1.9.4, a program instrumentation system for
x86-linux.
==18272== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==18272== Estimated CPU clock rate is 1204 MHz
==18272== For more details, rerun with: -v
==18272==
==18272== Time: 2003/03/14 10:31:01
==18272== pthread_mutex_destroy: mutex is still in use
==18272== at 0x40352E70: pthread_error (vg_libpthread.c:288)
==18272== by 0x40353D3F: __pthread_mutex_destroy
(vg_libpthread.c:998)
==18272== by 0x402CE1CE: closedir (in /lib/libc-2.2.5.so)
==18272== by 0x804A90D: (within /bin/ls)
03.ndx ds1.bat odds setit.bat test-all.bat
build examples okreps ssacssv.err testall
build.bat ids.db prepids ssacssv.log testall.bat
chkunpdf ids.dbg prepids.bat ssarun.log testit.bat
chkunpdf.awk idscosv.err rds stopit.bat tests
chkunpdf.bat idscosv.log rds.awk stress.bat testx03g.lst
cleanit.bat idssrsv.err rds.bat stress1.bat testx03p.lst
data idssrsv.log rule.db systems x
distro makefile rule.ndx t x.c
ds1 makefile.tpl setit t.bat xmit
==18272==
==18272== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1)
==18272== malloc/free: in use at exit: 13833 bytes in 80 blocks.
==18272== malloc/free: 90 allocs, 10 frees, 24577 bytes allocated.
==18272== For a detailed leak analysis, rerun with: --leak-check=yes
==18272== For counts of detected errors, rerun with: -v
--
Eyal Lebedinsky (ey...@ey...) <http://samba.org/eyal/> |