You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(20) |
2
(19) |
3
(7) |
|
4
(13) |
5
(24) |
6
(9) |
7
(12) |
8
(8) |
9
(34) |
10
(28) |
|
11
(20) |
12
(23) |
13
(12) |
14
(10) |
15
(15) |
16
(24) |
17
(26) |
|
18
(17) |
19
(14) |
20
(14) |
21
(8) |
22
(12) |
23
(22) |
24
(10) |
|
25
(21) |
26
(21) |
27
(18) |
28
(8) |
29
(13) |
30
(15) |
|
|
From: <sv...@va...> - 2007-11-29 03:08:33
|
Author: sewardj
Date: 2007-11-29 03:08:32 +0000 (Thu, 29 Nov 2007)
New Revision: 7249
Log:
Changes to make Memcheck work sanely on recent incarnations of AIX 5.3:
* add a few more syscall wrappers, and fix a couple of buggy ones
* intercept strcmp et al in a few more libraries
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-aix5.h
trunk/coregrind/m_syswrap/syswrap-aix5.c
trunk/coregrind/m_syswrap/syswrap-ppc32-aix5.c
trunk/coregrind/m_syswrap/syswrap-ppc64-aix5.c
trunk/memcheck/mc_replace_strmem.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-aix5.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-aix5.h 2007-11-29 03:06:25 UTC (rev 7248)
+++ trunk/coregrind/m_syswrap/priv_syswrap-aix5.h 2007-11-29 03:08:32 UTC (rev 7249)
@@ -71,7 +71,6 @@
DECL_TEMPLATE(aix5, sys___libc_sbrk);
DECL_TEMPLATE(aix5, sys___msleep);
-DECL_TEMPLATE(aix5, sys__clock_gettime);
DECL_TEMPLATE(aix5, sys__clock_settime);
DECL_TEMPLATE(aix5, sys__exit);
DECL_TEMPLATE(aix5, sys__fp_fpscrx_sc);
@@ -104,6 +103,7 @@
DECL_TEMPLATE(aix5, sys_connext);
DECL_TEMPLATE(aix5, sys_execve);
DECL_TEMPLATE(aix5, sys_finfo);
+DECL_TEMPLATE(aix5, sys_fstatfs);
DECL_TEMPLATE(aix5, sys_fstatx);
DECL_TEMPLATE(aix5, sys_fsync);
DECL_TEMPLATE(aix5, sys_getdirent);
@@ -131,6 +131,7 @@
DECL_TEMPLATE(aix5, sys_kread);
DECL_TEMPLATE(aix5, sys_kreadv);
DECL_TEMPLATE(aix5, sys_kthread_ctl);
+DECL_TEMPLATE(aix5, sys_ktruncate);
DECL_TEMPLATE(aix5, sys_kwaitpid);
DECL_TEMPLATE(aix5, sys_kwrite);
DECL_TEMPLATE(aix5, sys_kwritev);
@@ -141,6 +142,7 @@
DECL_TEMPLATE(aix5, sys_mkdir);
DECL_TEMPLATE(aix5, sys_mmap);
DECL_TEMPLATE(aix5, sys_mprotect);
+DECL_TEMPLATE(aix5, sys_mntctl);
DECL_TEMPLATE(aix5, sys_munmap);
DECL_TEMPLATE(aix5, sys_naccept);
DECL_TEMPLATE(aix5, sys_ngetpeername);
Modified: trunk/coregrind/m_syswrap/syswrap-aix5.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-aix5.c 2007-11-29 03:06:25 UTC (rev 7248)
+++ trunk/coregrind/m_syswrap/syswrap-aix5.c 2007-11-29 03:08:32 UTC (rev 7249)
@@ -479,12 +479,6 @@
/* __unload is handled in the platform-specific files. */
-PRE(sys__clock_gettime)
-{
- PRINT("_clock_gettime (UNDOCUMENTED) ( %d, %p )", ARG1, ARG2);
- PRE_REG_READ2(int, "_clock_gettime", int, arg1, int, arg2);
-}
-
PRE(sys__clock_settime)
{
PRINT("_clock_settime (UNDOCUMENTED) ( %d, %p )", ARG1, ARG2);
@@ -1069,6 +1063,17 @@
POST_MEM_WRITE( ARG3, ARG4 );
}
+PRE(sys_fstatfs)
+{
+ PRINT("sys_fstatfs ( %ld, %p )", ARG1, ARG2);
+ PRE_REG_READ2(UWord, "fstatfs", UWord, fd, struct statfs *, buf);
+ PRE_MEM_WRITE( "fstatfs(buf)", ARG2, sizeof(struct statfs) );
+}
+POST(sys_fstatfs)
+{
+ POST_MEM_WRITE( ARG2, sizeof(struct statfs) );
+}
+
PRE(sys_fstatx)
{
PRINT("fstatx ( %ld, %p, %ld, %ld )", ARG1, ARG2, ARG3, ARG4 );
@@ -1599,6 +1604,13 @@
PRINT("kthread_ctl (BOGUS HANDLER)");
}
+PRE(sys_ktruncate)
+{
+ PRINT("ktruncate( %p(%s), %lx, %lx )", ARG1,ARG1, ARG2, ARG3 );
+ PRE_REG_READ3(int, "ktruncate", char*, path, long, arg2, long, arg3 );
+ PRE_MEM_RASCIIZ( "ktruncate(path)", ARG1 );
+}
+
PRE(sys_kwaitpid)
{
/* Note: args 1 and 2 (status, pid) opposite way round
@@ -1702,6 +1714,27 @@
VG_(discard_translations)( addr, len, "POST(sys_mmap)" );
}
+PRE(sys_mntctl)
+{
+ PRINT("mntctl ( %ld, %ld, %p )", ARG1, ARG2, ARG3 );
+ PRE_REG_READ3(long, "mntctl", long, command, long, size, char*, buffer);
+ PRE_MEM_WRITE( "mntctl(buffer)", ARG3, ARG2 );
+}
+POST(sys_mntctl)
+{
+ vg_assert(SUCCESS);
+ if (RES == 0) {
+ /* Buffer too small. First word is the real required size. */
+ POST_MEM_WRITE( ARG3, sizeof(Word) );
+ } else {
+ /* RES is the number of struct vmount's written to the buf. But
+ these are variable length and to find the end would require
+ inspecting each in turn. So be simple and just mark the
+ entire buffer as defined. */
+ POST_MEM_WRITE( ARG3, ARG2 );
+ }
+}
+
PRE(sys_mprotect)
{
PRINT("mprotect (BOGUS HANDLER)( %p, %ld, %p )", ARG1, ARG2, ARG3);
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-aix5.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-aix5.c 2007-11-29 03:06:25 UTC (rev 7248)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-aix5.c 2007-11-29 03:08:32 UTC (rev 7249)
@@ -340,6 +340,7 @@
DECL_TEMPLATE(ppc32_aix5, sys___loadx);
DECL_TEMPLATE(ppc32_aix5, sys___unload);
+DECL_TEMPLATE(ppc32_aix5, sys__clock_gettime);
DECL_TEMPLATE(ppc32_aix5, sys_thread_setmymask_fast);
DECL_TEMPLATE(ppc32_aix5, sys_thread_setstate);
DECL_TEMPLATE(ppc32_aix5, sys_FAKE_SIGRETURN);
@@ -452,6 +453,20 @@
ML_(aix5_rescan_procmap_after_load_or_unload)();
}
+PRE(sys__clock_gettime)
+{
+ /* Seems like ARG3 points at a destination buffer? */
+ /* _clock_gettime (UNDOCUMENTED) ( 0, 0xA, 0x2FF21808 ) */
+ PRINT("_clock_gettime (UNDOCUMENTED) ( %d, %p, %p )", ARG1, ARG2, ARG3 );
+ PRE_REG_READ3(int, "_clock_gettime", int, arg1, int, arg2, void*, arg3);
+ PRE_MEM_WRITE( "_clock_gettime(dst)", ARG3, sizeof(struct timespec) );
+}
+POST(sys__clock_gettime)
+{
+ vg_assert(SUCCESS);
+ POST_MEM_WRITE( ARG3, sizeof(struct timespec) );
+}
+
PRE(sys_thread_setmymask_fast)
{
/* args: a 64-bit signal mask in ARG1/2.*/
@@ -730,7 +745,7 @@
PLAXY(__NR_AIX5___loadx, sys___loadx),
AIXX_(__NR_AIX5___msleep, sys___msleep),
PLAXY(__NR_AIX5___unload, sys___unload),
- AIXX_(__NR_AIX5__clock_gettime, sys__clock_gettime),
+ PLAXY(__NR_AIX5__clock_gettime, sys__clock_gettime),
AIXX_(__NR_AIX5__clock_settime, sys__clock_settime),
AIXX_(__NR_AIX5__exit, sys__exit),
AIXX_(__NR_AIX5__fp_fpscrx_sc, sys__fp_fpscrx_sc),
@@ -763,6 +778,7 @@
AIXX_(__NR_AIX5_connext, sys_connext),
AIXX_(__NR_AIX5_execve, sys_execve),
AIXXY(__NR_AIX5_finfo, sys_finfo),
+ AIXXY(__NR_AIX5_fstatfs, sys_fstatfs),
AIXXY(__NR_AIX5_fstatx, sys_fstatx),
AIXX_(__NR_AIX5_fsync, sys_fsync),
AIXXY(__NR_AIX5_getdirent, sys_getdirent),
@@ -790,6 +806,7 @@
AIXXY(__NR_AIX5_kread, sys_kread),
AIXXY(__NR_AIX5_kreadv, sys_kreadv),
AIXX_(__NR_AIX5_kthread_ctl, sys_kthread_ctl),
+ AIXX_(__NR_AIX5_ktruncate, sys_ktruncate),
AIXXY(__NR_AIX5_kwaitpid, sys_kwaitpid),
AIXX_(__NR_AIX5_kwrite, sys_kwrite),
AIXX_(__NR_AIX5_kwritev, sys_kwritev),
@@ -799,6 +816,7 @@
AIXX_(__NR_AIX5_lseek, sys_lseek),
AIXX_(__NR_AIX5_mkdir, sys_mkdir),
AIXXY(__NR_AIX5_mmap, sys_mmap),
+ AIXXY(__NR_AIX5_mntctl, sys_mntctl),
AIXXY(__NR_AIX5_mprotect, sys_mprotect),
AIXXY(__NR_AIX5_munmap, sys_munmap),
AIXXY(__NR_AIX5_naccept, sys_naccept),
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-aix5.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-aix5.c 2007-11-29 03:06:25 UTC (rev 7248)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-aix5.c 2007-11-29 03:08:32 UTC (rev 7249)
@@ -338,6 +338,7 @@
#define PRE(name) DEFN_PRE_TEMPLATE(ppc64_aix5, name)
#define POST(name) DEFN_POST_TEMPLATE(ppc64_aix5, name)
+DECL_TEMPLATE(ppc64_aix5, sys__clock_gettime);
DECL_TEMPLATE(ppc64_aix5, sys__fp_fpscrx64_);
DECL_TEMPLATE(ppc64_aix5, sys_kload);
DECL_TEMPLATE(ppc64_aix5, sys_kunload64);
@@ -345,6 +346,20 @@
DECL_TEMPLATE(ppc64_aix5, sys_FAKE_SIGRETURN);
+PRE(sys__clock_gettime)
+{
+ /* Seems like ARG2 points at a destination buffer? */
+ /* _clock_gettime (UNDOCUMENTED) ( 0, 0xA, 0x2FF21808 ) */
+ PRINT("_clock_gettime (UNDOCUMENTED) ( %d, %p, %p )", ARG1, ARG2, ARG3 );
+ PRE_REG_READ3(int, "_clock_gettime", int, arg1, int, arg2, void*, arg3);
+ PRE_MEM_WRITE( "_clock_gettime(dst)", ARG2, sizeof(struct timespec) );
+}
+POST(sys__clock_gettime)
+{
+ vg_assert(SUCCESS);
+ POST_MEM_WRITE( ARG2, sizeof(struct timespec) );
+}
+
PRE(sys__fp_fpscrx64_)
{
PRINT("_fp_fpscrx64_ (BOGUS HANDLER)");
@@ -638,6 +653,7 @@
= {
AIXXY(__NR_AIX5___libc_sbrk, sys___libc_sbrk),
AIXX_(__NR_AIX5___msleep, sys___msleep),
+ PLAXY(__NR_AIX5__clock_gettime, sys__clock_gettime),
AIXX_(__NR_AIX5__exit, sys__exit),
PLAX_(__NR_AIX5__fp_fpscrx64_, sys__fp_fpscrx64_),
AIXX_(__NR_AIX5__getpid, sys__getpid),
@@ -660,6 +676,8 @@
AIXX_(__NR_AIX5_close, sys_close),
AIXX_(__NR_AIX5_connext, sys_connext),
AIXX_(__NR_AIX5_execve, sys_execve),
+ AIXXY(__NR_AIX5_finfo, sys_finfo),
+ AIXXY(__NR_AIX5_fstatfs, sys_fstatfs),
AIXXY(__NR_AIX5_fstatx, sys_fstatx),
AIXXY(__NR_AIX5_getdirent, sys_getdirent),
AIXXY(__NR_AIX5_getdirent64, sys_getdirent64),
@@ -683,6 +701,7 @@
AIXXY(__NR_AIX5_kread, sys_kread),
AIXXY(__NR_AIX5_kreadv, sys_kreadv),
AIXX_(__NR_AIX5_kthread_ctl, sys_kthread_ctl),
+ AIXX_(__NR_AIX5_ktruncate, sys_ktruncate),
PLAXY(__NR_AIX5_kunload64, sys_kunload64),
AIXXY(__NR_AIX5_kwaitpid, sys_kwaitpid),
AIXX_(__NR_AIX5_kwrite, sys_kwrite),
@@ -690,6 +709,7 @@
AIXX_(__NR_AIX5_lseek, sys_lseek),
AIXX_(__NR_AIX5_mkdir, sys_mkdir),
AIXXY(__NR_AIX5_mmap, sys_mmap),
+ AIXXY(__NR_AIX5_mntctl, sys_mntctl),
AIXXY(__NR_AIX5_mprotect, sys_mprotect),
AIXXY(__NR_AIX5_munmap, sys_munmap),
AIXXY(__NR_AIX5_ngetpeername, sys_ngetpeername),
Modified: trunk/memcheck/mc_replace_strmem.c
===================================================================
--- trunk/memcheck/mc_replace_strmem.c 2007-11-29 03:06:25 UTC (rev 7248)
+++ trunk/memcheck/mc_replace_strmem.c 2007-11-29 03:08:32 UTC (rev 7249)
@@ -819,6 +819,9 @@
Str5FNs(libgdkZdso) /* libgdk.so */
Str5FNs(libcursesZdaZLshr42ZdoZR) /* libcurses.a(shr42.o) */
Str5FNs(libqtZda) /* libqt.a */
+Str5FNs(ZaZLlibglibZhZaZdsoZaZR) /* *(libglib-*.so*) */
+Str5FNs(ZaZLlibfontconfigZdsoZaZR) /* *(libfontconfig.so*) */
+Str5FNs(libQtZaa) /* libQt*.a */
#endif
#if defined(VGP_ppc64_aix5)
Str5FNs(NONE) /* in main exe */
@@ -832,6 +835,9 @@
Str5FNs(libCZdaZLshrcoreZu64ZdoZR) /* libC.a(shrcore_64.o) */
Str5FNs(libmpiZurZdaZLmpci64ZurZdoZR) /* libmpi_r.a(mpci64_r.o) */
Str5FNs(libqtZda) /* libqt.a */
+Str5FNs(ZaZLlibglibZhZaZdsoZaZR) /* *(libglib-*.so*) */
+Str5FNs(ZaZLlibfontconfigZdsoZaZR) /* *(libfontconfig.so*) */
+Str5FNs(libQtZaa) /* libQt*.a */
#endif
|
|
From: <sv...@va...> - 2007-11-29 03:07:24
|
Author: sewardj
Date: 2007-11-29 03:06:25 +0000 (Thu, 29 Nov 2007)
New Revision: 7248
Log:
Don't be confused by archive (.a) files which contain both a 32-bit
and a 64-bit version of the same object (with the same name). Prior
to this, it would sometimes attempt to read debug info from the wrong
version of the object, complain that the magic number wasn't right,
and so end up reading nothing at all for that object.
Modified:
trunk/coregrind/m_debuginfo/readxcoff.c
Modified: trunk/coregrind/m_debuginfo/readxcoff.c
===================================================================
--- trunk/coregrind/m_debuginfo/readxcoff.c 2007-11-28 01:55:29 UTC (rev 7247)
+++ trunk/coregrind/m_debuginfo/readxcoff.c 2007-11-29 03:06:25 UTC (rev 7248)
@@ -1708,7 +1708,7 @@
# endif
if (n_oimage < sizeof(FILHDR))
- BAD("readxcoff.c: XCOFF object file header is implausibly small");
+ BAD("readxcoff.c: XCOFF object file header is implausibly small (2)");
FILHDR* t_filehdr = (FILHDR*)cursor;
cursor += sizeof(FILHDR);
@@ -2233,7 +2233,7 @@
peer at the archive's fixed header. */
if (n_image < sizeof(FL_HDR)) {
- ML_(symerr)("XCOFF archive to small for fixed header");
+ ML_(symerr)("XCOFF archive too small for fixed header");
goto done;
}
@@ -2269,7 +2269,7 @@
/* should be: backquote newline */
if (mt_hdr->_ar_name.ar_name[0] != 0x60 /* backquote */
|| mt_hdr->_ar_name.ar_name[1] != 0x0A /* \n */) {
- ML_(symerr)("XCOFF archive member table header is invalid");
+ ML_(symerr)("XCOFF archive member table header is invalid");
goto done;
}
@@ -2304,61 +2304,89 @@
i, (Int)ascii_to_ULong(data + 20 + 20*i, 20));
}
- UInt objoff = 0; /* none of the archive members can have zero
- offset, since the fixed header is at the
- start of the file. */
+ UChar* p = data + 20 + 20*nmembers;
- UChar* p = data + 20 + 20*nmembers;
for (i = 0; i < nmembers; i++) {
- if (0 == VG_(strcmp)(p, o_name)) {
- objoff = ascii_to_ULong(data + 20 + 20*i, 20);
- if (SHOW && SHOW_AR_DETAILS)
- VG_(printf)("got offset = %u\n", objoff);
- }
- while (*p) {
- if (SHOW && SHOW_AR_DETAILS)
- VG_(printf)("%c", *p);
- p++;
- }
+
+ if (0 != VG_(strcmp)(p, o_name))
+ goto move_on;
+
+ UInt objoff = ascii_to_ULong(data + 20 + 20*i, 20);
+
if (SHOW && SHOW_AR_DETAILS)
- VG_(printf)("\n");
- p++;
- }
+ VG_(printf)("got offset = %u\n", objoff);
- vg_assert(ok == False);
+ vg_assert(ok == False);
- if (objoff == 0) {
- ML_(symerr)("can't find object in XCOFF archive file");
- goto done;
- }
+ /* Sanity check the selected member */
+ UChar* o_hdrC = image + objoff;
+ if (o_hdrC + sizeof(AR_HDR) >= image + n_image) {
+ ML_(symerr)("XCOFF archive member header exceeds image");
+ goto done;
+ }
+ AR_HDR* o_hdr = (AR_HDR*)o_hdrC;
+ UWord o_size = (UWord)ascii_to_ULong(&o_hdr->ar_size, 20);
+ UChar* o_data = o_hdrC + sizeof(AR_HDR)
+ + (UWord)ascii_to_ULong(&o_hdr->ar_namlen,4);
- /* Sanity check the selected member */
- UChar* o_hdrC = image + objoff;
- if (o_hdrC + sizeof(AR_HDR) >= image + n_image) {
- ML_(symerr)("XCOFF archive member header exceeds image");
- goto done;
- }
- AR_HDR* o_hdr = (AR_HDR*)o_hdrC;
- UWord o_size = (UWord)ascii_to_ULong(&o_hdr->ar_size, 20);
- UChar* o_data = o_hdrC + sizeof(AR_HDR)
- + (UWord)ascii_to_ULong(&o_hdr->ar_namlen,4);
+ /* ALIGN */
+ if ( ((UWord)o_data) & 1 ) o_data++;
- /* ALIGN */
- if ( ((UWord)o_data) & 1 ) o_data++;
+ if (SHOW)
+ VG_(printf)("member data = %p, size = %ld\n", o_data, o_size);
- if (SHOW)
- VG_(printf)("member data = %p, size = %ld\n", o_data, o_size);
+ if (!(o_data >= image && o_data + o_size <= image + n_image)) {
+ ML_(symerr)("XCOFF archive member exceeds image");
+ goto done;
+ }
- if (o_data >= image && o_data + o_size <= image + n_image) {
+ if (o_size < sizeof(FILHDR)) {
+ ML_(symerr)("XCOFF object file header is implausibly small (1)");
+ goto done;
+ }
+
+ /* It's the right name, but need to also check the magic
+ number, since some archives contain both a 32-bit and
+ 64-bit version of the same object. */
+ FILHDR* t_filhdr = (FILHDR*)o_data;
+# if defined(VGP_ppc32_aix5)
+ if (t_filhdr->f_magic == 0x01F7 /* XCOFF64 */) {
+ if (0)
+ VG_(printf)("Skipping 64-bit archive on 32-bit platform\n");
+ goto move_on;
+ }
+# elif defined(VGP_ppc64_aix5)
+ if (t_filhdr->f_magic == 0x01DF /* XCOFF32 */) {
+ if (0)
+ VG_(printf)("Skipping 32-bit archive on 64-bit platform\n");
+ goto move_on;
+ }
+# endif
+
if (SHOW && SHOW_AR_DETAILS)
VG_(printf)("\nimage: %p-%p object: %p-%p\n\n",
image, image+n_image-1, o_data, o_data+o_size-1);
ok = read_xcoff_mapped_object( si, o_data, o_size,
data_avma, data_alen );
- } else {
- ML_(symerr)("XCOFF archive member exceeds image");
+ goto done;
+
+ vg_assert(0);
+ /* NOTREACHED */
+
+ move_on:
+ while (*p) {
+ if (SHOW && SHOW_AR_DETAILS)
+ VG_(printf)("%c", *p);
+ p++;
+ }
+ if (SHOW && SHOW_AR_DETAILS)
+ VG_(printf)("\n");
+ p++;
}
+ vg_assert(i == nmembers);
+ ML_(symerr)("can't find object in XCOFF archive file");
+
done:
if (image) {
VG_(am_munmap_valgrind)( (Addr)image, n_image );
|
|
From: <js...@ac...> - 2007-11-29 01:11:39
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-11-29 02:00:01 CET Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 286 tests, 25 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... failed Last 20 lines of verbose log follow echo Checking out valgrind source tree ... svn co svn://svn.valgrind.org/valgrind/trunk -r {2007-11-28T02:00:01} valgrind svn: Unknown hostname 'svn.valgrind.org' ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Nov 29 02:00:48 2007 --- new.short Thu Nov 29 02:11:40 2007 *************** *** 1,7 **** ! Checking out valgrind source tree ... failed ! Last 20 lines of verbose log follow echo - Checking out valgrind source tree ... svn co svn://svn.valgrind.org/valgrind/trunk -r {2007-11-28T02:00:01} valgrind - svn: Unknown hostname 'svn.valgrind.org' --- 1,37 ---- ! Checking out valgrind source tree ... done ! Configuring valgrind ... done ! Building valgrind ... done ! Running regression tests ... failed ! Regression test results follow ! ! == 286 tests, 25 stderr failures, 2 stdout failures, 0 post failures == ! memcheck/tests/deep_templates (stdout) ! memcheck/tests/leak-cycle (stderr) ! memcheck/tests/leak-tree (stderr) ! memcheck/tests/pointer-trace (stderr) ! none/tests/faultstatus (stderr) ! none/tests/fdleak_cmsg (stderr) ! none/tests/mremap (stderr) ! none/tests/mremap2 (stdout) ! helgrind/tests/hg02_deadlock (stderr) ! helgrind/tests/hg03_inherit (stderr) ! helgrind/tests/hg04_race (stderr) ! helgrind/tests/hg05_race2 (stderr) ! helgrind/tests/tc01_simple_race (stderr) ! helgrind/tests/tc05_simple_race (stderr) ! helgrind/tests/tc06_two_races (stderr) ! helgrind/tests/tc07_hbl1 (stderr) ! helgrind/tests/tc08_hbl2 (stderr) ! helgrind/tests/tc09_bad_unlock (stderr) ! helgrind/tests/tc11_XCHG (stderr) ! helgrind/tests/tc14_laog_dinphils (stderr) ! helgrind/tests/tc16_byterace (stderr) ! helgrind/tests/tc17_sembar (stderr) ! helgrind/tests/tc19_shadowmem (stderr) ! helgrind/tests/tc20_verifywrap (stderr) ! helgrind/tests/tc21_pthonce (stderr) ! helgrind/tests/tc22_exit_w_lock (stderr) ! helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Tom H. <th...@cy...> - 2007-11-28 03:43:01
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-11-28 03:14:59 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 319 tests, 60 stderr failures, 1 stdout failure, 28 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/noisy_child (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/basic2 (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/hg06_readshared (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo else rm -f ".deps/sigalrm.Tpo"; exit 1; \ fi sigalrm.c: In function `thread_func': sigalrm.c:53: warning: implicit declaration of function `clock_nanosleep' sigalrm.c:53: `CLOCK_MONOTONIC' undeclared (first use in this function) sigalrm.c:53: (Each undeclared identifier is reported only once sigalrm.c:53: for each function it appears in.) sigalrm.c: In function `main': sigalrm.c:89: `CLOCK_MONOTONIC' undeclared (first use in this function) make[5]: *** [sigalrm.o] Error 1 make[5]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd/tests' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd/tests' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind' make: *** [check] Error 2 ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Nov 28 03:22:26 2007 --- new.short Wed Nov 28 03:43:06 2007 *************** *** 6,27 **** ! Last 20 lines of verbose log follow echo ! else rm -f ".deps/sigalrm.Tpo"; exit 1; \ ! fi ! sigalrm.c: In function `thread_func': ! sigalrm.c:53: warning: implicit declaration of function `clock_nanosleep' ! sigalrm.c:53: `CLOCK_MONOTONIC' undeclared (first use in this function) ! sigalrm.c:53: (Each undeclared identifier is reported only once ! sigalrm.c:53: for each function it appears in.) ! sigalrm.c: In function `main': ! sigalrm.c:89: `CLOCK_MONOTONIC' undeclared (first use in this function) ! make[5]: *** [sigalrm.o] Error 1 ! make[5]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd/tests' ! make[4]: *** [check-am] Error 2 ! make[4]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd/tests' ! make[3]: *** [check-recursive] Error 1 ! make[3]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd/tests' ! make[2]: *** [check-recursive] Error 1 ! make[2]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind/exp-drd' ! make[1]: *** [check-recursive] Error 1 ! make[1]: Leaving directory `/tmp/vgtest/2007-11-28/valgrind' ! make: *** [check] Error 2 --- 6,99 ---- ! Regression test results follow ! ! == 319 tests, 60 stderr failures, 1 stdout failure, 28 post failures == ! memcheck/tests/addressable (stderr) ! memcheck/tests/badjump (stderr) ! memcheck/tests/describe-block (stderr) ! memcheck/tests/erringfds (stderr) ! memcheck/tests/leak-0 (stderr) ! memcheck/tests/leak-cycle (stderr) ! memcheck/tests/leak-pool-0 (stderr) ! memcheck/tests/leak-pool-1 (stderr) ! memcheck/tests/leak-pool-2 (stderr) ! memcheck/tests/leak-pool-3 (stderr) ! memcheck/tests/leak-pool-4 (stderr) ! memcheck/tests/leak-pool-5 (stderr) ! memcheck/tests/leak-regroot (stderr) ! memcheck/tests/leak-tree (stderr) ! memcheck/tests/long_namespace_xml (stderr) ! memcheck/tests/match-overrun (stderr) ! memcheck/tests/noisy_child (stderr) ! memcheck/tests/partial_load_dflt (stderr) ! memcheck/tests/partial_load_ok (stderr) ! memcheck/tests/partiallydefinedeq (stderr) ! memcheck/tests/pointer-trace (stderr) ! memcheck/tests/sigkill (stderr) ! memcheck/tests/stack_changes (stderr) ! memcheck/tests/x86/bug152022 (stderr) ! memcheck/tests/x86/scalar (stderr) ! memcheck/tests/x86/scalar_supp (stderr) ! memcheck/tests/x86/xor-undef-x86 (stderr) ! memcheck/tests/xml1 (stderr) ! massif/tests/alloc-fns-A (post) ! massif/tests/alloc-fns-B (post) ! massif/tests/basic (post) ! massif/tests/basic2 (post) ! massif/tests/big-alloc (post) ! massif/tests/culling1 (stderr) ! massif/tests/culling2 (stderr) ! massif/tests/custom_alloc (post) ! massif/tests/deep-A (post) ! massif/tests/deep-B (stderr) ! massif/tests/deep-B (post) ! massif/tests/deep-C (stderr) ! massif/tests/deep-C (post) ! massif/tests/deep-D (post) ! massif/tests/ignoring (post) ! massif/tests/insig (post) ! massif/tests/long-time (post) ! massif/tests/new-cpp (post) ! massif/tests/null (post) ! massif/tests/one (post) ! massif/tests/overloaded-new (post) ! massif/tests/peak (post) ! massif/tests/peak2 (stderr) ! massif/tests/peak2 (post) ! massif/tests/realloc (stderr) ! massif/tests/realloc (post) ! massif/tests/thresholds_0_0 (post) ! massif/tests/thresholds_0_10 (post) ! massif/tests/thresholds_10_0 (post) ! massif/tests/thresholds_10_10 (post) ! massif/tests/thresholds_5_0 (post) ! massif/tests/thresholds_5_10 (post) ! massif/tests/zero1 (post) ! massif/tests/zero2 (post) ! none/tests/mremap (stderr) ! none/tests/mremap2 (stdout) ! helgrind/tests/hg01_all_ok (stderr) ! helgrind/tests/hg02_deadlock (stderr) ! helgrind/tests/hg03_inherit (stderr) ! helgrind/tests/hg04_race (stderr) ! helgrind/tests/hg05_race2 (stderr) ! helgrind/tests/hg06_readshared (stderr) ! helgrind/tests/tc01_simple_race (stderr) ! helgrind/tests/tc02_simple_tls (stderr) ! helgrind/tests/tc03_re_excl (stderr) ! helgrind/tests/tc05_simple_race (stderr) ! helgrind/tests/tc06_two_races (stderr) ! helgrind/tests/tc07_hbl1 (stderr) ! helgrind/tests/tc08_hbl2 (stderr) ! helgrind/tests/tc09_bad_unlock (stderr) ! helgrind/tests/tc11_XCHG (stderr) ! helgrind/tests/tc12_rwl_trivial (stderr) ! helgrind/tests/tc14_laog_dinphils (stderr) ! helgrind/tests/tc16_byterace (stderr) ! helgrind/tests/tc17_sembar (stderr) ! helgrind/tests/tc18_semabuse (stderr) ! helgrind/tests/tc19_shadowmem (stderr) ! helgrind/tests/tc20_verifywrap (stderr) ! helgrind/tests/tc21_pthonce (stderr) ! helgrind/tests/tc22_exit_w_lock (stderr) ! helgrind/tests/tc23_bogus_condwait (stderr) ! |
|
From: Tom H. <th...@cy...> - 2007-11-28 03:31:31
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-11-28 03:05:06 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 353 tests, 6 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2007-11-28 03:26:15
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2007-11-28 03:10:04 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 353 tests, 9 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Tom H. <th...@cy...> - 2007-11-28 03:13:40
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-11-28 03:00:02 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 355 tests, 24 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: <sv...@va...> - 2007-11-28 01:55:28
|
Author: sewardj
Date: 2007-11-28 01:55:29 +0000 (Wed, 28 Nov 2007)
New Revision: 7247
Log:
- Remove extraneous 'o' (will be stored in svn server for possible
future use)
- Fix tag
- Fix long line which wraps around in html output
Modified:
trunk/docs/xml/manual-core.xml
trunk/massif/docs/ms-manual.xml
Modified: trunk/docs/xml/manual-core.xml
===================================================================
--- trunk/docs/xml/manual-core.xml 2007-11-28 01:50:55 UTC (rev 7246)
+++ trunk/docs/xml/manual-core.xml 2007-11-28 01:55:29 UTC (rev 7247)
@@ -635,7 +635,7 @@
default.
</para>
<para>Note that Valgrind does trace into the child of a
- <varname>fork</varname> (it would be difficult not too, since
+ <varname>fork</varname> (it would be difficult not to, since
<varname>fork</varname> makes an identical copy of a process), so this
option is arguably badly named. However, most children of
<varname>fork</varname> calls immediately call <varname>exec</varname>
Modified: trunk/massif/docs/ms-manual.xml
===================================================================
--- trunk/massif/docs/ms-manual.xml 2007-11-28 01:50:55 UTC (rev 7246)
+++ trunk/massif/docs/ms-manual.xml 2007-11-28 01:55:29 UTC (rev 7247)
@@ -266,7 +266,7 @@
so by default Massif records a peak whose size is within 1% of the size of
the true peak. See the description of the
<computeroutput>--peak-inaccuracy</computeroutput> option below for more
-details.</peak>
+details.</para>
<para>The following graph is from an execution of Konqueror, the KDE web
browser. It shows what graphs for larger programs look like.</para>
@@ -296,7 +296,8 @@
0 626.4
Number of snapshots: 63
- Detailed snapshots: [3, 4, 10, 11, 15, 16, 29, 33, 34, 36, 39, 41, 42, 43, 44, 49, 50, 51, 53, 55, 56, 57 (peak)]
+ Detailed snapshots: [3, 4, 10, 11, 15, 16, 29, 33, 34, 36, 39, 41,
+ 42, 43, 44, 49, 50, 51, 53, 55, 56, 57 (peak)]
]]></screen>
<para>Note that the larger size units are KB, MB, GB, etc. As is typical
|
|
From: <sv...@va...> - 2007-11-28 01:50:52
|
Author: sewardj
Date: 2007-11-28 01:50:55 +0000 (Wed, 28 Nov 2007)
New Revision: 7246
Log:
Dump extraneous code.
Modified:
trunk/coregrind/vg_preloaded.c
Modified: trunk/coregrind/vg_preloaded.c
===================================================================
--- trunk/coregrind/vg_preloaded.c 2007-11-28 01:27:03 UTC (rev 7245)
+++ trunk/coregrind/vg_preloaded.c 2007-11-28 01:50:55 UTC (rev 7246)
@@ -70,61 +70,3 @@
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
-
-#if 0
-
-#define PTH_FUNC(ret_ty, f, args...) \
- ret_ty VG_WRAP_FUNCTION_ZZ(libpthreadZdsoZd0,f)(args); \
- ret_ty VG_WRAP_FUNCTION_ZZ(libpthreadZdsoZd0,f)(args)
-
-#include <stdio.h>
-#include <pthread.h>
-
-// pthread_create
-PTH_FUNC(int, pthreadZucreateZAZa, // pthread_create@*
- pthread_t *thread, const pthread_attr_t *attr,
- void *(*start) (void *), void *arg)
-{
- int ret;
- void* fn;
- VALGRIND_GET_NRADDR(fn);
- fprintf(stderr, "<< pthread_create wrapper"); fflush(stderr);
-
- CALL_FN_W_WWWW(ret, fn, thread,attr,start,arg);
-
- fprintf(stderr, " -> %d >>\n", ret);
- return ret;
-}
-
-// pthread_mutex_lock
-PTH_FUNC(int, pthreadZumutexZulock, // pthread_mutex_lock
- pthread_mutex_t *mutex)
-{
- int ret;
- void* fn;
- VALGRIND_GET_ORIG_FN(fn);
- fprintf(stderr, "<< pthread_mxlock %p", mutex); fflush(stderr);
-
- CALL_FN_W_W(ret, fn, mutex);
-
- fprintf(stderr, " -> %d >>\n", ret);
- return ret;
-}
-
-// pthread_mutex_unlock
-PTH_FUNC(int, pthreadZumutexZuunlock, // pthread_mutex_unlock
- pthread_mutex_t *mutex)
-{
- int ret;
- void* fn;
- VALGRIND_GET_ORIG_FN(fn);
-
- fprintf(stderr, "<< pthread_mxunlk %p", mutex); fflush(stderr);
-
- CALL_FN_W_W(ret, fn, mutex);
-
- fprintf(stderr, " -> %d >>\n", ret);
- return ret;
-}
-
-#endif
|
|
From: <sv...@va...> - 2007-11-28 01:27:04
|
Author: sewardj
Date: 2007-11-28 01:27:03 +0000 (Wed, 28 Nov 2007)
New Revision: 7245
Log:
Make it compile on AIX, even if the result doesn't do anything useful.
Modified:
trunk/exp-drd/tests/sigalrm.c
Modified: trunk/exp-drd/tests/sigalrm.c
===================================================================
--- trunk/exp-drd/tests/sigalrm.c 2007-11-27 23:39:13 UTC (rev 7244)
+++ trunk/exp-drd/tests/sigalrm.c 2007-11-28 01:27:03 UTC (rev 7245)
@@ -1,3 +1,4 @@
+#if !defined(_AIX)
#include <assert.h>
#include <errno.h>
#include <pthread.h>
@@ -10,7 +11,6 @@
#include <asm/unistd.h>
#include "../drd_clientreq.h"
-
static int s_debug = 0;
@@ -90,3 +90,11 @@
return 0;
}
+
+#else /* !defined(_AIX) */
+#include <stdio.h>
+int main ( void ) {
+ fprintf(stderr, "This test does not compile on AIX5.\n");
+ return 0;
+}
+#endif /* !defined(_AIX) */
|
|
From: <js...@ac...> - 2007-11-28 01:21:56
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-11-28 02:00:01 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 286 tests, 25 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: <sv...@va...> - 2007-11-27 23:39:22
|
Author: sewardj
Date: 2007-11-27 23:39:13 +0000 (Tue, 27 Nov 2007)
New Revision: 7244
Log:
Fix compilation on older Linux distros (Bart Van Assche)
Modified:
trunk/exp-drd/tests/sigalrm.c
Modified: trunk/exp-drd/tests/sigalrm.c
===================================================================
--- trunk/exp-drd/tests/sigalrm.c 2007-11-27 21:38:14 UTC (rev 7243)
+++ trunk/exp-drd/tests/sigalrm.c 2007-11-27 23:39:13 UTC (rev 7244)
@@ -16,7 +16,11 @@
static int getktid()
{
+#ifdef __NR_gettid
return syscall(__NR_gettid);
+#else
+ return -1;
+#endif
}
static int getvgtid()
@@ -26,31 +30,28 @@
return res;
}
-static void SignalHandler(const int iSignal)
+static void print_thread_id(const char* const label)
{
if (s_debug)
{
char msg[256];
- snprintf(msg, sizeof(msg), "Signal %d was delivered to kernel thread ID %d"
- " / Valgrind thread ID %d\n",
- iSignal, getktid(), getvgtid());
+ snprintf(msg, sizeof(msg),
+ "%spid %d / kernel thread ID %d / Valgrind thread ID %d\n",
+ label, getpid(), getktid(), getvgtid());
write(STDOUT_FILENO, msg, strlen(msg));
}
}
+static void SignalHandler(const int iSignal)
+{
+ print_thread_id("Signal was delivered to ");
+}
+
void* thread_func(void* thread_arg)
{
- struct timespec tsRemain, tsDelay;
+ print_thread_id("thread: ");
- if (s_debug)
- {
- printf("thread: kernel thread ID %d / Valgrind thread ID %d\n",
- getktid(), getvgtid());
- }
-
- tsDelay.tv_sec = 10;
- tsDelay.tv_nsec = 0;
- clock_nanosleep(CLOCK_MONOTONIC, 0, &tsDelay, &tsRemain);
+ sleep(10);
//assert(result < 0 && errno == EINTR);
return 0;
@@ -68,11 +69,7 @@
vgthreadid = getvgtid();
- if (s_debug)
- {
- printf("main: kernel thread ID %d / Valgrind thread ID %d\n",
- getktid(), vgthreadid);
- }
+ print_thread_id("main: ");
{
struct sigaction sa;
@@ -86,7 +83,7 @@
// Wait until the thread is inside clock_nanosleep().
tsDelay.tv_sec = 0;
tsDelay.tv_nsec = 20 * 1000 * 1000;
- clock_nanosleep(CLOCK_MONOTONIC, 0, &tsDelay, 0);
+ nanosleep(&tsDelay, 0);
// And send SIGALRM to the thread.
pthread_kill(threadid, SIGALRM);
pthread_join(threadid, 0);
|
|
From: <sv...@va...> - 2007-11-27 21:38:19
|
Author: njn
Date: 2007-11-27 21:38:14 +0000 (Tue, 27 Nov 2007)
New Revision: 7243
Log:
Clarify peak-taking details.
Modified:
trunk/massif/docs/ms-manual.xml
Modified: trunk/massif/docs/ms-manual.xml
===================================================================
--- trunk/massif/docs/ms-manual.xml 2007-11-27 21:29:33 UTC (rev 7242)
+++ trunk/massif/docs/ms-manual.xml 2007-11-27 21:38:14 UTC (rev 7243)
@@ -254,15 +254,19 @@
<computeroutput>--detailed-freq</computeroutput> option.</para>
<para>Finally, there is at most one <emphasis>peak</emphasis> snapshot. The
-peak snapshot is detailed, and records the point where memory consumption
-was greatest. (Actually, recording the true peak is expensive, and so by
-default Massif records a peak whose size is within 1% of the size of the
-true peak. See the description of the
+peak snapshot is a detailed snapshot, and records the point where memory
+consumption was greatest. The peak snapshot is represented in the graph by
+a bar consisting of '#' and ',' characters. The text at the bottom shows
+that snapshot 14 was the peak. Note that for tiny programs that never
+deallocate heap memory, Massif will not record a peak snapshot.</para>
+
+<para>Some more details about the peak: the peak is determined by looking
+at every allocation, i.e. it is <emphasis>not</emphasis> just the peak among
+the regular snapshots. However, recording the true peak is expensive, and
+so by default Massif records a peak whose size is within 1% of the size of
+the true peak. See the description of the
<computeroutput>--peak-inaccuracy</computeroutput> option below for more
-details.) The peak snapshot is represented in the graph by a bar consisting
-of '#' and ',' characters. The text at the bottom show that snapshot 14 was
-the peak. Note that for tiny programs that never deallocate heap memory,
-Massif will not record a peak snapshot.</para>
+details.</peak>
<para>The following graph is from an execution of Konqueror, the KDE web
browser. It shows what graphs for larger programs look like.</para>
@@ -589,7 +593,7 @@
<para>Massif does not necessarily record the actual global memory
allocation peak; by default it records a peak only when the global
memory allocation size exceeds the previous peak by at least 1.0%.
- This is because there are many local allocation peaks along the way,
+ This is because there can be many local allocation peaks along the way,
and doing a detailed snapshot for every one would be expensive and
wasteful, as all but one of them will be later discarded. This
inaccuracy can be changed (even to 0.0%) via this option, but Massif
|
|
From: <sv...@va...> - 2007-11-27 21:29:33
|
Author: njn
Date: 2007-11-27 21:29:33 +0000 (Tue, 27 Nov 2007)
New Revision: 7242
Log:
Massif doc fixes, mostly from Julian.
Modified:
trunk/massif/docs/ms-manual.xml
Modified: trunk/massif/docs/ms-manual.xml
===================================================================
--- trunk/massif/docs/ms-manual.xml 2007-11-27 11:42:47 UTC (rev 7241)
+++ trunk/massif/docs/ms-manual.xml 2007-11-27 21:29:33 UTC (rev 7242)
@@ -20,7 +20,7 @@
<title>Heap profiling</title>
<para>Massif is a heap profiler. It measures how much heap memory your
-program uses. This includes both the useful space, as well as extra bytes
+program uses. This includes both the useful space, and the extra bytes
allocated for book-keeping purposes and alignment purposes. It can also
measure the size of your program's stack(s), although it does not do so by
default.</para>
@@ -85,8 +85,8 @@
the program's execution, and (b) detailed information about the responsible
allocation sites at various points in the program, including the point of
peak memory allocation. The use of a separate script for presenting the
-results is deliberate; it separates the data gathering from its
-presentation, and means that new ones of presenting the data can be added in
+results is deliberate: it separates the data gathering from its
+presentation, and means that new methods of presenting the data can be added in
the future.</para>
<sect2 id="ms-manual.anexample" xreflabel="An Example">
@@ -189,8 +189,8 @@
<para>Why is most of the graph empty, with only a couple of bars at the very
end? By default, Massif uses "instructions executed" as the unit of time.
-For very short-run programs such as the example, most of the execution
-instructions involved the loading and dynamic linking of the program. The
+For very short-run programs such as the example, most of the executed
+instructions involve the loading and dynamic linking of the program. The
execution of <computeroutput>main</computeroutput> (and thus the heap
allocations) only occur at the very end. For a short-running program like
this, we can use the <computeroutput>--time-unit=B</computeroutput> option
@@ -251,7 +251,7 @@
of '@' and ',' characters. The text at the bottom show that 3 detailed
snapshots were taken for this program (snapshots 9, 14 and 24). By default,
every 10th snapshot is detailed, although this can be changed via the
-<computeroutput>--detailed-freq</computeroutput>option.</para>
+<computeroutput>--detailed-freq</computeroutput> option.</para>
<para>Finally, there is at most one <emphasis>peak</emphasis> snapshot. The
peak snapshot is detailed, and records the point where memory consumption
@@ -262,7 +262,7 @@
details.) The peak snapshot is represented in the graph by a bar consisting
of '#' and ',' characters. The text at the bottom show that snapshot 14 was
the peak. Note that for tiny programs that never deallocate heap memory,
-Massif will record a peak snapshot.</para>
+Massif will not record a peak snapshot.</para>
<para>The following graph is from an execution of Konqueror, the KDE web
browser. It shows what graphs for larger programs look like.</para>
@@ -353,7 +353,7 @@
larger number. By default, if N bytes are asked for, Massif rounds N up
to the nearest multiple of 8 that is equal to or greater than N. This is
typical behaviour for allocators, and is required to ensure that elements
- within the block are suitable aligned. The rounding size can be changed
+ within the block are suitably aligned. The rounding size can be changed
with the <computeroutput>--alignment</computeroutput> option, although it
cannot be less than 8, and must be a power of two.</para></listitem>
@@ -455,12 +455,14 @@
The 00.00% entry represents the code locations for which memory was
allocated and then freed (line 20 in this case, the memory for which was
freed on line 28). However, no code location details are given for this
-entry; by default, Massif/ms_print only show the details for code locations
-responsible for more than 1% of useful memory bytes. The entries that do
-not meet this threshold are aggregated. This avoids filling up the output
-with large numbers of unimportant entries. This threshold can be changed
-with the <computeroutput>--threshold</computeroutput> option of both Massif
-and ms_print.</para>
+entry; by default, Massif only records the details for code locations
+responsible for more than 1% of useful memory bytes, and ms_print likewise
+only prints the details for code locations responsible for more than 1%.
+The entries that do not meet this threshold are aggregated. This avoids
+filling up the output with large numbers of unimportant entries. The
+thresholds threshold can be changed with the
+<computeroutput>--threshold</computeroutput> option that both Massif and
+ms_print support.</para>
</sect2>
@@ -489,7 +491,7 @@
<option><![CDATA[--heap-admin=<number> [default: 8] ]]></option>
</term>
<listitem>
- <para>If heap profiling is on, gives the number of administrative
+ <para>If heap profiling is enabled, gives the number of administrative
bytes per block to use. This should be an estimate of the average,
since it may vary. For example, the allocator used by
<computeroutput>glibc</computeroutput> requires somewhere between 4 to
@@ -602,11 +604,11 @@
<listitem>
<para>The time unit used for the profiling. There are three
possibilities: instructions executed (i), which is good for most
- cases; real time (ms, i.e. milliseconds), which is useful sometimes;
- and bytes allocated/deallocated on the heap and/or stack (B), which is
- useful for very short-run programs, and for testing purposes, because
- it is the most reproducible across different machines.</para>
- </listitem>
+ cases; real (wallclock) time (ms, i.e. milliseconds), which is
+ sometimes useful; and bytes allocated/deallocated on the heap and/or
+ stack (B), which is useful for very short-run programs, and for
+ testing purposes, because it is the most reproducible across different
+ machines.</para> </listitem>
</varlistentry>
<varlistentry id="opt.detailed-freq" xreflabel="--detailed-freq">
@@ -642,15 +644,15 @@
<option>%p</option> and <option>%q</option> format specifiers can be
used to embed the process ID and/or the contents of an environment
variable in the name, as is the case for the core option
- <option>--log-file</option>. See <link
- linkend="manual-core.basicopts">here</link> for details.
+ <option>--log-file</option>. See <xref
+ linkend="manual-core.basicopts"/> for details.
</para>
</listitem>
</varlistentry>
<varlistentry id="opt.alignment" xreflabel="--alignment">
<term>
- <option><![CDATA[--threshold=<m.n> [default: 1.0] ]]></option>
+ <option><![CDATA[--alignment=<n> [default: 1.0] ]]></option>
</term>
<listitem>
<para>The minimum alignment (and thus size) of heap blocks.</para>
|
|
From: <sv...@va...> - 2007-11-27 11:42:44
|
Author: sewardj
Date: 2007-11-27 11:42:47 +0000 (Tue, 27 Nov 2007)
New Revision: 7241
Log:
Make Memcheck work sanely on AIX5.3 (again):
* Don't intercept putenv/getenv/setenv. Causes a lot of whinging
about missing TOC pointers.
* Add 'strcmp' to the bundle of 4 functions intercepted in all
objects.
* xlc now seems to route calls through to malloc_common, free_common,
calloc_common, realloc_common, memalign_common in libc. Intercept
those names too.
Modified:
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
trunk/memcheck/mc_replace_strmem.c
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
===================================================================
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2007-11-27 11:23:55 UTC (rev 7240)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2007-11-27 11:42:47 UTC (rev 7241)
@@ -103,7 +103,7 @@
memcpy() is used by gcc for a struct assignment in mallinfo()
below. Add the following conservative implementation (memmove,
really). */
-#if defined(VGO_aix5)
+#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
__attribute__((weak))
void *memcpy(void *destV, const void *srcV, unsigned long n)
{
@@ -205,6 +205,9 @@
// malloc
ALLOC_or_NULL(m_libstdcxx_soname, malloc, malloc);
ALLOC_or_NULL(m_libc_soname, malloc, malloc);
+#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+ALLOC_or_NULL(m_libc_soname, malloc_common, malloc);
+#endif
/*---------------------- new ----------------------*/
@@ -318,6 +321,9 @@
// free
FREE(m_libstdcxx_soname, free, free );
FREE(m_libc_soname, free, free );
+#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+FREE(m_libc_soname, free_common, free );
+#endif
/*---------------------- cfree ----------------------*/
@@ -389,6 +395,9 @@
}
CALLOC(m_libc_soname, calloc);
+#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+CALLOC(m_libc_soname, calloc_common);
+#endif
/*---------------------- realloc ----------------------*/
@@ -418,6 +427,9 @@
}
REALLOC(m_libc_soname, realloc);
+#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+REALLOC(m_libc_soname, realloc_common);
+#endif
/*---------------------- memalign ----------------------*/
@@ -450,15 +462,23 @@
/*---------------------- valloc ----------------------*/
+static int local__getpagesize ( void ) {
+# if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+ return 4096; /* kludge - toc problems prevent calling getpagesize() */
+# else
+ extern int getpagesize (void);
+ return getpagesize();
+# endif
+}
+
#define VALLOC(soname, fnname) \
\
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( SizeT size ); \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( SizeT size ) \
{ \
static int pszB = 0; \
- extern int getpagesize (void); \
if (pszB == 0) \
- pszB = getpagesize(); \
+ pszB = local__getpagesize(); \
return VG_REPLACE_FUNCTION_ZU(m_libc_soname,memalign) \
((SizeT)pszB, size); \
}
@@ -547,6 +567,12 @@
}
POSIX_MEMALIGN(m_libc_soname, posix_memalign);
+#if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+/* 27 Nov 07: it appears that xlc links into executables, a
+ posix_memalign, which calls onwards to memalign_common, with the
+ same args. */
+POSIX_MEMALIGN(m_libc_soname, memalign_common);
+#endif
/*---------------------- malloc_usable_size ----------------------*/
Modified: trunk/memcheck/mc_replace_strmem.c
===================================================================
--- trunk/memcheck/mc_replace_strmem.c 2007-11-27 11:23:55 UTC (rev 7240)
+++ trunk/memcheck/mc_replace_strmem.c 2007-11-27 11:42:47 UTC (rev 7241)
@@ -725,6 +725,8 @@
/*--- Improve definedness checking of process environment ---*/
/*------------------------------------------------------------*/
+#if defined(VGO_linux)
+
/* putenv */
int VG_WRAP_FUNCTION_ZU(m_libc_soname, putenv) (char* string);
int VG_WRAP_FUNCTION_ZU(m_libc_soname, putenv) (char* string)
@@ -782,50 +784,54 @@
return result;
}
+#endif /* defined(VGO_linux) */
+
+
/*------------------------------------------------------------*/
/*--- AIX stuff only after this point ---*/
/*------------------------------------------------------------*/
-/* Generate replacements for strcat, strncat, strcpy, strncpy,
+/* Generate replacements for strcat, strncat, strcpy, strncpy, strcmp
in the given soname. */
-#define Str4FNs(_soname) \
+#define Str5FNs(_soname) \
STRCAT(_soname, strcat) \
STRNCAT(_soname, strncat) \
STRCPY(_soname, strcpy) \
- STRNCPY(_soname, strncpy)
+ STRNCPY(_soname, strncpy) \
+ STRCMP(_soname, strcmp)
#if defined(VGP_ppc32_aix5)
-Str4FNs(NONE) /* in main exe */
-Str4FNs(libCZdaZLshrcoreZdoZR) /* libC.a(shrcore.o) */
-Str4FNs(libX11ZdaZLshr4ZdoZR) /* libX11.a(shr4.o) */
-Str4FNs(libXmZdaZLshrZaZdoZR) /* libXm.a(shr*.o) */
-Str4FNs(libXtZdaZLshr4ZdoZR) /* libXt.a(shr4.o) */
-Str4FNs(libppeZurZdaZLdynamicZdoZR) /* libppe_r.a(dynamic.o) */
-Str4FNs(libodmZdaZLshrZdoZR) /* libodm.a(shr.o) */
-Str4FNs(libmpiZurZdaZLmpicoreZurZdoZR) /* libmpi_r.a(mpicore_r.o) */
-Str4FNs(libmpiZurZdaZLmpipoeZurZdoZR) /* libmpi_r.a(mpipoe_r.o) */
-Str4FNs(libmpiZurZdaZLmpciZurZdoZR) /* libmpi_r.a(mpci_r.o) */
-Str4FNs(libslurmZdso) /* libslurm.so */
-Str4FNs(libglibZdso) /* libglib.so */
-Str4FNs(libIMZdaZLshrZdoZR) /* libIM.a(shr.o) */
-Str4FNs(libiconvZdaZLshr4ZdoZR) /* libiconv.a(shr4.o) */
-Str4FNs(libGLZdaZLshrZdoZR) /* libGL.a(shr.o) */
-Str4FNs(libgdkZdso) /* libgdk.so */
-Str4FNs(libcursesZdaZLshr42ZdoZR) /* libcurses.a(shr42.o) */
-Str4FNs(libqtZda) /* libqt.a */
+Str5FNs(NONE) /* in main exe */
+Str5FNs(libCZdaZLshrcoreZdoZR) /* libC.a(shrcore.o) */
+Str5FNs(libX11ZdaZLshr4ZdoZR) /* libX11.a(shr4.o) */
+Str5FNs(libXmZdaZLshrZaZdoZR) /* libXm.a(shr*.o) */
+Str5FNs(libXtZdaZLshr4ZdoZR) /* libXt.a(shr4.o) */
+Str5FNs(libppeZurZdaZLdynamicZdoZR) /* libppe_r.a(dynamic.o) */
+Str5FNs(libodmZdaZLshrZdoZR) /* libodm.a(shr.o) */
+Str5FNs(libmpiZurZdaZLmpicoreZurZdoZR) /* libmpi_r.a(mpicore_r.o) */
+Str5FNs(libmpiZurZdaZLmpipoeZurZdoZR) /* libmpi_r.a(mpipoe_r.o) */
+Str5FNs(libmpiZurZdaZLmpciZurZdoZR) /* libmpi_r.a(mpci_r.o) */
+Str5FNs(libslurmZdso) /* libslurm.so */
+Str5FNs(libglibZdso) /* libglib.so */
+Str5FNs(libIMZdaZLshrZdoZR) /* libIM.a(shr.o) */
+Str5FNs(libiconvZdaZLshr4ZdoZR) /* libiconv.a(shr4.o) */
+Str5FNs(libGLZdaZLshrZdoZR) /* libGL.a(shr.o) */
+Str5FNs(libgdkZdso) /* libgdk.so */
+Str5FNs(libcursesZdaZLshr42ZdoZR) /* libcurses.a(shr42.o) */
+Str5FNs(libqtZda) /* libqt.a */
#endif
#if defined(VGP_ppc64_aix5)
-Str4FNs(NONE) /* in main exe */
-Str4FNs(libX11ZdaZLshrZu64ZdoZR) /* libX11.a(shr_64.o) */
-Str4FNs(libiconvZdaZLshr4Zu64ZdoZR) /* libiconv.a(shr4_64.o) */
-Str4FNs(libGLZdaZLshrZu64ZdoZR) /* libGL.a(shr_64.o) */
-Str4FNs(libppeZurZdaZLdynamic64ZdoZR) /* libppe_r.a(dynamic64.o) */
-Str4FNs(libodmZdaZLshrZu64ZdoZR) /* libodm.a(shr_64.o) */
-Str4FNs(libmpiZurZdaZLmpicore64ZurZdoZR) /* libmpi_r.a(mpicore64_r.o) */
-Str4FNs(libmpiZurZdaZLmpipoe64ZurZdoZR) /* libmpi_r.a(mpipoe64_r.o) */
-Str4FNs(libCZdaZLshrcoreZu64ZdoZR) /* libC.a(shrcore_64.o) */
-Str4FNs(libmpiZurZdaZLmpci64ZurZdoZR) /* libmpi_r.a(mpci64_r.o) */
-Str4FNs(libqtZda) /* libqt.a */
+Str5FNs(NONE) /* in main exe */
+Str5FNs(libX11ZdaZLshrZu64ZdoZR) /* libX11.a(shr_64.o) */
+Str5FNs(libiconvZdaZLshr4Zu64ZdoZR) /* libiconv.a(shr4_64.o) */
+Str5FNs(libGLZdaZLshrZu64ZdoZR) /* libGL.a(shr_64.o) */
+Str5FNs(libppeZurZdaZLdynamic64ZdoZR) /* libppe_r.a(dynamic64.o) */
+Str5FNs(libodmZdaZLshrZu64ZdoZR) /* libodm.a(shr_64.o) */
+Str5FNs(libmpiZurZdaZLmpicore64ZurZdoZR) /* libmpi_r.a(mpicore64_r.o) */
+Str5FNs(libmpiZurZdaZLmpipoe64ZurZdoZR) /* libmpi_r.a(mpipoe64_r.o) */
+Str5FNs(libCZdaZLshrcoreZu64ZdoZR) /* libC.a(shrcore_64.o) */
+Str5FNs(libmpiZurZdaZLmpci64ZurZdoZR) /* libmpi_r.a(mpci64_r.o) */
+Str5FNs(libqtZda) /* libqt.a */
#endif
|
|
From: <sv...@va...> - 2007-11-27 11:23:52
|
Author: sewardj
Date: 2007-11-27 11:23:55 +0000 (Tue, 27 Nov 2007)
New Revision: 7240
Log:
Don't break the build on AIX5.3.
Modified:
trunk/helgrind/tests/tc07_hbl1.c
trunk/helgrind/tests/tc08_hbl2.c
trunk/helgrind/tests/tc19_shadowmem.c
trunk/helgrind/tests/tc20_verifywrap.c
Modified: trunk/helgrind/tests/tc07_hbl1.c
===================================================================
--- trunk/helgrind/tests/tc07_hbl1.c 2007-11-27 02:03:44 UTC (rev 7239)
+++ trunk/helgrind/tests/tc07_hbl1.c 2007-11-27 11:23:55 UTC (rev 7240)
@@ -27,19 +27,19 @@
# define PLAT_ppc32_aix5 1
#endif
-
#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux)
-# define INC(_lval) \
+# define INC(_lval,_lqual) \
__asm__ __volatile__ ( \
"lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" )
-#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux)
-# define INC(_lval) \
+#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \
+ || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5)
+# define INC(_lval,_lqual) \
__asm__ __volatile__( \
- "1:\n" \
+ "L1xyzzy1" _lqual ":\n" \
" lwarx 15,0,%0\n" \
" addi 15,15,1\n" \
" stwcx. 15,0,%0\n" \
- " bne- 1b" \
+ " bne- L1xyzzy1" _lqual \
: /*out*/ : /*in*/ "b"(&(_lval)) \
: /*trash*/ "r15", "cr0", "memory" \
)
@@ -52,7 +52,7 @@
void* child_fn ( void* arg )
{
- INC(x);
+ INC(x, "childfn");
return NULL;
}
@@ -65,7 +65,7 @@
exit(1);
}
- INC(x);
+ INC(x, "main");
if (pthread_join(child, NULL)) {
perror("pthread join");
Modified: trunk/helgrind/tests/tc08_hbl2.c
===================================================================
--- trunk/helgrind/tests/tc08_hbl2.c 2007-11-27 02:03:44 UTC (rev 7239)
+++ trunk/helgrind/tests/tc08_hbl2.c 2007-11-27 11:23:55 UTC (rev 7240)
@@ -44,19 +44,19 @@
# define PLAT_ppc32_aix5 1
#endif
-
#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux)
-# define INC(_lval) \
+# define INC(_lval,_lqual) \
__asm__ __volatile__ ( \
"lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" )
-#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux)
-# define INC(_lval) \
+#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \
+ || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5)
+# define INC(_lval,_lqual) \
__asm__ __volatile__( \
- "1:\n" \
+ "L1xyzzy1" _lqual ":\n" \
" lwarx 15,0,%0\n" \
" addi 15,15,1\n" \
" stwcx. 15,0,%0\n" \
- " bne- 1b" \
+ " bne- L1xyzzy1" _lqual \
: /*out*/ : /*in*/ "b"(&(_lval)) \
: /*trash*/ "r15", "cr0", "memory" \
)
@@ -102,7 +102,7 @@
}
for (i = 0; i < LIMIT; i++) {
- INC(x);
+ INC(x, "main");
if (i == 5) sleep(1); /* make sure child doesn't starve */
}
Modified: trunk/helgrind/tests/tc19_shadowmem.c
===================================================================
--- trunk/helgrind/tests/tc19_shadowmem.c 2007-11-27 02:03:44 UTC (rev 7239)
+++ trunk/helgrind/tests/tc19_shadowmem.c 2007-11-27 11:23:55 UTC (rev 7240)
@@ -2286,6 +2286,6 @@
__asm__ __volatile__("");
if (wot == 999) return fn(info);
__asm__ __volatile__("");
-
assert(0);
+ return 0; /* keep gcc happy on AIX */
}
Modified: trunk/helgrind/tests/tc20_verifywrap.c
===================================================================
--- trunk/helgrind/tests/tc20_verifywrap.c 2007-11-27 02:03:44 UTC (rev 7239)
+++ trunk/helgrind/tests/tc20_verifywrap.c 2007-11-27 11:23:55 UTC (rev 7240)
@@ -1,4 +1,3 @@
-
/* This program attempts to verify that all functions that are
supposed to be wrapped by tc_intercepts.c really are wrapped. The
main way it does this is to cause failures in those functions, so
@@ -12,7 +11,6 @@
otherwise "know" about some more exotic pthread stuff, in this case
PTHREAD_MUTEX_ERRORCHECK. */
#define _GNU_SOURCE 1
-
#include <stdio.h>
#include <string.h>
#include <assert.h>
@@ -20,6 +18,8 @@
#include <pthread.h>
#include <semaphore.h>
+#if !defined(_AIX)
+
#if !defined(__GLIBC_PREREQ)
# error "This program needs __GLIBC_PREREQ (in /usr/include/features.h)"
#endif
@@ -260,3 +260,11 @@
return 0;
}
+
+#else /* defined(_AIX) */
+int main ( void )
+{
+ fprintf(stderr, "This program does not work on AIX.\n");
+ return 0;
+}
+#endif
|
|
From: Tom H. <th...@cy...> - 2007-11-27 03:43:06
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-11-27 03:15:01 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo else rm -f ".deps/sigalrm.Tpo"; exit 1; \ fi sigalrm.c: In function `thread_func': sigalrm.c:53: warning: implicit declaration of function `clock_nanosleep' sigalrm.c:53: `CLOCK_MONOTONIC' undeclared (first use in this function) sigalrm.c:53: (Each undeclared identifier is reported only once sigalrm.c:53: for each function it appears in.) sigalrm.c: In function `main': sigalrm.c:89: `CLOCK_MONOTONIC' undeclared (first use in this function) make[5]: *** [sigalrm.o] Error 1 make[5]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd/tests' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd/tests' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind' make: *** [check] Error 2 ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 318 tests, 60 stderr failures, 1 stdout failure, 27 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/noisy_child (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/hg06_readshared (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Nov 27 03:39:19 2007 --- new.short Tue Nov 27 03:43:08 2007 *************** *** 6,98 **** ! Regression test results follow ! ! == 318 tests, 60 stderr failures, 1 stdout failure, 27 post failures == ! memcheck/tests/addressable (stderr) ! memcheck/tests/badjump (stderr) ! memcheck/tests/describe-block (stderr) ! memcheck/tests/erringfds (stderr) ! memcheck/tests/leak-0 (stderr) ! memcheck/tests/leak-cycle (stderr) ! memcheck/tests/leak-pool-0 (stderr) ! memcheck/tests/leak-pool-1 (stderr) ! memcheck/tests/leak-pool-2 (stderr) ! memcheck/tests/leak-pool-3 (stderr) ! memcheck/tests/leak-pool-4 (stderr) ! memcheck/tests/leak-pool-5 (stderr) ! memcheck/tests/leak-regroot (stderr) ! memcheck/tests/leak-tree (stderr) ! memcheck/tests/long_namespace_xml (stderr) ! memcheck/tests/match-overrun (stderr) ! memcheck/tests/noisy_child (stderr) ! memcheck/tests/partial_load_dflt (stderr) ! memcheck/tests/partial_load_ok (stderr) ! memcheck/tests/partiallydefinedeq (stderr) ! memcheck/tests/pointer-trace (stderr) ! memcheck/tests/sigkill (stderr) ! memcheck/tests/stack_changes (stderr) ! memcheck/tests/x86/bug152022 (stderr) ! memcheck/tests/x86/scalar (stderr) ! memcheck/tests/x86/scalar_supp (stderr) ! memcheck/tests/x86/xor-undef-x86 (stderr) ! memcheck/tests/xml1 (stderr) ! massif/tests/alloc-fns-A (post) ! massif/tests/alloc-fns-B (post) ! massif/tests/basic (post) ! massif/tests/big-alloc (post) ! massif/tests/culling1 (stderr) ! massif/tests/culling2 (stderr) ! massif/tests/custom_alloc (post) ! massif/tests/deep-A (post) ! massif/tests/deep-B (stderr) ! massif/tests/deep-B (post) ! massif/tests/deep-C (stderr) ! massif/tests/deep-C (post) ! massif/tests/deep-D (post) ! massif/tests/ignoring (post) ! massif/tests/insig (post) ! massif/tests/long-time (post) ! massif/tests/new-cpp (post) ! massif/tests/null (post) ! massif/tests/one (post) ! massif/tests/overloaded-new (post) ! massif/tests/peak (post) ! massif/tests/peak2 (stderr) ! massif/tests/peak2 (post) ! massif/tests/realloc (stderr) ! massif/tests/realloc (post) ! massif/tests/thresholds_0_0 (post) ! massif/tests/thresholds_0_10 (post) ! massif/tests/thresholds_10_0 (post) ! massif/tests/thresholds_10_10 (post) ! massif/tests/thresholds_5_0 (post) ! massif/tests/thresholds_5_10 (post) ! massif/tests/zero1 (post) ! massif/tests/zero2 (post) ! none/tests/mremap (stderr) ! none/tests/mremap2 (stdout) ! helgrind/tests/hg01_all_ok (stderr) ! helgrind/tests/hg02_deadlock (stderr) ! helgrind/tests/hg03_inherit (stderr) ! helgrind/tests/hg04_race (stderr) ! helgrind/tests/hg05_race2 (stderr) ! helgrind/tests/hg06_readshared (stderr) ! helgrind/tests/tc01_simple_race (stderr) ! helgrind/tests/tc02_simple_tls (stderr) ! helgrind/tests/tc03_re_excl (stderr) ! helgrind/tests/tc05_simple_race (stderr) ! helgrind/tests/tc06_two_races (stderr) ! helgrind/tests/tc07_hbl1 (stderr) ! helgrind/tests/tc08_hbl2 (stderr) ! helgrind/tests/tc09_bad_unlock (stderr) ! helgrind/tests/tc11_XCHG (stderr) ! helgrind/tests/tc12_rwl_trivial (stderr) ! helgrind/tests/tc14_laog_dinphils (stderr) ! helgrind/tests/tc16_byterace (stderr) ! helgrind/tests/tc17_sembar (stderr) ! helgrind/tests/tc18_semabuse (stderr) ! helgrind/tests/tc19_shadowmem (stderr) ! helgrind/tests/tc20_verifywrap (stderr) ! helgrind/tests/tc21_pthonce (stderr) ! helgrind/tests/tc22_exit_w_lock (stderr) ! helgrind/tests/tc23_bogus_condwait (stderr) ! --- 6,27 ---- ! Last 20 lines of verbose log follow echo ! else rm -f ".deps/sigalrm.Tpo"; exit 1; \ ! fi ! sigalrm.c: In function `thread_func': ! sigalrm.c:53: warning: implicit declaration of function `clock_nanosleep' ! sigalrm.c:53: `CLOCK_MONOTONIC' undeclared (first use in this function) ! sigalrm.c:53: (Each undeclared identifier is reported only once ! sigalrm.c:53: for each function it appears in.) ! sigalrm.c: In function `main': ! sigalrm.c:89: `CLOCK_MONOTONIC' undeclared (first use in this function) ! make[5]: *** [sigalrm.o] Error 1 ! make[5]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd/tests' ! make[4]: *** [check-am] Error 2 ! make[4]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd/tests' ! make[3]: *** [check-recursive] Error 1 ! make[3]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd/tests' ! make[2]: *** [check-recursive] Error 1 ! make[2]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind/exp-drd' ! make[1]: *** [check-recursive] Error 1 ! make[1]: Leaving directory `/tmp/vgtest/2007-11-27/valgrind' ! make: *** [check] Error 2 |
|
From: Tom H. <th...@cy...> - 2007-11-27 03:31:16
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-11-27 03:05:08 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 353 tests, 6 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 352 tests, 6 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Nov 27 03:14:59 2007 --- new.short Tue Nov 27 03:31:18 2007 *************** *** 8,10 **** ! == 352 tests, 6 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 353 tests, 6 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) |
|
From: Tom H. <th...@cy...> - 2007-11-27 03:26:19
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2007-11-27 03:10:04 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 353 tests, 9 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_cvsimple (stdout) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 352 tests, 9 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_cvsimple (stdout) none/tests/pth_detached (stdout) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Nov 27 03:18:23 2007 --- new.short Tue Nov 27 03:26:21 2007 *************** *** 8,10 **** ! == 352 tests, 9 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 353 tests, 9 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) *************** *** 16,18 **** none/tests/pth_cvsimple (stdout) - none/tests/pth_detached (stdout) helgrind/tests/tc17_sembar (stderr) --- 16,17 ---- |
|
From: Tom H. <th...@cy...> - 2007-11-27 03:13:33
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-11-27 03:00:02 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 355 tests, 24 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 354 tests, 24 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Nov 27 03:06:51 2007 --- new.short Tue Nov 27 03:13:36 2007 *************** *** 8,10 **** ! == 354 tests, 24 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 355 tests, 24 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/pointer-trace (stderr) |
|
From: <sv...@va...> - 2007-11-27 02:03:47
|
Author: njn Date: 2007-11-27 02:03:44 +0000 (Tue, 27 Nov 2007) New Revision: 7239 Log: Minor updates. Modified: trunk/NEWS trunk/massif/ms_main.c Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2007-11-27 01:59:38 UTC (rev 7238) +++ trunk/NEWS 2007-11-27 02:03:44 UTC (rev 7239) @@ -55,7 +55,8 @@ - There are new --cachegrind-out-file, --callgrind-out-file and --massif-out-file options, which control the names of the output files produced by Cachegrind, Callgrind and Massif. They accept the same %p and - %q format specifiers that --log-file accepts. + %q format specifiers that --log-file accepts. --callgrind-out-file + replaces Callgrind's old --base option. - Cachegrind's 'cg_annotate' script no longer uses the --<pid> option to specify the output file. Instead, the first non-option argument is taken Modified: trunk/massif/ms_main.c =================================================================== --- trunk/massif/ms_main.c 2007-11-27 01:59:38 UTC (rev 7238) +++ trunk/massif/ms_main.c 2007-11-27 02:03:44 UTC (rev 7239) @@ -30,10 +30,6 @@ //--------------------------------------------------------------------------- // XXX: //--------------------------------------------------------------------------- -// Todo -- critical for release: -// - address/close all the bug reports below (after writing docs) -// - Get Josef to update the Callgrind --callgrind-out-file option. -// // Todo -- nice, but less critical: // - do a graph-drawing test // - make file format more generic. Obstacles: @@ -56,7 +52,6 @@ // - Options like --alloc-fn='operator new(unsigned, std::nothrow_t const&)' // don't work in a .valgrindrc file or in $VALGRIND_OPTS. // m_commandline.c:add_args_from_string() needs to respect single quotes. -// // // Performance: // - To run the benchmarks: @@ -85,6 +80,7 @@ // Todo -- low priority: // - In each XPt, record both bytes and the number of allocations, and // possibly the global number of allocations. +// - (Andy Lin) Give a stack trace on detailed snapshots? // - (Artur Wisz) add a feature to Massif to ignore any heap blocks larger // than a certain size! Because: "linux's malloc allows to set a // MMAP_THRESHOLD value, so we set it to 4096 - all blocks above that will @@ -92,47 +88,6 @@ // the system when freed. So we needed to profile only blocks below this // limit." // -// Examine and fix bugs on bugzilla: -// IGNORE: -// 112163 nor MASSIF crashed with signal 7 (SIGBUS) after running 2 days -// - weird, crashes in VEX, ignore -// 82871 nor Massif output function names too short -// - on .ps graph, now irrelevant, ignore -// 129576 nor Massif loses track of memory, incorrect graphs -// - dunno, hard to reproduce, ignore -// 132132 nor massif --format=html output does not do html entity escaping -// - only for HTML output, irrelevant, ignore -// 132950 Heap alloc/usage summary -// - doesn't seem that interesting or general -// -// FIXED/NOW IRRELEVANT: -// 89061 cra Massif: ms_main.c:485 (get_XCon): Assertion `xpt->max_chi... -// - relevant code now gone -// 143062 cra massif crashes on app exit with signal 8 SIGFPE -// - fixed -// 95483 nor massif feature request: include peak allocation in report -// - implemented in Massif2 -// 92615 nor Write output from Massif at crash -// - this happens unless Massif2 itself crashes -// 121629 add instruction-counting mode for timing -// - time-unit=B is similar, plus I'm considering this above anyway -// 142197 nor massif tool ignores --massif:alloc-fn parameters in .valg... -// - fixed in trunk -// 142491 nor Maximise use of alloc_fns array -// - addressed, it's now an XArray and thus unlimited in size -// 144453 (get_XCon): Assertion 'xpt->max_children != 0' failed. -// - relevant code now gone -// -// POSSIBLY FIXED BY BETTER SANITY CHECKING, BUT HARD TO TELL: -// 141631 Massif: percentages don't add up correctly -// - better sanity-checking should help this greatly -// 142706 massif numbers don't seem to add up -// - better sanity-checking should help this greatly -// 149504 Assertion hit on alloc_xpt->curr_space >= -space_delta -// - better sanity-checking should help this greatly -// 146456 (update_XCon): Assertion 'xpt->curr_space >= -space_delta' failed. -// - better sanity-checking should help this greatly -// // File format working notes: #if 0 |
|
From: <sv...@va...> - 2007-11-27 01:59:39
|
Author: sewardj
Date: 2007-11-27 01:59:38 +0000 (Tue, 27 Nov 2007)
New Revision: 7238
Log:
Translate the drd regtests from C++ to C. (Bart Van Assche).
Added:
trunk/exp-drd/tests/fp_race.c
trunk/exp-drd/tests/pth_broadcast.c
trunk/exp-drd/tests/pth_cond_race.c
trunk/exp-drd/tests/pth_create_chain.c
trunk/exp-drd/tests/sigalrm.c
Removed:
trunk/exp-drd/tests/fp_race.cpp
trunk/exp-drd/tests/new_delete.cpp
trunk/exp-drd/tests/pth_broadcast.cpp
trunk/exp-drd/tests/pth_cond_race.cpp
trunk/exp-drd/tests/pth_create_chain.cpp
trunk/exp-drd/tests/sigalrm.cpp
trunk/exp-drd/tests/std-string.cpp
Modified:
trunk/exp-drd/tests/Makefile.am
trunk/exp-drd/tests/abort.cpp
trunk/exp-drd/tests/fp_race.stderr.exp
trunk/exp-drd/tests/fp_race.stderr.exp2
trunk/exp-drd/tests/pth_cond_race.stderr.exp
trunk/glibc-2.X-drd.supp
Modified: trunk/exp-drd/tests/Makefile.am
===================================================================
--- trunk/exp-drd/tests/Makefile.am 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/Makefile.am 2007-11-27 01:59:38 UTC (rev 7238)
@@ -34,39 +34,27 @@
AM_CXXFLAGS = $(AM_CFLAGS)
check_PROGRAMS = \
- abort \
fp_race \
- new_delete \
pth_broadcast \
pth_cond_race \
pth_create_chain \
pth_detached \
- sigalrm \
- std-string
+ sigalrm
-abort_SOURCES = abort.cpp
-abort_LDADD = -lpthread
-
-fp_race_SOURCES = fp_race.cpp
+fp_race_SOURCES = fp_race.c
fp_race_LDADD = -lpthread
-new_delete_SOURCES = new_delete.cpp
-new_delete_LDADD = -lpthread
-
-pth_broadcast_SOURCES = pth_broadcast.cpp
+pth_broadcast_SOURCES = pth_broadcast.c
pth_broadcast_LDADD = -lpthread
-pth_cond_race_SOURCES = pth_cond_race.cpp
+pth_cond_race_SOURCES = pth_cond_race.c
pth_cond_race_LDADD = -lpthread
-pth_create_chain_SOURCES = pth_create_chain.cpp
+pth_create_chain_SOURCES = pth_create_chain.c
pth_create_chain_LDADD = -lpthread
pth_detached_SOURCES = pth_detached.c
pth_detached_LDADD = -lpthread
-sigalrm_SOURCES = sigalrm.cpp
+sigalrm_SOURCES = sigalrm.c
sigalrm_LDADD = -lpthread -lrt
-
-std_string_SOURCES = std-string.cpp
-std_string_LDADD = -lpthread
Modified: trunk/exp-drd/tests/abort.cpp
===================================================================
--- trunk/exp-drd/tests/abort.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/abort.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,37 +0,0 @@
-// assert(false) calls __assert_fail(), which in turn calls abort() and
-// _IO_flush_all_lockp(). This last function triggers a race. Check that this
-// race is suppressed. Note: the test program below is not sufficient for
-// reproducing this race.
-
-
-#include <iostream>
-#include <fstream>
-#include <cassert>
-#include <pthread.h>
-#include <stdio.h>
-static pthread_mutex_t s_mutex;
-
-void* thread_func(void*)
-{
- pthread_mutex_lock(&s_mutex);
- pthread_mutex_unlock(&s_mutex);
- std::cout << "thread\n";
- assert(false);
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- pthread_mutex_init(&s_mutex, 0);
- pthread_t tid;
- pthread_mutex_lock(&s_mutex);
- pthread_create(&tid, 0, thread_func, 0);
- FILE* fp = fopen("/tmp/valgrind-drd-tests-abort", "w");
- fprintf(fp, "x");
- pthread_mutex_unlock(&s_mutex);
- pthread_join(tid, 0);
- pthread_mutex_destroy(&s_mutex);
- fclose(fp);
-
- return 0;
-}
Added: trunk/exp-drd/tests/fp_race.c
===================================================================
--- trunk/exp-drd/tests/fp_race.c (rev 0)
+++ trunk/exp-drd/tests/fp_race.c 2007-11-27 01:59:38 UTC (rev 7238)
@@ -0,0 +1,139 @@
+/*
+ This file is part of drd, a data race detector.
+
+ Copyright (C) 2006-2007 Bart Van Assche
+ bar...@gm...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+// Test data race detection between floating point variables.
+
+#include <assert.h>
+#include <stdio.h> // printf()
+#include <pthread.h>
+#include <unistd.h> // usleep()
+#include "../drd_clientreq.h"
+
+
+// Local functions declarations.
+
+static void* thread_func(void*);
+
+// Local variables.
+
+// s_mutex protects s_d3.
+static pthread_mutex_t s_mutex;
+
+static double s_d1; // accessed before thread creation and in the created
+ // thread (not a race).
+static double s_d2; // accessed in the created thread and after the join
+ // (not a race).
+static double s_d3; // accessed simultaneously from both threads (race).
+static int s_debug = 0;
+static int s_do_printf = 0;
+static int s_use_mutex = 0;
+
+
+// Function definitions.
+
+static void set_thread_name(const char* const name)
+{
+ int res;
+ VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__SET_THREAD_NAME,
+ name, 0, 0, 0, 0);
+}
+
+int main(int argc, char** argv)
+{
+ int optchar;
+ pthread_t threadid;
+
+ set_thread_name("main");
+
+ while ((optchar = getopt(argc, argv, "dmp")) != EOF)
+ {
+ switch (optchar)
+ {
+ case 'd':
+ s_debug = 1;
+ break;
+ case 'm':
+ s_use_mutex = 1;
+ break;
+ case 'p':
+ s_do_printf = 1;
+ break;
+ default:
+ assert(0);
+ }
+ }
+
+ pthread_mutex_init(&s_mutex, 0);
+
+ // Switch to line-buffered mode, such that timing information can be
+ // obtained for each printf() call with strace.
+ setlinebuf(stdout);
+
+ if (s_debug)
+ {
+ printf("&s_d1 = %p; &s_d2 = %p; &s_d3 = %p\n", &s_d1, &s_d2, &s_d3);
+ }
+
+ s_d1 = 1;
+ s_d3 = 3;
+
+ pthread_create(&threadid, 0, thread_func, 0);
+ // Wait until the printf() in the created thread finished.
+
+ {
+ if (s_use_mutex) pthread_mutex_lock(&s_mutex);
+ s_d3++;
+ if (s_use_mutex) pthread_mutex_unlock(&s_mutex);
+ }
+
+ // Wait until the thread finished.
+ //printf("Before call to pthread_join()\n");
+ //fflush(stdout);
+ pthread_join(threadid, 0);
+ //printf("After call to pthread_join()\n");
+ //fflush(stdout);
+ if (s_do_printf) printf("s_d2 = %g (should be 2)\n", s_d2);
+ if (s_do_printf) printf("s_d3 = %g (should be 5)\n", s_d3);
+
+ pthread_mutex_destroy(&s_mutex);
+
+ return 0;
+}
+
+static void* thread_func(void* thread_arg)
+{
+ set_thread_name("thread_func");
+
+ if (s_do_printf)
+ {
+ printf("s_d1 = %g (should be 1)\n", s_d1);
+ }
+ s_d2 = 2;
+ {
+ if (s_use_mutex) pthread_mutex_lock(&s_mutex);
+ s_d3++;
+ if (s_use_mutex) pthread_mutex_unlock(&s_mutex);
+ }
+ return 0;
+}
Deleted: trunk/exp-drd/tests/fp_race.cpp
===================================================================
--- trunk/exp-drd/tests/fp_race.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/fp_race.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,150 +0,0 @@
-/*
- This file is part of drd, a data race detector.
-
- Copyright (C) 2006-2007 Bart Van Assche
- bar...@gm...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-// Test data race detection between floating point variables.
-
-#include <cassert>
-#include <cstdio> // printf()
-#include <pthread.h>
-#include <unistd.h> // usleep()
-#include "../drd_clientreq.h"
-
-
-// Local functions declarations.
-
-static void* thread_func(void*);
-
-// Local variables.
-
-// s_mutex protects s_d3.
-static pthread_mutex_t s_mutex;
-
-static double s_d1; // accessed before thread creation and in the created
- // thread (not a race).
-static double s_d2; // accessed in the created thread and after the join
- // (not a race).
-static double s_d3; // accessed simultaneously from both threads (race).
-static bool s_debug = false;
-static bool s_do_printf = false;
-static bool s_use_mutex = false;
-
-
-class CScopedLock
-{
-public:
- CScopedLock()
- { if (s_use_mutex) pthread_mutex_lock(&s_mutex); }
- ~CScopedLock()
- { if (s_use_mutex) pthread_mutex_unlock(&s_mutex); }
-
-private:
- CScopedLock(CScopedLock const&);
- CScopedLock& operator=(CScopedLock const&);
-};
-
-
-// Function definitions.
-
-static void set_thread_name(const char* const name)
-{
- int res;
- VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__SET_THREAD_NAME,
- name, 0, 0, 0, 0);
-}
-
-int main(int argc, char** argv)
-{
- set_thread_name("main");
-
- int optchar;
- while ((optchar = getopt(argc, argv, "dmp")) != EOF)
- {
- switch (optchar)
- {
- case 'd':
- s_debug = true;
- break;
- case 'm':
- s_use_mutex = true;
- break;
- case 'p':
- s_do_printf = true;
- break;
- default:
- assert(false);
- }
- }
-
- pthread_mutex_init(&s_mutex, 0);
-
- // Switch to line-buffered mode, such that timing information can be
- // obtained for each printf() call with strace.
- setlinebuf(stdout);
-
- if (s_debug)
- {
- printf("&s_d1 = %p; &s_d2 = %p; &s_d3 = %p\n", &s_d1, &s_d2, &s_d3);
- }
-
- s_d1 = 1;
- s_d3 = 3;
-
- pthread_t threadid;
- pthread_create(&threadid, 0, thread_func, 0);
- // Wait until the printf() in the created thread finished.
-
- {
- CScopedLock ScopedLock;
- s_d3++;
- }
-
- // Wait until the thread finished.
- //printf("Before call to pthread_join()\n");
- //fflush(stdout);
- pthread_join(threadid, 0);
- //printf("After call to pthread_join()\n");
- //fflush(stdout);
- if (s_do_printf) printf("s_d2 = %g (should be 2)\n", s_d2);
- if (s_do_printf) printf("s_d3 = %g (should be 5)\n", s_d3);
-
- pthread_mutex_destroy(&s_mutex);
-
- return 0;
-}
-
-static void* thread_func(void*)
-{
- set_thread_name("thread_func");
-
- if (s_do_printf)
- {
- printf("s_d1 = %g (should be 1)\n", s_d1);
- }
- s_d2 = 2;
- {
- CScopedLock ScopedLock;
- s_d3++;
- }
- return 0;
-}
Modified: trunk/exp-drd/tests/fp_race.stderr.exp
===================================================================
--- trunk/exp-drd/tests/fp_race.stderr.exp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/fp_race.stderr.exp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,6 +1,6 @@
Conflicting load by main at 0x........ size 8
- at 0x........: main (fp_race.cpp:?)
+ at 0x........: main (fp_race.c:?)
Allocation context: s_d3 (offset 0, size 8) in fp_race, NONE:BSS
Other segment start (thread_func)
(thread finished, call stack no longer available)
@@ -8,7 +8,7 @@
(thread finished, call stack no longer available)
Conflicting store by main at 0x........ size 8
- at 0x........: main (fp_race.cpp:?)
+ at 0x........: main (fp_race.c:?)
Allocation context: s_d3 (offset 0, size 8) in fp_race, NONE:BSS
Other segment start (thread_func)
(thread finished, call stack no longer available)
Modified: trunk/exp-drd/tests/fp_race.stderr.exp2
===================================================================
--- trunk/exp-drd/tests/fp_race.stderr.exp2 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/fp_race.stderr.exp2 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,6 +1,6 @@
Conflicting load by main at 0x........ size 8
- at 0x........: main (fp_race.cpp:?)
+ at 0x........: main (fp_race.c:?)
Allocation context: unknown
Other segment start (thread_func)
(thread finished, call stack no longer available)
@@ -8,7 +8,7 @@
(thread finished, call stack no longer available)
Conflicting store by main at 0x........ size 8
- at 0x........: main (fp_race.cpp:?)
+ at 0x........: main (fp_race.c:?)
Allocation context: unknown
Other segment start (thread_func)
(thread finished, call stack no longer available)
Deleted: trunk/exp-drd/tests/new_delete.cpp
===================================================================
--- trunk/exp-drd/tests/new_delete.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/new_delete.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,21 +0,0 @@
-#include <iostream>
-#include <pthread.h>
-
-void* thread_func(void*)
-{
- delete new int;
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- pthread_t tid;
- std::cout << "main, before pthread_create()\n" << std::flush;
- pthread_create(&tid, 0, thread_func, 0);
- std::cout << "main, after pthread_create()\n" << std::flush;
- delete new int;
- std::cout << "main, before pthread_join()\n" << std::flush;
- pthread_join(tid, 0);
- std::cout << "main, after pthread_join()\n" << std::flush;
- return 0;
-}
Added: trunk/exp-drd/tests/pth_broadcast.c
===================================================================
--- trunk/exp-drd/tests/pth_broadcast.c (rev 0)
+++ trunk/exp-drd/tests/pth_broadcast.c 2007-11-27 01:59:38 UTC (rev 7238)
@@ -0,0 +1,175 @@
+// Broadcast a (POSIX threads) signal to all running threads, where the
+// number of threads can be specified on the command line. This test program
+// is intended not only to test the correctness of drd but also to test
+// whether performance does not degrade too much when the number of threads
+// increases.
+
+
+#include <assert.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+// Counting semaphore.
+
+struct csema
+{
+ pthread_mutex_t m_mutex;
+ pthread_cond_t m_cond;
+ int m_count;
+};
+
+void csema_ctr(struct csema* p)
+{
+ memset(p, 0, sizeof(*p));
+ pthread_mutex_init(&p->m_mutex, 0);
+ pthread_cond_init(&p->m_cond, 0);
+}
+
+void csema_dtr(struct csema* p)
+{
+ pthread_cond_destroy(&p->m_cond);
+ pthread_mutex_destroy(&p->m_mutex);
+}
+
+void csema_p(struct csema* p, const int n)
+{
+ pthread_mutex_lock(&p->m_mutex);
+ while (p->m_count < n)
+ pthread_cond_wait(&p->m_cond, &p->m_mutex);
+ p->m_count -= n;
+ pthread_cond_signal(&p->m_cond);
+ pthread_mutex_unlock(&p->m_mutex);
+}
+
+void csema_v(struct csema* p)
+{
+ pthread_mutex_lock(&p->m_mutex);
+ p->m_count++;
+ pthread_cond_signal(&p->m_cond);
+ pthread_mutex_unlock(&p->m_mutex);
+}
+
+
+struct cthread
+{
+ pthread_t m_thread;
+ int m_threadnum;
+ struct csema* m_sema;
+};
+
+void cthread_ctr(struct cthread* p)
+{
+ p->m_thread = 0;
+ p->m_sema = 0;
+}
+
+void cthread_dtr(struct cthread* p)
+{ }
+
+
+// Local variables.
+
+static int s_debug = 0;
+static int s_trace = 0;
+static int s_signal_count;
+static pthread_mutex_t s_mutex;
+static pthread_cond_t s_cond;
+
+
+// Function definitions.
+
+static void thread_func(struct cthread* thread_info)
+{
+ int i;
+
+ pthread_mutex_lock(&s_mutex);
+
+ for (i = 0; i < s_signal_count; i++)
+ {
+ if (s_trace)
+ {
+ printf("thread %d [%d] (1)\n", thread_info->m_threadnum, i);
+ }
+ csema_v(thread_info->m_sema);
+
+ // Wait until the main thread signals us via pthread_cond_broadcast().
+ pthread_cond_wait(&s_cond, &s_mutex);
+ if (s_trace)
+ {
+ printf("thread %d [%d] (2)\n", thread_info->m_threadnum, i);
+ }
+ }
+
+ pthread_mutex_unlock(&s_mutex);
+}
+
+int main(int argc, char** argv)
+{
+ int optchar;
+ int thread_count;
+
+ while ((optchar = getopt(argc, argv, "d")) != EOF)
+ {
+ switch (optchar)
+ {
+ case 'd':
+ s_debug = 1;
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ }
+ s_signal_count = argc > optind ? atoi(argv[optind]) : 10;
+ thread_count = argc > optind + 1 ? atoi(argv[optind + 1]) : 10;
+
+ if (s_debug)
+ printf("&s_cond = %p\n", &s_cond);
+
+ pthread_mutex_init(&s_mutex, 0);
+ pthread_cond_init(&s_cond, 0);
+ {
+ int i;
+ struct csema sema;
+ struct cthread* p;
+ struct cthread* thread_vec;
+
+ csema_ctr(&sema);
+ thread_vec = malloc(sizeof(struct cthread) * thread_count);
+ for (p = thread_vec; p != thread_vec + thread_count; p++)
+ {
+ cthread_ctr(p);
+ p->m_threadnum = p - thread_vec;
+ p->m_sema = &sema;
+ pthread_create(&p->m_thread, 0,
+ (void*(*)(void*))thread_func, &*p);
+ }
+ for (i = 0; i < s_signal_count; i++)
+ {
+ if (s_trace)
+ printf("main [%d] (1)\n", i);
+ csema_p(&sema, thread_count);
+ if (s_trace)
+ printf("main [%d] (2)\n", i);
+ pthread_mutex_lock(&s_mutex);
+ pthread_cond_broadcast(&s_cond);
+ pthread_mutex_unlock(&s_mutex);
+ if (s_trace)
+ printf("main [%d] (3)\n", i);
+ }
+ for (i = 0; i < thread_count; i++)
+ {
+ pthread_join(thread_vec[i].m_thread, 0);
+ cthread_dtr(&thread_vec[i]);
+ }
+ free(thread_vec);
+ csema_dtr(&sema);
+ }
+ pthread_cond_destroy(&s_cond);
+ pthread_mutex_destroy(&s_mutex);
+ return 0;
+}
Deleted: trunk/exp-drd/tests/pth_broadcast.cpp
===================================================================
--- trunk/exp-drd/tests/pth_broadcast.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/pth_broadcast.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,163 +0,0 @@
-// Broadcast a (POSIX threads) signal to all running threads, where the
-// number of threads can be specified on the command line. This test program
-// is intended not only to test the correctness of drd but also to test
-// whether performance does not degrade too much when the number of threads
-// increases.
-
-
-#include <cassert>
-#include <iostream>
-#include <vector>
-#include <pthread.h>
-#include <unistd.h>
-
-// Class definitions.
-
-// Counting semaphore.
-
-class CSema
-{
-public:
- CSema()
- : m_mutex(), m_cond(), m_count(0)
- {
- pthread_mutex_init(&m_mutex, 0);
- pthread_cond_init(&m_cond, 0);
- }
- ~CSema()
- {
- pthread_cond_destroy(&m_cond);
- pthread_mutex_destroy(&m_mutex);
- }
- void p(const int n)
- {
- pthread_mutex_lock(&m_mutex);
- while (m_count < n)
- pthread_cond_wait(&m_cond, &m_mutex);
- m_count -= n;
- pthread_cond_signal(&m_cond);
- pthread_mutex_unlock(&m_mutex);
- }
- void v()
- {
- pthread_mutex_lock(&m_mutex);
- m_count++;
- pthread_cond_signal(&m_cond);
- pthread_mutex_unlock(&m_mutex);
- }
-
-private:
- CSema(CSema const&);
- CSema& operator=(CSema const&);
-
- pthread_mutex_t m_mutex;
- pthread_cond_t m_cond;
- int m_count;
-};
-
-struct CThread
-{
- CThread()
- : m_thread(), m_sema()
- { }
- ~CThread()
- { }
-
- pthread_t m_thread;
- int m_threadnum;
- CSema* m_sema;
-};
-
-
-// Local variables.
-
-static bool s_debug = false;
-static bool s_trace = false;
-static int s_signal_count;
-static pthread_mutex_t s_mutex;
-static pthread_cond_t s_cond;
-
-
-// Function definitions.
-
-static void thread_func(CThread* thread_info)
-{
- pthread_mutex_lock(&s_mutex);
-
- for (int i = 0; i < s_signal_count; i++)
- {
- if (s_trace)
- {
- std::cout << "thread " << thread_info->m_threadnum
- << " [" << i << "] (1)" << std::endl;
- }
- thread_info->m_sema->v();
-
- // Wait until the main thread signals us via pthread_cond_broadcast().
- pthread_cond_wait(&s_cond, &s_mutex);
- if (s_trace)
- {
- std::cout << "thread " << thread_info->m_threadnum
- << " [" << i << "] (2)" << std::endl;
- }
- }
-
- pthread_mutex_unlock(&s_mutex);
-}
-
-int main(int argc, char** argv)
-{
- int optchar;
- while ((optchar = getopt(argc, argv, "d")) != EOF)
- {
- switch (optchar)
- {
- case 'd':
- s_debug = true;
- break;
- default:
- assert(false);
- break;
- }
- }
- s_signal_count = argc > optind ? atoi(argv[optind]) : 10;
- const int thread_count = argc > optind + 1 ? atoi(argv[optind + 1]) : 10;
-
- if (s_debug)
- std::cout << "&s_cond = " << &s_cond << std::endl;
-
- pthread_mutex_init(&s_mutex, 0);
- pthread_cond_init(&s_cond, 0);
- {
- CSema sema;
- std::vector<CThread> thread_vec(thread_count);
- for (std::vector<CThread>::iterator p = thread_vec.begin();
- p != thread_vec.end(); p++)
- {
- p->m_threadnum = std::distance(thread_vec.begin(), p);
- p->m_sema = &sema;
- pthread_create(&p->m_thread, 0,
- (void*(*)(void*))thread_func, &*p);
- }
- for (int i = 0; i < s_signal_count; i++)
- {
- if (s_trace)
- std::cout << "main [" << i << "] (1)\n";
- sema.p(thread_count);
- if (s_trace)
- std::cout << "main [" << i << "] (2)\n";
- pthread_mutex_lock(&s_mutex);
- pthread_cond_broadcast(&s_cond);
- pthread_mutex_unlock(&s_mutex);
- if (s_trace)
- std::cout << "main [" << i << "] (3)\n";
- }
- for (int i = 0; i < thread_count; i++)
- {
- pthread_join(thread_vec[i].m_thread, 0);
- }
- }
- pthread_cond_destroy(&s_cond);
- pthread_mutex_destroy(&s_mutex);
- return 0;
-}
Added: trunk/exp-drd/tests/pth_cond_race.c
===================================================================
--- trunk/exp-drd/tests/pth_cond_race.c (rev 0)
+++ trunk/exp-drd/tests/pth_cond_race.c 2007-11-27 01:59:38 UTC (rev 7238)
@@ -0,0 +1,83 @@
+/* Unit test for drd that triggers a race on the use of a POSIX condition
+ variable. By Bart Van Assche.
+*/
+
+#include <assert.h>
+#include <stdio.h> // printf()
+#include <pthread.h>
+#include <unistd.h> // usleep()
+#include "../drd_clientreq.h"
+
+
+// Local functions declarations.
+
+static void* thread_func(void* thread_arg);
+
+
+// Local variables.
+
+static pthread_mutex_t s_mutex;
+static pthread_cond_t s_cond;
+static int s_use_mutex = 0;
+
+
+// Function definitions.
+
+static void set_thread_name(const char* const name)
+{
+ int res;
+ VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__SET_THREAD_NAME,
+ "%s", name, 0, 0, 0);
+}
+
+int main(int argc, char** argv)
+{
+ int optchar;
+ pthread_t threadid;
+
+ set_thread_name("main");
+
+ while ((optchar = getopt(argc, argv, "m")) != EOF)
+ {
+ switch (optchar)
+ {
+ case 'm':
+ s_use_mutex = 1;
+ break;
+ default:
+ assert(0);
+ }
+ }
+
+ pthread_cond_init(&s_cond, 0);
+ pthread_mutex_init(&s_mutex, 0);
+ pthread_mutex_lock(&s_mutex);
+
+ pthread_create(&threadid, 0, thread_func, 0);
+
+ pthread_cond_wait(&s_cond, &s_mutex);
+ pthread_mutex_unlock(&s_mutex);
+
+ pthread_join(threadid, 0);
+
+ pthread_mutex_destroy(&s_mutex);
+ pthread_cond_destroy(&s_cond);
+
+ return 0;
+}
+
+static void* thread_func(void* thread_arg)
+{
+ set_thread_name("thread_func");
+
+ // Wait until the main thread has entered pthread_cond_wait().
+ pthread_mutex_lock(&s_mutex);
+ pthread_mutex_unlock(&s_mutex);
+
+ // Signal the condition variable.
+ if (s_use_mutex) pthread_mutex_lock(&s_mutex);
+ pthread_cond_signal(&s_cond);
+ if (s_use_mutex) pthread_mutex_unlock(&s_mutex);
+
+ return 0;
+}
Deleted: trunk/exp-drd/tests/pth_cond_race.cpp
===================================================================
--- trunk/exp-drd/tests/pth_cond_race.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/pth_cond_race.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,96 +0,0 @@
-/* Unit test for drd that triggers a race on the use of a POSIX condition
- variable. By Bart Van Assche.
-*/
-
-#include <cassert>
-#include <cstdio> // printf()
-#include <pthread.h>
-#include <unistd.h> // usleep()
-#include "../drd_clientreq.h"
-
-
-// Local functions declarations.
-
-static void* thread_func(void*);
-
-
-// Local variables.
-
-static pthread_mutex_t s_mutex;
-static pthread_cond_t s_cond;
-static bool s_use_mutex = false;
-
-
-class CScopedLock
-{
-public:
- CScopedLock()
- { if (s_use_mutex) pthread_mutex_lock(&s_mutex); }
- ~CScopedLock()
- { if (s_use_mutex) pthread_mutex_unlock(&s_mutex); }
-
-private:
- CScopedLock(CScopedLock const&);
- CScopedLock& operator=(CScopedLock const&);
-};
-
-
-// Function definitions.
-
-static void set_thread_name(const char* const name)
-{
- int res;
- VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__SET_THREAD_NAME,
- "%s", name, 0, 0, 0);
-}
-
-int main(int argc, char** argv)
-{
- set_thread_name("main");
-
- int optchar;
- while ((optchar = getopt(argc, argv, "m")) != EOF)
- {
- switch (optchar)
- {
- case 'm':
- s_use_mutex = true;
- break;
- default:
- assert(false);
- }
- }
-
- pthread_cond_init(&s_cond, 0);
- pthread_mutex_init(&s_mutex, 0);
- pthread_mutex_lock(&s_mutex);
-
- pthread_t threadid;
- pthread_create(&threadid, 0, thread_func, 0);
-
- pthread_cond_wait(&s_cond, &s_mutex);
- pthread_mutex_unlock(&s_mutex);
-
- pthread_join(threadid, 0);
-
- pthread_mutex_destroy(&s_mutex);
- pthread_cond_destroy(&s_cond);
-
- return 0;
-}
-
-static void* thread_func(void*)
-{
- set_thread_name("thread_func");
-
- // Wait until the main thread has entered pthread_cond_wait().
- pthread_mutex_lock(&s_mutex);
- pthread_mutex_unlock(&s_mutex);
-
- // Signal the condition variable.
- if (s_use_mutex) pthread_mutex_lock(&s_mutex);
- pthread_cond_signal(&s_cond);
- if (s_use_mutex) pthread_mutex_unlock(&s_mutex);
-
- return 0;
-}
Modified: trunk/exp-drd/tests/pth_cond_race.stderr.exp
===================================================================
--- trunk/exp-drd/tests/pth_cond_race.stderr.exp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/pth_cond_race.stderr.exp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -2,7 +2,7 @@
Thread 2:
Race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
at 0x........: pthread_cond_signal@* (drd_preloaded.c:?)
- by 0x........: thread_func(void*) (pth_cond_race.cpp:?)
+ by 0x........: thread_func (pth_cond_race.c:?)
by 0x........: vg_thread_wrapper (drd_preloaded.c:?)
by 0x........: start_thread (in libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Added: trunk/exp-drd/tests/pth_create_chain.c
===================================================================
--- trunk/exp-drd/tests/pth_create_chain.c (rev 0)
+++ trunk/exp-drd/tests/pth_create_chain.c 2007-11-27 01:59:38 UTC (rev 7238)
@@ -0,0 +1,58 @@
+// Create threads in such a way that there is a realistic chance that the
+// parent thread finishes before the created thread finishes.
+
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <pthread.h>
+
+
+static pthread_t s_thread[1000];
+static int s_arg[1000];
+
+static void* thread_func(void* p)
+{
+ int thread_count = *(int*)(p);
+ if (thread_count > 0)
+ {
+ thread_count--;
+ // std::cout << "create " << thread_count << std::endl;
+ s_arg[thread_count] = thread_count;
+ pthread_create(&s_thread[thread_count], 0, thread_func,
+ &s_arg[thread_count]);
+#if 0
+ std::cout << "created " << thread_count << "(" << s_thread[thread_count]
+ << ")" << std::endl;
+#endif
+ }
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ int thread_count;
+ int i;
+
+ thread_count = argc > 1 ? atoi(argv[1]) : 50;
+ assert(thread_count <= sizeof(s_thread) / sizeof(s_thread[0]));
+ assert(thread_count >= 1);
+ thread_count--;
+ // std::cout << "create " << thread_count << std::endl;
+ pthread_create(&s_thread[thread_count], 0, thread_func,
+ &thread_count);
+#if 0
+ std::cout << "created " << thread_count << "(" << s_thread[thread_count]
+ << ")" << std::endl;
+#endif
+ for (i = thread_count; i >= 0; i--)
+ {
+ // std::cout << "join " << i << "(" << s_thread[i] << ")" << std::endl;
+ pthread_join(s_thread[i], 0);
+ }
+ return 0;
+}
+
+// Local variables:
+// compile-command: "g++ -o pthread_create-chain -g -Wall -Wextra -Werror -Wno-sign-compare -Wno-unused pthread_create-chain.cpp -lpthread"
+// End:
Deleted: trunk/exp-drd/tests/pth_create_chain.cpp
===================================================================
--- trunk/exp-drd/tests/pth_create_chain.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/pth_create_chain.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,53 +0,0 @@
-// Create threads in such a way that there is a realistic chance that the
-// parent thread finishes before the created thread finishes.
-
-#include <cassert>
-#include <cstdlib>
-#include <iostream>
-#include <pthread.h>
-
-static pthread_t s_thread[1000];
-static int s_arg[1000];
-
-static void* thread_func(void* p)
-{
- int thread_count = *reinterpret_cast<int*>(p);
- if (thread_count > 0)
- {
- thread_count--;
- // std::cout << "create " << thread_count << std::endl;
- s_arg[thread_count] = thread_count;
- pthread_create(&s_thread[thread_count], 0, thread_func,
- &s_arg[thread_count]);
-#if 0
- std::cout << "created " << thread_count << "(" << s_thread[thread_count]
- << ")" << std::endl;
-#endif
- }
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- unsigned thread_count = argc > 1 ? atoi(argv[1]) : 50;
- assert(thread_count <= sizeof(s_thread) / sizeof(s_thread[0]));
- assert(thread_count >= 1);
- thread_count--;
- // std::cout << "create " << thread_count << std::endl;
- pthread_create(&s_thread[thread_count], 0, thread_func,
- const_cast<unsigned*>(&thread_count));
-#if 0
- std::cout << "created " << thread_count << "(" << s_thread[thread_count]
- << ")" << std::endl;
-#endif
- for (int i = thread_count; i >= 0; i--)
- {
- // std::cout << "join " << i << "(" << s_thread[i] << ")" << std::endl;
- pthread_join(s_thread[i], 0);
- }
- return 0;
-}
-
-// Local variables:
-// compile-command: "g++ -o pthread_create-chain -g -Wall -Wextra -Werror -Wno-sign-compare -Wno-unused pthread_create-chain.cpp -lpthread"
-// End:
Added: trunk/exp-drd/tests/sigalrm.c
===================================================================
--- trunk/exp-drd/tests/sigalrm.c (rev 0)
+++ trunk/exp-drd/tests/sigalrm.c 2007-11-27 01:59:38 UTC (rev 7238)
@@ -0,0 +1,95 @@
+#include <assert.h>
+#include <errno.h>
+#include <pthread.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <asm/unistd.h>
+#include "../drd_clientreq.h"
+
+
+static int s_debug = 0;
+
+
+static int getktid()
+{
+ return syscall(__NR_gettid);
+}
+
+static int getvgtid()
+{
+ int res;
+ VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__GET_THREAD_SELF, 0, 0, 0,0,0);
+ return res;
+}
+
+static void SignalHandler(const int iSignal)
+{
+ if (s_debug)
+ {
+ char msg[256];
+ snprintf(msg, sizeof(msg), "Signal %d was delivered to kernel thread ID %d"
+ " / Valgrind thread ID %d\n",
+ iSignal, getktid(), getvgtid());
+ write(STDOUT_FILENO, msg, strlen(msg));
+ }
+}
+
+void* thread_func(void* thread_arg)
+{
+ struct timespec tsRemain, tsDelay;
+
+ if (s_debug)
+ {
+ printf("thread: kernel thread ID %d / Valgrind thread ID %d\n",
+ getktid(), getvgtid());
+ }
+
+ tsDelay.tv_sec = 10;
+ tsDelay.tv_nsec = 0;
+ clock_nanosleep(CLOCK_MONOTONIC, 0, &tsDelay, &tsRemain);
+ //assert(result < 0 && errno == EINTR);
+
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ int vgthreadid;
+ pthread_t threadid;
+ struct timespec tsDelay;
+
+ // Primitive argument parsing.
+ if (argc > 1)
+ s_debug = 1;
+
+ vgthreadid = getvgtid();
+
+ if (s_debug)
+ {
+ printf("main: kernel thread ID %d / Valgrind thread ID %d\n",
+ getktid(), vgthreadid);
+ }
+
+ {
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = &SignalHandler;
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGALRM, &sa, 0);
+ }
+
+ pthread_create(&threadid, 0, thread_func, 0);
+ // Wait until the thread is inside clock_nanosleep().
+ tsDelay.tv_sec = 0;
+ tsDelay.tv_nsec = 20 * 1000 * 1000;
+ clock_nanosleep(CLOCK_MONOTONIC, 0, &tsDelay, 0);
+ // And send SIGALRM to the thread.
+ pthread_kill(threadid, SIGALRM);
+ pthread_join(threadid, 0);
+
+ return 0;
+}
Deleted: trunk/exp-drd/tests/sigalrm.cpp
===================================================================
--- trunk/exp-drd/tests/sigalrm.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/sigalrm.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,113 +0,0 @@
-#include <cassert>
-#include <cerrno>
-#include <cstdio>
-#include <cstdlib>
-#include <ctime>
-#include <iostream>
-#include <features.h>
-#include <pthread.h>
-#include <signal.h>
-#include <unistd.h>
-#include <string.h>
-#include "../drd_clientreq.h"
-#include <asm/unistd.h>
-
-#if !defined(__GLIBC_PREREQ)
-# error "This program requires __GLIBC_PREREQ (in /usr/include/features.h)"
-#endif
-
-#if __GLIBC_PREREQ(2,3)
-
-#define VALGRIND_START_NEW_SEGMENT \
-{ \
- int res; \
- VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_START_NEW_SEGMENT, \
- pthread_self(), 0, 0,0,0); \
-}
-
-static bool s_debug = false;
-
-
-static int getktid()
-{
- return syscall(__NR_gettid);
-}
-
-static int getvgtid()
-{
- int res;
- VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__GET_THREAD_SELF, 0, 0, 0,0,0);
- return res;
-}
-
-static void SignalHandler(const int iSignal)
-{
- if (s_debug)
- {
- char msg[256];
- snprintf(msg, sizeof(msg), "Signal %d was delivered to kernel thread ID %d"
- " / Valgrind thread ID %d\n",
- iSignal, getktid(), getvgtid());
- write(STDOUT_FILENO, msg, strlen(msg));
- }
-}
-
-void* thread_func(void*)
-{
- if (s_debug)
- {
- std::cout << "thread: kernel thread ID " << getktid()
- << " / Valgrind thread ID " << getvgtid() << "\n";
- }
-
- const timespec tsDelay = { 10, 0 };
- timespec tsRemain;
- clock_nanosleep(CLOCK_MONOTONIC, 0, &tsDelay, &tsRemain);
- //assert(result < 0 && errno == EINTR);
-
- return 0;
-}
-
-int main(int argc, char** )
-{
- // Primitive argument parsing.
- if (argc > 1)
- s_debug = true;
-
- const int vgthreadid = getvgtid();
-
- if (s_debug)
- {
- std::cout << "main: kernel thread ID " << getktid()
- << " / Valgrind thread ID " << vgthreadid << std::endl;
- }
-
- {
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = &SignalHandler;
- sigemptyset(&sa.sa_mask);
- sigaction(SIGALRM, &sa, 0);
- }
-
- pthread_t threadid;
- pthread_create(&threadid, 0, thread_func, 0);
- // Wait until the thread is inside clock_nanosleep().
- const timespec tsDelay = { 0, 20 * 1000 * 1000 };
- clock_nanosleep(CLOCK_MONOTONIC, 0, &tsDelay, 0);
- // And send SIGALRM to the thread.
- pthread_kill(threadid, SIGALRM);
- pthread_join(threadid, 0);
-
- return 0;
-}
-
-#else /* !__GLIBC_PREREQ(2,3) */
-
-int main(int argc, char** )
-{
- std::cout << "program does not work on glibc < 2.3" << std::endl;
- return 0;
-}
-
-#endif /* __GLIBC_PREREQ(2,3) */
Deleted: trunk/exp-drd/tests/std-string.cpp
===================================================================
--- trunk/exp-drd/tests/std-string.cpp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/exp-drd/tests/std-string.cpp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -1,45 +0,0 @@
-// Note: the code below is not yet sufficient for reproducing the race on
-// basic_string<>::_Rep_base::_M_refcount
-
-
-#include <iostream>
-#include <pthread.h>
-#include <string>
-#include <unistd.h>
-
-
-static std::string s_string;
-
-static void* thread_func(void*)
-{
- std::cout << "thread: string = " << s_string << std::endl;
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- const bool detached = argc <= 1;
-
- s_string = "(allocated by main thread)";
-
- pthread_t tid;
- pthread_attr_t attr;
- pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr,
- detached
- ? PTHREAD_CREATE_DETACHED
- : PTHREAD_CREATE_JOINABLE);
- pthread_create(&tid, &attr, thread_func, 0);
- pthread_attr_destroy(&attr);
-
- std::cout << std::flush;
-
- if (detached)
- sleep(1);
- else
- pthread_join(tid, 0);
-
- std::cout << std::flush;
-
- return 0;
-}
Modified: trunk/glibc-2.X-drd.supp
===================================================================
--- trunk/glibc-2.X-drd.supp 2007-11-27 01:59:02 UTC (rev 7237)
+++ trunk/glibc-2.X-drd.supp 2007-11-27 01:59:38 UTC (rev 7238)
@@ -74,7 +74,7 @@
exp-drd:ConflictingAccess
fun:start_thread
fun:clone
-}
+}
{
pthread
exp-drd:ConflictingAccess
|
|
From: <sv...@va...> - 2007-11-27 01:59:00
|
Author: njn
Date: 2007-11-27 01:59:02 +0000 (Tue, 27 Nov 2007)
New Revision: 7237
Log:
Tweaked the tool-writing docs.
Modified:
trunk/docs/internals/roadmap.txt
trunk/docs/xml/manual-writing-tools.xml
Modified: trunk/docs/internals/roadmap.txt
===================================================================
--- trunk/docs/internals/roadmap.txt 2007-11-27 01:34:06 UTC (rev 7236)
+++ trunk/docs/internals/roadmap.txt 2007-11-27 01:59:02 UTC (rev 7237)
@@ -13,8 +13,6 @@
* Add ppc{32,64}/AIX5 support [Done by Julian]
-* Add some more experimental tools?
-
* Rework Massif [Done by Nick]
* Rework Helgrind [Done by Julian]
Modified: trunk/docs/xml/manual-writing-tools.xml
===================================================================
--- trunk/docs/xml/manual-writing-tools.xml 2007-11-27 01:34:06 UTC (rev 7236)
+++ trunk/docs/xml/manual-writing-tools.xml 2007-11-27 01:59:02 UTC (rev 7237)
@@ -158,16 +158,17 @@
The output should be something like this:</para>
<programlisting><![CDATA[
==738== foobar-0.0.1, a foobarring tool for x86-linux.
- ==738== Copyright (C) 1066AD, and GNU GPL'd, by J. Random Hacker.
- ==738== Built with valgrind-1.1.0, a program execution monitor.
- ==738== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
- ==738== Estimated CPU clock rate is 1400 MHz
+ ==738== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
+ ==738== Using LibVEX rev 1791, a library for dynamic binary translation.
+ ==738== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
+ ==738== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
+ ==738== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==738== For more details, rerun with: -v
- ==738== Wed Sep 25 10:31:54 BST 2002
+ ==738==
+ Tue Nov 27 12:40:49 EST 2007
==738==]]></programlisting>
- <para>The tool does nothing except run the program
- uninstrumented.</para>
+ <para>The tool does nothing except run the program uninstrumented.</para>
</listitem>
</orderedlist>
@@ -270,8 +271,9 @@
<para><function>instrument()</function> is the interesting one. It
allows you to instrument <emphasis>VEX IR</emphasis>, which is
-Valgrind's RISC-like intermediate language. VEX IR is best described in
-the header file <filename>VEX/pub/libvex_ir.h</filename>.</para>
+Valgrind's RISC-like intermediate language. VEX IR is described fairly well
+in the comments of the header file
+<filename>VEX/pub/libvex_ir.h</filename>.</para>
<para>The easiest way to instrument VEX IR is to insert calls to C
functions when interesting things happen. See the tool "Lackey"
@@ -305,30 +307,34 @@
<para>The files <filename>include/pub_tool_*.h</filename> contain all the
types, macros, functions, etc. that a tool should (hopefully) need, and are
the only <filename>.h</filename> files a tool should need to
-<computeroutput>#include</computeroutput>.</para>
+<computeroutput>#include</computeroutput>. They have a reasonable amount of
+documentation in it that should hopefully be enough to get you going.</para>
-<para>In particular, you can't use anything from the C library (there
+<para>Note that you can't use anything from the C library (there
are deep reasons for this, trust us). Valgrind provides an
implementation of a reasonable subset of the C library, details of which
are in <filename>pub_tool_libc*.h</filename>.</para>
-<para>Similarly, when writing a tool, you shouldn't need to look at any
-of the code in Valgrind's core. Although it might be useful sometimes
-to help understand something.</para>
+<para>When writing a tool, you shouldn't need to look at any of the code in
+Valgrind's core. Although it might be useful sometimes to help understand
+something.</para>
-<para>The <filename>pub_tool_*.h</filename> files have a reasonable
-amount of documentation in it that should hopefully be enough to get
-you going.
-Also, <filename>VEX/pub/libvex_basictypes.h</filename> and
-<filename>VEX/pub/libvex_ir.h</filename> have some more details that are
-worth reading, particularly about VEX IR. But ultimately, the tools
-distributed (Memcheck, Cachegrind, Lackey, etc.) are probably the best
-documentation of all, for the moment.</para>
+<para>The <filename>include/pub_tool_basics.h</filename> and
+<filename>VEX/pub/libvex_basictypes.h</filename> files file have some basic
+types that are widely used.</para>
+<para>Ultimately, the tools distributed (Memcheck, Cachegrind, Lackey, etc.)
+are probably the best documentation of all, for the moment.</para>
+
<para>Note that the <computeroutput>VG_</computeroutput> macro is used
heavily. This just prepends a longer string in front of names to avoid
-potential namespace clashes.</para>
+potential namespace clashes. It is defined in
+<filename>include/pub_tool_basics_asm.h</filename>.</para>
+<para>There are some assorted notes about various aspects of the
+implementation in <filename>docs/internals/</filename>. Much of it
+isn't that relevant to tool-writers, however.</para>
+
</sect2>
@@ -654,6 +660,10 @@
<para>To profile a tool, use Cachegrind on it. Read README_DEVELOPERS for
details on running Valgrind under Valgrind.</para>
+<para>Alternatively, you can use OProfile. In most cases, it is better than
+Cachegrind because it's much faster, and gives real times, as opposed to
+instruction and cache hit/miss counts.</para>
+
</sect2>
|
|
From: <sv...@va...> - 2007-11-27 01:34:07
|
Author: njn
Date: 2007-11-27 01:34:06 +0000 (Tue, 27 Nov 2007)
New Revision: 7236
Log:
Add Massif bugs fixed by the rewrite. I added them to the top part of the
file, not the "after 3.2.3" section, I hope this is the right place for
them.
Modified:
trunk/docs/internals/3_2_BUGSTATUS.txt
Modified: trunk/docs/internals/3_2_BUGSTATUS.txt
===================================================================
--- trunk/docs/internals/3_2_BUGSTATUS.txt 2007-11-27 01:27:12 UTC (rev 7235)
+++ trunk/docs/internals/3_2_BUGSTATUS.txt 2007-11-27 01:34:06 UTC (rev 7236)
@@ -24,8 +24,17 @@
79844 fixed Helgrind complains about race condition which does not exist
+82871 fixed Massif output function names too short
+89061 fixed Massif: ms_main.c:485 (get_XCon): Assertion `xpt->max_chi...
+92615 fixed Write output from Massif at crash
+95483 fixed massif feature request: include peak allocation in report
+
+112163 fixed MASSIF crashed with signal 7 (SIGBUS) after running 2 days
+
119404 r7175 problems running setuid executables (partial fix)
+121629 fixed add instruction-counting mode for timing
+
124478 glibc-fix memcheck reports uninitialized bytes on
timer_create() while it should not
@@ -37,6 +46,12 @@
129937 fixed ==150380
+129576 fixed Massif loses track of memory, incorrect graphs
+
+132132 fixed massif --format=html output does not do html entity escaping
+
+132950 wontfix Heap alloc/usage summary
+
133962 vx1792 unhandled instruction bytes: 0xF2 0x4C 0xF 0x10
134990 fixed use -fno-stack-protector if possible
@@ -46,6 +61,11 @@
137396 fixed :-) I would really like helgrind to work again...
137714 vx1787 x86/amd64->IR: 0x66 0xF 0xF7 0xC6 (maskmovq, maskmovdq)
+141631 fixed Massif: percentages don't add up correctly
+142706 fixed massif numbers don't seem to add up
+143062 fixed massif crashes on app exit with signal 8 SIGFPE
+144453 fixed (get_XCon): Assertion 'xpt->max_children != 0' failed.
+
145559 r7168 valgrind aborts when malloc_stats is called
145609 r7191 valgrind aborts all runs with 'repeated section!'
145622 r7183 --db-attach broken again on x86-64
@@ -53,6 +73,7 @@
145887 r7193 PPC32: getitimer() system call is not supported (patch)
146252 fixed ==150678
+146456 fixed (update_XCon): Assertion 'xpt->curr_space >= -space_delta'...
146701 fixed ==134990
146781 r7169 Adding support for private futexes
@@ -72,6 +93,7 @@
149182 vx1784/5 PPC Trap instructions not implemented in valgrind
149838 marginal x86->IR: 0xF 0xAE 0xD 0xE0 (FXRSTOR ?)
+149504 fixed Assertion hit on alloc_xpt->curr_space >= -space_delta
149519 r6813/4 ppc32: V aborts with SIGSEGV on execution of a signal handler
149878 marginal add (proper) check for calloc integer overflow
149892 fixed ==137714
|
|
From: <sv...@va...> - 2007-11-27 01:27:10
|
Author: weidendo
Date: 2007-11-27 01:27:12 +0000 (Tue, 27 Nov 2007)
New Revision: 7235
Log:
callgrind: support for --callgrind-out-file
This removes the --base option, which is replaced by
--callgrind-out-file.
Plus manual update.
Modified:
trunk/callgrind/clo.c
trunk/callgrind/command.c
trunk/callgrind/docs/cl-manual.xml
trunk/callgrind/docs/man-annotate.xml
trunk/callgrind/docs/man-callgrind.xml
trunk/callgrind/dump.c
trunk/callgrind/global.h
trunk/docs/xml/valgrind-manpage.xml
Modified: trunk/callgrind/clo.c
===================================================================
--- trunk/callgrind/clo.c 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/callgrind/clo.c 2007-11-27 01:27:12 UTC (rev 7235)
@@ -587,8 +587,8 @@
fnc->separate_recursions = n;
}
- else if (0 == VG_(strncmp)(arg, "--base=", 7))
- CLG_(clo).filename_base = VG_(strdup)(arg+7);
+ else if (0 == VG_(strncmp)(arg, "--callgrind-out-file=", 21))
+ CLG_(clo).out_format = VG_(strdup)(arg+21);
else if (0 == VG_(strcmp)(arg, "--mangle-names=yes"))
CLG_(clo).mangle_names = True;
@@ -656,7 +656,7 @@
{
VG_(printf)(
"\n dump creation options:\n"
-" --base=<prefix> Prefix for profile files [" DEFAULT_DUMPNAME "]\n"
+" --callgrind-out-file=<f> Output file name [callgrind.out.%%p]\n"
" --dump-line=no|yes Dump source lines of costs? [yes]\n"
" --dump-instr=no|yes Dump instruction address of costs? [no]\n"
" --compress-strings=no|yes Compress strings in profile dump? [yes]\n"
@@ -731,7 +731,7 @@
/* Default values for command line arguments */
/* dump options */
- CLG_(clo).filename_base = 0;
+ CLG_(clo).out_format = 0;
CLG_(clo).combine_dumps = False;
CLG_(clo).compress_strings = True;
CLG_(clo).compress_mangled = False;
Modified: trunk/callgrind/command.c
===================================================================
--- trunk/callgrind/command.c 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/callgrind/command.c 2007-11-27 01:27:12 UTC (rev 7235)
@@ -46,7 +46,7 @@
static Char* result_file2 = 0;
static Char* current_result_file = 0;
static Char* info_file = 0;
-static Char* dump_base = 0;
+static Char* out_file = 0;
static Int thisPID = 0;
@@ -57,20 +57,14 @@
{
Int fd, size;
SysRes res;
- Char* dir, *dump_filename;
+ Char* dir;
CLG_ASSERT(thisPID != 0);
fd = -1;
- dir = CLG_(get_base_directory)();
- dump_base = CLG_(get_dump_file_base)();
+ dir = CLG_(get_out_directory)();
+ out_file = CLG_(get_out_file)();
- /* base name of dump files with PID ending */
- size = VG_(strlen)(dump_base) + 10;
- dump_filename = (char*) CLG_MALLOC(size);
- CLG_ASSERT(dump_filename != 0);
- VG_(sprintf)(dump_filename, "%s.%d", dump_base, thisPID);
-
/* name of command file */
size = VG_(strlen)(dir) + VG_(strlen)(DEFAULT_COMMANDNAME) +10;
command_file = (char*) CLG_MALLOC(size);
@@ -106,7 +100,7 @@
VG_(sprintf)(info_file, "%s.%d", DEFAULT_INFONAME, thisPID);
CLG_DEBUG(1, "Setup for interactive control (PID: %d):\n", thisPID);
- CLG_DEBUG(1, " dump file base: '%s'\n", dump_filename);
+ CLG_DEBUG(1, " output file: '%s'\n", out_file);
CLG_DEBUG(1, " command file: '%s'\n", command_file);
CLG_DEBUG(1, " result file: '%s'\n", result_file);
CLG_DEBUG(1, " info file: '%s'\n", info_file);
@@ -139,7 +133,7 @@
VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
WRITE_STR3(fd, "base: ", dir, "\n");
- WRITE_STR3(fd, "dumps: ", dump_filename, "\n");
+ WRITE_STR3(fd, "dumps: ", out_file, "\n");
WRITE_STR3(fd, "control: ", command_file, "\n");
WRITE_STR3(fd, "result: ", result_file, "\n");
@@ -209,7 +203,7 @@
VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
/* "base:" line */
- WRITE_STR3(fd, "base: ", dump_base, "\n");
+ WRITE_STR3(fd, "base: ", out_file, "\n");
/* "cmd:" line */
WRITE_STR2(fd, "cmd: ", VG_(args_the_exename));
Modified: trunk/callgrind/docs/cl-manual.xml
===================================================================
--- trunk/callgrind/docs/cl-manual.xml 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/callgrind/docs/cl-manual.xml 2007-11-27 01:27:12 UTC (rev 7235)
@@ -126,7 +126,7 @@
</para>
<para>After program termination, a profile data file named
- <computeroutput>callgrind.out.pid</computeroutput>
+ <computeroutput>callgrind.out.<pid></computeroutput>
is generated, where <emphasis>pid</emphasis> is the process ID
of the program being profiled.
The data file contains information about the calls made in the
@@ -135,7 +135,7 @@
<para>To generate a function-by-function summary from the profile
data file, use
- <screen>callgrind_annotate [options] callgrind.out.pid</screen>
+ <screen>callgrind_annotate [options] callgrind.out.<pid></screen>
This summary is similar to the output you get from a Cachegrind
run with <computeroutput>cg_annotate</computeroutput>: the list
of functions is ordered by exclusive cost of functions, which also
@@ -487,7 +487,7 @@
xreflabel="Miscellaneous options">
<title>Miscellaneous options</title>
-<variablelist id="cmd-options.misc">
+<variablelist id="cl.opts.list.misc">
<varlistentry>
<term><option>--help</option></term>
@@ -515,26 +515,24 @@
These options influence the name and format of the profile data files.
</para>
-<variablelist id="cmd-options.creation">
+<variablelist id="cl.opts.list.creation">
- <varlistentry id="opt.base">
+ <varlistentry id="opt.callgrind-out-file" xreflabel="--callgrind-out-file">
<term>
- <option><![CDATA[--base=<prefix> [default: callgrind.out] ]]></option>
+ <option><![CDATA[--callgrind-out-file=<file> ]]></option>
</term>
<listitem>
- <para>Specify the base name for the dump file names. To
- distinguish different profile runs of the same application,
- <computeroutput>.<pid></computeroutput> is appended to the
- base dump file name with
- <computeroutput><pid></computeroutput> being the process ID
- of the profiled program. When multiple dumps are made, the file name
- is modified further; see below.</para>
- <para>This option is
- especially useful if your application changes its working
- directory. Usually, the dump file is generated in the current
- working directory of the application at program termination. By
- giving an absolute path with the base specification, you can force
- a fixed directory for the dump files.</para>
+ <para>Write the profile data to
+ <computeroutput>file</computeroutput> rather than to the default
+ output file,
+ <computeroutput>callgrind.out.<pid></computeroutput>. The
+ <option>%p</option> and <option>%q</option> format specifiers
+ can be used to embed the process ID and/or the contents of an
+ environment variable in the name, as is the case for the core
+ option <option>--log-file</option>. See <link
+ linkend="manual-core.basicopts">here</link> for details.
+ When multiple dumps are made, the file name
+ is modified further; see below.</para>
</listitem>
</varlistentry>
@@ -611,7 +609,7 @@
<computeroutput>callgrind_control</computeroutput>.
</para>
-<variablelist id="cmd-options.activity">
+<variablelist id="cl.opts.list.activity">
<varlistentry id="opt.dump-every-bb" xreflabel="--dump-every-bb">
<term>
@@ -664,7 +662,7 @@
These options specify when events are to be aggregated into event counts.
Also see <xref linkend="cl-manual.limits"/>.</para>
-<variablelist id="cmd-options.collection">
+<variablelist id="cl.opts.list.collection">
<varlistentry id="opt.instr-atstart" xreflabel="--instr-atstart">
<term>
@@ -873,7 +871,7 @@
xreflabel="Cache simulation options">
<title>Cache simulation options</title>
-<variablelist id="cmd-options.simulation">
+<variablelist id="cl.opts.list.simulation">
<varlistentry id="opt.simulate-cache" xreflabel="--simulate-cache">
<term>
@@ -884,7 +882,22 @@
only instruction read accesses will be profiled.</para>
</listitem>
</varlistentry>
-
+
+ <varlistentry id="opt.simulate-hwpref" xreflabel="--simulate-hwpref">
+ <term>
+ <option><![CDATA[--simulate-hwpref=<yes|no> [default: no] ]]></option>
+ </term>
+ <listitem>
+ <para>Specify whether simulation of a hardware prefetcher should be
+ added which is able to detect stream access in the second level cache
+ by comparing accesses to separate to each page.
+ As the simulation can not decide about any timing issues of prefetching,
+ it is assumed that any hardware prefetch triggered succeeds before a
+ real access is done. Thus, this gives a best-case scenario by covering
+ all possible stream accesses.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>
Modified: trunk/callgrind/docs/man-annotate.xml
===================================================================
--- trunk/callgrind/docs/man-annotate.xml 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/callgrind/docs/man-annotate.xml 2007-11-27 01:27:12 UTC (rev 7235)
@@ -15,7 +15,7 @@
<refnamediv id="a-name">
<refname>callgrind_annotate</refname>
<refpurpose>produces human readable ASCII output from profile
- information in <command>cachegrind.out</command> files</refpurpose>
+ information in <command>callgrind.out.<pid></command> files</refpurpose>
</refnamediv>
<refsynopsisdiv id="a-synopsis">
Modified: trunk/callgrind/docs/man-callgrind.xml
===================================================================
--- trunk/callgrind/docs/man-callgrind.xml 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/callgrind/docs/man-callgrind.xml 2007-11-27 01:27:12 UTC (rev 7235)
@@ -40,7 +40,7 @@
program run, optionally separately for every thread in the case of
multithreaded code. For interactive inspection and control, see
<command>callgrind_control</command>. The data produced
-(callgrind.out.PID) can be analysed with
+(callgrind.out.<pid>) can be analysed with
<command>callgrind_annotate</command> or better with the graphical profile
visualization <command>KCachegrind</command>. Further documentation can
be found in HTML format either on your filesystem:
Modified: trunk/callgrind/dump.c
===================================================================
--- trunk/callgrind/dump.c 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/callgrind/dump.c 2007-11-27 01:27:12 UTC (rev 7235)
@@ -36,8 +36,8 @@
/* Dump Part Counter */
static Int out_counter = 0;
-static Char* dump_file_base = 0;
-static Char* base_directory = 0;
+static Char* out_file = 0;
+static Char* out_directory = 0;
static Bool dumps_initialized = False;
/* Command */
@@ -62,16 +62,16 @@
return out_counter;
}
-Char* CLG_(get_dump_file_base)()
+Char* CLG_(get_out_file)()
{
CLG_ASSERT(dumps_initialized);
- return dump_file_base;
+ return out_file;
}
-Char* CLG_(get_base_directory)()
+Char* CLG_(get_out_directory)()
{
CLG_ASSERT(dumps_initialized);
- return base_directory;
+ return out_directory;
}
/*------------------------------------------------------------*/
@@ -1282,7 +1282,7 @@
CLG_ASSERT(filename != 0);
if (!CLG_(clo).combine_dumps) {
- i = VG_(sprintf)(filename, "%s.%d", dump_file_base, VG_(getpid)());
+ i = VG_(sprintf)(filename, "%s", out_file);
if (trigger)
i += VG_(sprintf)(filename+i, ".%d", out_counter);
@@ -1293,7 +1293,7 @@
res = VG_(open)(filename, VKI_O_WRONLY|VKI_O_TRUNC, 0);
}
else {
- VG_(sprintf)(filename, "%s.%d", dump_file_base, VG_(getpid)());
+ VG_(sprintf)(filename, "%s", out_file);
res = VG_(open)(filename, VKI_O_WRONLY|VKI_O_APPEND, 0);
if (!res.isError && out_counter>1)
appending = True;
@@ -1656,69 +1656,43 @@
}
/*
- * Set up file names for dump output: base_directory, dump_file_base
- * The final filename of a dump is constructed at dump time from
- * the PID, thread ID and dump counter.
+ * Set up file names for dump output: <out_directory>, <out_file>.
+ * <out_file> is derived from the output format string, which defaults
+ * to "callgrind.out.%p", where %p is replaced with the PID.
+ * For the final file name, on intermediate dumps a counter is appended,
+ * and further, if separate dumps per thread are requested, the thread ID.
*
- * These always will contain a full absolute path.
- * If no prefix is given (via option "--base=<prefix>"), the current
- * working directory at program start is used, otherwise <prefix> can
- * be relative to cwd or absolute.
+ * <out_file> always starts with a full absolute path.
+ * If the output format string represents a relative path, the current
+ * working directory at program start is used.
*/
void CLG_(init_dumps)()
{
- Int size;
+ Int lastSlash, i;
SysRes res;
- if (!CLG_(clo).filename_base)
- CLG_(clo).filename_base = DEFAULT_DUMPNAME;
+ if (!CLG_(clo).out_format)
+ CLG_(clo).out_format = DEFAULT_OUTFORMAT;
- /* get base directory for dump/command/result files */
- if (CLG_(clo).filename_base[0] == '/') {
- int lastSlash = 0, i =1;
- while(CLG_(clo).filename_base[i]) {
- for(; CLG_(clo).filename_base[i] &&
- CLG_(clo).filename_base[i] != '/'; i++);
- if (CLG_(clo).filename_base[i] != '/') break;
- lastSlash = i;
- i++;
- }
- i = lastSlash;
- base_directory = (Char*) CLG_MALLOC(i+1);
- VG_(strncpy)(base_directory, CLG_(clo).filename_base, i);
- base_directory[i] = 0;
+ // Setup output filename.
+ out_file =
+ VG_(expand_file_name)("--callgrind-out-file", CLG_(clo).out_format);
- dump_file_base = CLG_(clo).filename_base;
+ /* get base directory for dump/command/result files */
+ CLG_ASSERT(out_file[0] == '/');
+ lastSlash = 0;
+ i = 1;
+ while(out_file[i]) {
+ if (out_file[i] == '/') lastSlash = i;
+ i++;
}
- else {
- size = 100;
- base_directory = 0;
+ i = lastSlash;
+ out_directory = (Char*) CLG_MALLOC(i+1);
+ VG_(strncpy)(out_directory, out_file, i);
+ out_directory[i] = 0;
- /* getcwd() fails if the buffer isn't big enough -- keep doubling size
- until it succeeds. */
- while (NULL == base_directory) {
- base_directory = CLG_MALLOC(size);
- if (!VG_(get_startup_wd)(base_directory, size)) {
- VG_(free)(base_directory);
- base_directory = 0;
- size *= 2;
- }
- /* in fact, this loop could run forever (or at least till
- CLG_MALLOC fails) if VG_(getcwd) returns False for any
- reason other than the buffer is too small. So be
- safe: */
- tl_assert( size < 100 * 200 );
- }
-
- size = VG_(strlen)(base_directory) + VG_(strlen)(CLG_(clo).filename_base) +2;
- dump_file_base = (Char*) CLG_MALLOC(size);
- CLG_ASSERT(dump_file_base != 0);
- VG_(sprintf)(dump_file_base, "%s/%s",
- base_directory, CLG_(clo).filename_base);
- }
-
/* allocate space big enough for final filenames */
- filename = (Char*) CLG_MALLOC(VG_(strlen)(dump_file_base)+32);
+ filename = (Char*) CLG_MALLOC(VG_(strlen)(out_file)+32);
CLG_ASSERT(filename != 0);
/* Make sure the output base file can be written.
@@ -1727,7 +1701,7 @@
* file: This is probably because of missing rights,
* and trace parts wouldn't be allowed to be written, too.
*/
- VG_(sprintf)(filename, "%s.%d", dump_file_base, VG_(getpid)());
+ VG_(strcpy)(filename, out_file);
res = VG_(open)(filename, VKI_O_WRONLY|VKI_O_TRUNC, 0);
if (res.isError) {
res = VG_(open)(filename, VKI_O_CREAT|VKI_O_WRONLY,
Modified: trunk/callgrind/global.h
===================================================================
--- trunk/callgrind/global.h 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/callgrind/global.h 2007-11-27 01:27:12 UTC (rev 7235)
@@ -50,7 +50,7 @@
/*--- Command line options ---*/
/*------------------------------------------------------------*/
-#define DEFAULT_DUMPNAME "callgrind.out"
+#define DEFAULT_OUTFORMAT "callgrind.out.%p"
#define DEFAULT_COMMANDNAME "callgrind.cmd"
#define DEFAULT_RESULTNAME "callgrind.res"
#define DEFAULT_INFONAME "/tmp/callgrind.info"
@@ -59,7 +59,7 @@
struct _CommandLineOptions {
/* Dump format options */
- Char* filename_base; /* Base name for dumps */
+ Char* out_format; /* Format string for callgrind output file name */
Bool combine_dumps; /* Dump trace parts into same file? */
Bool compress_strings;
Bool compress_events;
@@ -801,8 +801,8 @@
/* from dump.c */
extern FullCost CLG_(total_cost);
void CLG_(init_dumps)(void);
-Char* CLG_(get_dump_file_base)(void);
-Char* CLG_(get_base_directory)(void);
+Char* CLG_(get_out_file)(void);
+Char* CLG_(get_out_directory)(void);
/*------------------------------------------------------------*/
/*--- Exported global variables ---*/
Modified: trunk/docs/xml/valgrind-manpage.xml
===================================================================
--- trunk/docs/xml/valgrind-manpage.xml 2007-11-27 00:59:17 UTC (rev 7234)
+++ trunk/docs/xml/valgrind-manpage.xml 2007-11-27 01:27:12 UTC (rev 7235)
@@ -210,9 +210,20 @@
<title>Callgrind Options</title>
<xi:include href="../../callgrind/docs/cl-manual.xml"
- xpointer="cl.opts.list"
+ xpointer="cl.opts.list.misc"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+<xi:include href="../../callgrind/docs/cl-manual.xml"
+ xpointer="cl.opts.list.creation"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="../../callgrind/docs/cl-manual.xml"
+ xpointer="cl.opts.list.activity"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="../../callgrind/docs/cl-manual.xml"
+ xpointer="cl.opts.list.collection"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="../../callgrind/docs/cl-manual.xml"
+ xpointer="cl.opts.list.simulation"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
</refsect1>
|