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
(10) |
2
(8) |
3
(17) |
4
(28) |
5
(22) |
6
(8) |
|
7
(8) |
8
(22) |
9
(12) |
10
(17) |
11
(14) |
12
(15) |
13
(6) |
|
14
(9) |
15
(9) |
16
(16) |
17
(13) |
18
(18) |
19
(7) |
20
(5) |
|
21
(6) |
22
(5) |
23
(11) |
24
(5) |
25
(11) |
26
(7) |
27
(15) |
|
28
(11) |
29
(12) |
30
(12) |
31
(15) |
|
|
|
|
From: Stephen M.
|
>>>>> "NN" == Nicholas Nethercote <nj...@cs...> writes:
NN> Hi,
NN> Julian and I have been discussing for a while the idea of creating
NN> a category of "experimental" tools in the Valgrind source tree.
NN> These would be tools that are not necessarily mature, but may be
NN> of interest to people. This would make it much easier for users
NN> to try out experimental tools -- they would be included in the
NN> Valgrind distribution -- which in turn might accelerate their
NN> development.
[...]
NN> We are interested in hearing people's opinions on this idea. We
NN> are also interested to hear if anyone has a tool they would like
NN> to be considered for inclusion as an experimental tool.
I think this sounds like a great idea. Having more tools in the source
tree will make it easier on both sides to keep the core and the tools
working together, and having more tools in the distribution will
advertise Valgrind's flexibility as a framework and potentially, as
you suggest, feed a virtuous cycle of tool use and development.
More broadly, though, I think that similar reasons suggest that other
forms of development on Valgrind could benefit from being closer in
sync with the core, even if it doesn't make sense for them to appear
in the distribution. This includes incomplete architecture and OS
ports, experimental core features, tools that need core changes, and
tools that have only specialized uses. Would it be reasonable to
invite more things like this to live on branches in the SVN
repository?
I think of the Fjalar/Kvasir code I maintain as falling into the
latter category: it only useful to Daikon users, or potentially to
authors of similar tools, not to general developer-users. And it's
certainly way too easy for it to fall out of sync with the core living
as it does in a local CVS repository. Some of that is general laziness
that won't be helped by any organizational change (merging updates
from the core is a non-automatable task with only delayed benefits),
but I think fostering a culture of more in-sync development would be
good for everyone.
-- Stephen
|
|
From: Robert W. <rj...@du...> - 2007-10-05 17:08:18
|
Might this be a suitable location for omega, too? Assuming someone is OK with maintaining it enough to keep it compiling at least? On Oct 4, 2007, at 10:29 PM, Bart Van Assche wrote: > On 10/5/07, Nicholas Nethercote <nj...@cs...> wrote: > > Julian and I have been discussing for a while the idea of creating a > category of "experimental" tools in the Valgrind source tree. These > would be tools that are not necessarily mature, but may be of interest > to people. This would make it much easier for users to try out > experimental tools -- they would be included in the Valgrind > distribution -- > which in turn might accelerate their development. > > I'm in favor of this proposal, and would appreciate it if drd could > be added as an experimental tool. Since the drd and thrcheck tools > use different algorithms for detecting data races, it can be > interesting to compare the output of the two tools and their > performance. > > Bart. > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: <js...@ac...> - 2007-10-05 14:12:07
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2007-10-05 09:00:01 BST 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 == 220 tests, 10 stderr failures, 6 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <sv...@va...> - 2007-10-05 11:24:30
|
Author: sewardj
Date: 2007-10-05 12:24:28 +0100 (Fri, 05 Oct 2007)
New Revision: 6958
Log:
Allow the caches for each WordSetU to be set on a per-WordSetU basis,
to allow per-universe performance tuning.
Modified:
branches/THRCHECK/thrcheck/tc_main.c
branches/THRCHECK/thrcheck/tc_wordset.c
branches/THRCHECK/thrcheck/tc_wordset.h
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-10-05 10:08:46 UTC (rev 6957)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-10-05 11:24:28 UTC (rev 6958)
@@ -1038,15 +1038,15 @@
TC_(addToFM)( map_locks, (Word)&__bus_lock, (Word)__bus_lock_Lock );
tl_assert(univ_tsets == NULL);
- univ_tsets = TC_(newWordSetU)( tc_zalloc, tc_free );
+ univ_tsets = TC_(newWordSetU)( tc_zalloc, tc_free, 8/*cacheSize*/ );
tl_assert(univ_tsets != NULL);
tl_assert(univ_lsets == NULL);
- univ_lsets = TC_(newWordSetU)( tc_zalloc, tc_free );
+ univ_lsets = TC_(newWordSetU)( tc_zalloc, tc_free, 8/*cacheSize*/ );
tl_assert(univ_lsets != NULL);
tl_assert(univ_laog == NULL);
- univ_laog = TC_(newWordSetU)( tc_zalloc, tc_free );
+ univ_laog = TC_(newWordSetU)( tc_zalloc, tc_free, 16/*cacheSize*/ );
tl_assert(univ_laog != NULL);
/* Set up entries for the root thread */
Modified: branches/THRCHECK/thrcheck/tc_wordset.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_wordset.c 2007-10-05 10:08:46 UTC (rev 6957)
+++ branches/THRCHECK/thrcheck/tc_wordset.c 2007-10-05 11:24:28 UTC (rev 6958)
@@ -51,17 +51,28 @@
struct { UWord arg1; UWord arg2; UWord res; }
WCacheEnt;
-#define N_WORDCACHE 5
+/* Each cache is a fixed sized array of N_WCACHE_STAT_MAX entries.
+ However only the first .dynMax are used. This is because at some
+ point, expanding the cache further overall gives a slowdown because
+ searching more entries more than negates any performance advantage
+ from caching those entries in the first place. Hence use .dynMax
+ to allow the size of the cache(s) to be set differently for each
+ different WordSetU. */
+#define N_WCACHE_STAT_MAX 32
typedef
struct {
- WCacheEnt ent[N_WORDCACHE];
- Word inUse; /* 0 .. N_WORDCACHE inclusive */
+ WCacheEnt ent[N_WCACHE_STAT_MAX];
+ Word dynMax; /* 1 .. N_WCACHE_STAT_MAX inclusive */
+ Word inUse; /* 0 .. dynMax inclusive */
}
WCache;
-#define WCache_INIT(_zzcache) \
- do { \
- (_zzcache).inUse = 0; \
+#define WCache_INIT(_zzcache,_zzdynmax) \
+ do { \
+ tl_assert((_zzdynmax) >= 1); \
+ tl_assert((_zzdynmax) <= N_WCACHE_STAT_MAX); \
+ (_zzcache).dynMax = (_zzdynmax); \
+ (_zzcache).inUse = 0; \
} while (0)
#define WCache_LOOKUP_AND_RETURN(_retty,_zzcache,_zzarg1,_zzarg2) \
@@ -70,7 +81,10 @@
UWord _arg1 = (UWord)(_zzarg1); \
UWord _arg2 = (UWord)(_zzarg2); \
WCache* _cache = &(_zzcache); \
- tl_assert(_cache->inUse >= 0 && _cache->inUse <= N_WORDCACHE); \
+ tl_assert(_cache->dynMax >= 1); \
+ tl_assert(_cache->dynMax <= N_WCACHE_STAT_MAX); \
+ tl_assert(_cache->inUse >= 0); \
+ tl_assert(_cache->inUse <= _cache->dynMax); \
if (_cache->inUse > 0) { \
if (_cache->ent[0].arg1 == _arg1 \
&& _cache->ent[0].arg2 == _arg2) \
@@ -94,8 +108,11 @@
UWord _arg2 = (UWord)(_zzarg2); \
UWord _res = (UWord)(_zzresult); \
WCache* _cache = &(_zzcache); \
- tl_assert(_cache->inUse >= 0 && _cache->inUse <= N_WORDCACHE); \
- if (_cache->inUse < N_WORDCACHE) \
+ tl_assert(_cache->dynMax >= 1); \
+ tl_assert(_cache->dynMax <= N_WCACHE_STAT_MAX); \
+ tl_assert(_cache->inUse >= 0); \
+ tl_assert(_cache->inUse <= _cache->dynMax); \
+ if (_cache->inUse < _cache->dynMax) \
_cache->inUse++; \
for (_i = _cache->inUse-1; _i >= 1; _i--) \
_cache->ent[_i] = _cache->ent[_i-1]; \
@@ -242,11 +259,11 @@
tl_assert(wsu->ix2vec);
/* If this assertion fails, it may mean you supplied a 'ws'
that does not come from the 'wsu' universe. */
- tl_assert(ws < wsu->ix2vec_used);
+ tl_assert(ws < wsu->ix2vec_used); /* XXX */
wv = wsu->ix2vec[ws];
/* Make absolutely sure that 'ws' is a member of 'wsu'. */
tl_assert(wv);
- tl_assert(wv->owner == wsu);
+ tl_assert(wv->owner == wsu); /* YYY */
return wv;
}
@@ -288,7 +305,8 @@
WordSetU* TC_(newWordSetU) ( void* (*alloc_nofail)( SizeT ),
- void (*dealloc)(void*) )
+ void (*dealloc)(void*),
+ Word cacheSize )
{
WordSetU* wsu;
WordVec* empty;
@@ -301,10 +319,10 @@
wsu->ix2vec_used = 0;
wsu->ix2vec_size = 0;
wsu->ix2vec = NULL;
- WCache_INIT(wsu->cache_addTo);
- WCache_INIT(wsu->cache_delFrom);
- WCache_INIT(wsu->cache_intersect);
- WCache_INIT(wsu->cache_minus);
+ WCache_INIT(wsu->cache_addTo, cacheSize);
+ WCache_INIT(wsu->cache_delFrom, cacheSize);
+ WCache_INIT(wsu->cache_intersect, cacheSize);
+ WCache_INIT(wsu->cache_minus, cacheSize);
empty = new_WV_of_size( wsu, 0 );
wsu->empty = add_or_dealloc_WordVec( wsu, empty );
@@ -508,7 +526,7 @@
for (k = 0; k < wv->size; k++) {
if (wv->words[k] == w) {
result = ws;
- goto out;
+ goto out;
}
}
/* Ok, not present. Build a new one ... */
Modified: branches/THRCHECK/thrcheck/tc_wordset.h
===================================================================
--- branches/THRCHECK/thrcheck/tc_wordset.h 2007-10-05 10:08:46 UTC (rev 6957)
+++ branches/THRCHECK/thrcheck/tc_wordset.h 2007-10-05 11:24:28 UTC (rev 6958)
@@ -48,7 +48,8 @@
/* Allocate and initialise a WordSetU */
WordSetU* TC_(newWordSetU) ( void* (*alloc_nofail)( SizeT ),
- void (*dealloc)(void*) );
+ void (*dealloc)(void*),
+ Word cacheSize );
/* Free up the WordSetU. */
void TC_(deleteWordSetU) ( WordSetU* );
|
|
From: Julian S. <js...@ac...> - 2007-10-05 10:16:47
|
> alternatively we could encode "%t" as "%.s". this is an apparently > non-sensical construct (print zero characters of the string) that we could > overload with this meaning. I prefer that; doing a lot of xml_quote everywhere is hassle. gcc will not complain about "%.s" ? At the end of this it would be good to put in a comment somewhere, a short description of the nonstandard format extensions we now support. |
|
From: Dirk M. <dm...@gm...> - 2007-10-05 10:09:37
|
On Friday, 5. October 2007, Dirk Mueller wrote: > sure, I'm more wondering what to do with "%t". in valgrind ,this is an > XML-escaped "%s", while for printf its a length modifier, which causes > quite some warnings. > > do we aim for thread safety? otherwise a xml_quote() around the argument > sounds like the easiest solution for me. alternatively we could encode "%t" as "%.s". this is an apparently non-sensical construct (print zero characters of the string) that we could overload with this meaning. Dirk |
|
From: <sv...@va...> - 2007-10-05 10:08:44
|
Author: sewardj
Date: 2007-10-05 11:08:46 +0100 (Fri, 05 Oct 2007)
New Revision: 6957
Log:
Common up and strengthen checks which ensure that a given lockset is a
member of the correct lockset-universe.
Modified:
branches/THRCHECK/thrcheck/tc_wordset.c
Modified: branches/THRCHECK/thrcheck/tc_wordset.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_wordset.c 2007-10-05 10:07:38 UTC (rev 6956)
+++ branches/THRCHECK/thrcheck/tc_wordset.c 2007-10-05 10:08:46 UTC (rev 6957)
@@ -231,14 +231,23 @@
wsu->ix2vec_size = new_sz;
}
-/* Index into a WordSetU, doing the obvious range check. */
+/* Index into a WordSetU, doing the obvious range check. Failure of
+ the assertions marked XXX and YYY is an indication of passing the
+ wrong WordSetU* in the public API of this module. */
static WordVec* do_ix2vec ( WordSetU* wsu, WordSet ws )
{
+ WordVec* wv;
tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size);
if (wsu->ix2vec_used > 0)
tl_assert(wsu->ix2vec);
+ /* If this assertion fails, it may mean you supplied a 'ws'
+ that does not come from the 'wsu' universe. */
tl_assert(ws < wsu->ix2vec_used);
- return wsu->ix2vec[ws];
+ wv = wsu->ix2vec[ws];
+ /* Make absolutely sure that 'ws' is a member of 'wsu'. */
+ tl_assert(wv);
+ tl_assert(wv->owner == wsu);
+ return wv;
}
/* See if wv is contained within wsu. If so, deallocate wv and return
@@ -321,7 +330,6 @@
{
WordVec* wv = do_ix2vec( wsu, ws );
wsu->n_isEmpty++;
- tl_assert(wv->owner == wsu);
if (wv->size == 0) {
tl_assert(ws == wsu->empty);
return True;
@@ -337,7 +345,6 @@
tl_assert(wsu);
wsu->n_isSingleton++;
wv = do_ix2vec( wsu, ws );
- tl_assert(wv->owner == wsu);
return (Bool)(wv->size == 1 && wv->words[0] == w);
}
@@ -346,7 +353,6 @@
WordVec* wv;
tl_assert(wsu);
wv = do_ix2vec( wsu, ws );
- tl_assert(wv->owner == wsu);
tl_assert(wv->size >= 0);
return wv->size;
}
@@ -357,7 +363,6 @@
tl_assert(wsu);
wsu->n_anyElementOf++;
wv = do_ix2vec( wsu, ws );
- tl_assert(wv->owner == wsu);
tl_assert(wv->size >= 1);
return wv->words[0];
}
@@ -374,7 +379,6 @@
WordVec* wv;
tl_assert(wsu);
wv = do_ix2vec( wsu, ws );
- tl_assert(wv->owner == wsu);
tl_assert(wv->size >= 0);
*nWords = wv->size;
*words = wv->words;
@@ -396,6 +400,7 @@
if (ws < 0 || ws >= wsu->ix2vec_used)
return False;
wv = do_ix2vec( wsu, ws );
+ /* can never happen .. do_ix2vec will assert instead. Oh well. */
if (wv->owner != wsu) return False;
if (wv->size < 0) return False;
if (wv->size > 0) {
@@ -458,7 +463,6 @@
WordVec* wv;
tl_assert(wsu);
wv = do_ix2vec( wsu, ws );
- tl_assert(wv);
VG_(printf)("{");
for (i = 0; i < wv->size; i++) {
VG_(printf)("%p", (void*)wv->words[i]);
@@ -587,8 +591,6 @@
WordVec* wv1 = do_ix2vec( wsu, ws1 );
WordVec* wv2 = do_ix2vec( wsu, ws2 );
wsu->n_union++;
- tl_assert(wv1->owner == wsu);
- tl_assert(wv2->owner == wsu);
sz = 0;
i1 = i2 = 0;
while (1) {
@@ -678,8 +680,6 @@
wv1 = do_ix2vec( wsu, ws1 );
wv2 = do_ix2vec( wsu, ws2 );
- tl_assert(wv1->owner == wsu);
- tl_assert(wv2->owner == wsu);
sz = 0;
i1 = i2 = 0;
while (1) {
@@ -749,8 +749,6 @@
wv1 = do_ix2vec( wsu, ws1 );
wv2 = do_ix2vec( wsu, ws2 );
- tl_assert(wv1->owner == wsu);
- tl_assert(wv2->owner == wsu);
sz = 0;
i1 = i2 = 0;
while (1) {
|
|
From: <sv...@va...> - 2007-10-05 10:07:36
|
Author: sewardj
Date: 2007-10-05 11:07:38 +0100 (Fri, 05 Oct 2007)
New Revision: 6956
Log:
Don't search for a whole bunch of individual lock-to-lock paths in the
lock acquisition order graph (almost all of which searches fail and
are expensive). Instead search from one lock to any in a set of
locks. This makes the laog check mechanism a whole lot cheaper.
Modified:
branches/THRCHECK/thrcheck/tc_main.c
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-10-05 07:24:18 UTC (rev 6955)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-10-05 10:07:38 UTC (rev 6956)
@@ -4086,7 +4086,10 @@
tl_assert(0);
}
-static Bool laog__do_dfs_from_to ( Lock* src, Lock* dst )
+/* Return True iff there is a path in laog from 'src' to any of the
+ elements in 'dst'. */
+static
+Bool laog__do_dfs_from_to ( Lock* src, WordSetID dsts /* univ_lsets */ )
{
Bool ret;
Word i, ssz;
@@ -4097,6 +4100,12 @@
Word succs_size;
Word* succs_words;
//laog__sanity_check();
+
+ /* If the destination set is empty, we can never get there from
+ 'src' :-), so don't bother to try */
+ if (TC_(isEmptyWS)( univ_lsets, dsts ))
+ return False;
+
stack = VG_(newXA)( tc_zalloc, tc_free, sizeof(Lock*) );
visited = TC_(newFM)( tc_zalloc, tc_free, NULL/*unboxedcmp*/ );
@@ -4111,7 +4120,7 @@
here = *(Lock**) VG_(indexXA)( stack, ssz-1 );
VG_(dropTailXA)( stack, 1 );
- if (here == dst) { ret = True; break; }
+ if (TC_(elemWS)( univ_lsets, dsts, (Word)here )) { ret = True; break; }
if (TC_(lookupFM)( visited, NULL, NULL, (Word)here ))
continue;
@@ -4141,7 +4150,6 @@
{
Word* ls_words;
Word ls_size, i;
- Bool complain;
/* It may be that 'thr' already holds 'lk' and is recursively
relocking in. In this case we just ignore the call. */
@@ -4152,18 +4160,13 @@
if (!laog)
laog = TC_(newFM)( tc_zalloc, tc_free, NULL/*unboxedcmp*/ );
- /* First, the check. Complain if there is any path in laog
- from lk to old for each old <- locks already held by thr.
+ /* First, the check. Complain if there is any path in laog from lk
+ to any of the locks already held by thr, since if any such path
+ existed, it would mean that previously lk was acquired before
+ (rather than after, as we are doing here) at least one of those
+ locks.
*/
- complain = False;
- TC_(getPayloadWS)( &ls_words, &ls_size, univ_lsets, thr->locksetA );
- for (i = 0; i < ls_size; i++) {
- if (laog__do_dfs_from_to( lk, (Lock*)ls_words[i] )) {
- complain = True;
- break;
- }
- }
- if (complain) {
+ if (laog__do_dfs_from_to(lk, thr->locksetA)) {
record_error_Misc( thr, "Lock acquisition order is inconsistent "
"with previously observed ordering" );
}
@@ -4171,6 +4174,7 @@
/* Second, add to laog the pairs
(old, lk) | old <- locks already held by thr
*/
+ TC_(getPayloadWS)( &ls_words, &ls_size, univ_lsets, thr->locksetA );
for (i = 0; i < ls_size; i++)
laog__add_edge( (Lock*)ls_words[i], lk );
}
@@ -5678,6 +5682,8 @@
VG_(printf)("\n");
TC_(ppWSUstats)( univ_lsets, "univ_lsets" );
VG_(printf)("\n");
+ TC_(ppWSUstats)( univ_laog, "univ_laog" );
+ VG_(printf)("\n");
}
}
|
|
From: Dirk M. <dm...@gm...> - 2007-10-05 10:00:55
|
On Friday, 5. October 2007, Nicholas Nethercote wrote: > It sounds like changing it from a ',' to an apostrophe will fix any problem > there. Dirk, are you happy to make that change along with the others in > the branch? The relevant code is in coregrind/m_debuglog.c. sure, I'm more wondering what to do with "%t". in valgrind ,this is an XML-escaped "%s", while for printf its a length modifier, which causes quite some warnings. do we aim for thread safety? otherwise a xml_quote() around the argument sounds like the easiest solution for me. Greetings, Dirk |
|
From: <sv...@va...> - 2007-10-05 07:24:16
|
Author: njn
Date: 2007-10-05 08:24:18 +0100 (Fri, 05 Oct 2007)
New Revision: 6955
Log:
Removed redundant .total_szB field from Snapshot. It can be computed from
other fields in Snapshot. Also remove the similarly redundant "mem_total_B"
lines from the output file format, which makes them more compact.
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/ms_print
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-05 05:16:33 UTC (rev 6954)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-05 07:24:18 UTC (rev 6955)
@@ -348,6 +348,7 @@
VG_BOOL_CLO(arg, "--heap", clo_heap)
else VG_BOOL_CLO(arg, "--stacks", clo_stacks)
+ // XXX: currently allows negative heap admin sizes! Abort if negative.
else VG_NUM_CLO (arg, "--heap-admin", clo_heap_admin)
else VG_BNUM_CLO(arg, "--depth", clo_depth, 1, MAX_DEPTH)
@@ -839,8 +840,6 @@
struct {
SnapshotKind kind;
Time time;
- // XXX: total_szB is redundant! remove it
- SizeT total_szB; // Size of all allocations at that snapshot time.
SizeT heap_szB;
SizeT heap_admin_szB;
SizeT stacks_szB;
@@ -856,7 +855,6 @@
if (Unused == snapshot->kind) {
// If snapshot is unused, check all the fields are unset.
tl_assert(snapshot->time == UNUSED_SNAPSHOT_TIME);
- tl_assert(snapshot->total_szB == 0);
tl_assert(snapshot->heap_admin_szB == 0);
tl_assert(snapshot->heap_szB == 0);
tl_assert(snapshot->stacks_szB == 0);
@@ -875,8 +873,6 @@
static void sanity_check_snapshot(Snapshot* snapshot)
{
- tl_assert(snapshot->total_szB ==
- snapshot->heap_admin_szB + snapshot->heap_szB + snapshot->stacks_szB);
if (snapshot->alloc_xpt) {
sanity_check_XTree(snapshot->alloc_xpt, /*parent*/NULL);
}
@@ -901,7 +897,6 @@
sanity_check_snapshot(snapshot);
snapshot->kind = Unused;
snapshot->time = UNUSED_SNAPSHOT_TIME;
- snapshot->total_szB = 0;
snapshot->heap_admin_szB = 0;
snapshot->heap_szB = 0;
snapshot->stacks_szB = 0;
@@ -1131,8 +1126,6 @@
// Rest of snapshot.
snapshot->kind = kind;
snapshot->time = time;
- snapshot->total_szB =
- snapshot->heap_szB + snapshot->heap_admin_szB + snapshot->stacks_szB;
sanity_check_snapshot(snapshot);
n_real_snapshots++;
@@ -1697,7 +1690,6 @@
FP("snapshot=%d\n", snapshot_n);
FP("#-----------\n");
FP("time=%lld\n", snapshot->time);
- FP("mem_total_B=%lu\n", snapshot->total_szB);
FP("mem_heap_B=%lu\n", snapshot->heap_szB);
FP("mem_heap_admin_B=%lu\n", snapshot->heap_admin_szB);
FP("mem_stacks_B=%lu\n", snapshot->stacks_szB);
@@ -1706,12 +1698,14 @@
// Detailed snapshot -- print heap tree.
Int depth_str_len = clo_depth + 3;
Char* depth_str = VG_(malloc)(sizeof(Char) * depth_str_len);
+ SizeT snapshot_total_szB =
+ snapshot->heap_szB + snapshot->heap_admin_szB + snapshot->stacks_szB;
depth_str[0] = '\0'; // Initialise depth_str to "".
FP("heap_tree=...\n");
pp_snapshot_XPt(fd, snapshot->alloc_xpt, 0, depth_str,
depth_str_len, snapshot->heap_szB,
- snapshot->total_szB);
+ snapshot_total_szB);
VG_(free)(depth_str);
Modified: branches/MASSIF2/massif/ms_print
===================================================================
--- branches/MASSIF2/massif/ms_print 2007-10-05 05:16:33 UTC (rev 6954)
+++ branches/MASSIF2/massif/ms_print 2007-10-05 07:24:18 UTC (rev 6955)
@@ -387,10 +387,10 @@
while (defined $line) {
my $snapshot_num = equals_num_line($line, "snapshot");
my $time = equals_num_line(get_line(), "time");
- my $mem_total_B = equals_num_line(get_line(), "mem_total_B");
my $mem_heap_B = equals_num_line(get_line(), "mem_heap_B");
my $mem_heap_admin_B = equals_num_line(get_line(), "mem_heap_admin_B");
my $mem_stacks_B = equals_num_line(get_line(), "mem_stacks_B");
+ my $mem_total_B = $mem_heap_B + $mem_heap_admin_B + $mem_stacks_B;
my $heap_tree = equals_num_line(get_line(), "heap_tree");
# Print the snapshot data to $tmp_file.
@@ -427,7 +427,6 @@
} else {
die("Line $.: expected 'empty' or '...' after 'heap_tree='\n");
}
-
}
close(INPUTFILE);
|
|
From: Bart V. A. <bar...@gm...> - 2007-10-05 05:29:18
|
On 10/5/07, Nicholas Nethercote <nj...@cs...> wrote: > Julian and I have been discussing for a while the idea of creating a > category of "experimental" tools in the Valgrind source tree. These > would be tools that are not necessarily mature, but may be of interest > to people. This would make it much easier for users to try out > experimental tools -- they would be included in the Valgrind distribution > -- > which in turn might accelerate their development. > I'm in favor of this proposal, and would appreciate it if drd could be added as an experimental tool. Since the drd and thrcheck tools use different algorithms for detecting data races, it can be interesting to compare the output of the two tools and their performance. Bart. |
|
From: <sv...@va...> - 2007-10-05 05:16:31
|
Author: njn
Date: 2007-10-05 06:16:33 +0100 (Fri, 05 Oct 2007)
New Revision: 6954
Log:
various minor cleanups
Modified:
branches/MASSIF2/massif/ms_main.c
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-05 05:06:49 UTC (rev 6953)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-05 05:16:33 UTC (rev 6954)
@@ -1089,9 +1089,11 @@
}
}
-// Take a snapshot. Note that with bigger depths, snapshots can be slow,
-// eg. konqueror snapshots can easily take 50ms!
-// [XXX: is that still true?]
+// Take a snapshot, and only that -- decisions on whether to take a
+// snapshot, or what kind of snapshot, are made elsewhere.
+//
+// Note that with bigger depths, snapshots can be slow, eg. konqueror
+// snapshots can easily take 50ms! [XXX: is that still true?]
static void
take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time time,
Bool is_detailed, Char* what)
@@ -1138,29 +1140,37 @@
// Take a snapshot, if it's time.
-static void maybe_take_snapshot(SnapshotKind kind, Char* what)
+static void
+maybe_take_snapshot(SnapshotKind kind, Char* what)
{
- // 'min_time_interval' is the minimum time interval between snapshots;
- // if we try to take a snapshot and less than this much time has passed,
- // we don't take it. Initialised to zero so that we begin by taking
- // snapshots as quickly as possible.
- static Time min_time_interval = 0;
+ // 'min_time_interval' is the minimum time interval between snapshots.
+ // If we try to take a snapshot and less than this much time has passed,
+ // we don't take it. It gets larger as the program runs longer. It's
+ // initialised to zero so that we begin by taking snapshots as quickly as
+ // possible.
+ static Time min_time_interval = 0;
// Zero allows startup snapshot.
static Time earliest_possible_time_of_next_snapshot = 0;
- static Int n_snapshots_since_last_detailed = 0;
+ static Int n_snapshots_until_next_detailed = DETAILED_SNAPSHOT_FREQ - 1;
Snapshot* snapshot;
Bool is_detailed;
Time time = get_time();
- // Only do a snapshot if it's time.
- if (time < earliest_possible_time_of_next_snapshot) {
- n_skipped_snapshots++;
- n_skipped_snapshots_since_last_snapshot++;
- return;
+ switch (kind) {
+ case Normal:
+ // Only do a snapshot if it's time.
+ if (time < earliest_possible_time_of_next_snapshot) {
+ n_skipped_snapshots++;
+ n_skipped_snapshots_since_last_snapshot++;
+ return;
+ }
+ is_detailed = (0 == n_snapshots_until_next_detailed);
+ break;
+
+ default:
+ tl_assert2(0, "maybe_take_snapshot: unrecognised snapshot kind");
}
- is_detailed =
- (DETAILED_SNAPSHOT_FREQ == n_snapshots_since_last_detailed+1);
// Take the snapshot.
snapshot = & snapshots[next_snapshot_i];
@@ -1168,9 +1178,9 @@
// Record if it was detailed.
if (is_detailed) {
- n_snapshots_since_last_detailed = 0;
+ n_snapshots_until_next_detailed = DETAILED_SNAPSHOT_FREQ - 1;
} else {
- n_snapshots_since_last_detailed++;
+ n_snapshots_until_next_detailed--;
}
// Finish up verbosity and stats stuff.
|
|
From: <sv...@va...> - 2007-10-05 05:06:48
|
Author: njn
Date: 2007-10-05 06:06:49 +0100 (Fri, 05 Oct 2007)
New Revision: 6953
Log:
Remove unnecessary whitespace at end of lines.
Modified:
branches/MASSIF2/massif/ms_main.c
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-05 05:00:13 UTC (rev 6952)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-05 05:06:49 UTC (rev 6953)
@@ -128,7 +128,7 @@
// can cut out allc-fn chains at the bottom, rather than having to name
// all of them, which is better.
// - Mention that the C++ overloadable new/new[] operators aren't include in
-// alloc-fns by default.
+// alloc-fns by default.
// - Mention that complex functions names are best protected with single
// quotes, eg:
// --alloc-fn='operator new(unsigned, std::nothrow_t const&)'
@@ -344,7 +344,7 @@
{
// Remember the arg for later use.
VG_(addToXA)(args_for_massif, &arg);
-
+
VG_BOOL_CLO(arg, "--heap", clo_heap)
else VG_BOOL_CLO(arg, "--stacks", clo_stacks)
@@ -369,7 +369,7 @@
static void ms_print_usage(void)
{
- VG_(printf)(
+ VG_(printf)(
" --heap=no|yes profile heap blocks [yes]\n"
" --heap-admin=<number> average admin bytes per heap block [8]\n"
" --stacks=no|yes profile stack(s) [yes]\n"
@@ -407,7 +407,7 @@
// it makes the code simpler.
//
// Any child of 'alloc_xpt' is called a "top-XPt". The XPts at the bottom
-// of an XTree (leaf nodes) are "bottom-XPTs".
+// of an XTree (leaf nodes) are "bottom-XPTs".
//
// Each path from a top-XPt to a bottom-XPt through an XTree gives an
// execution context ("XCon"), ie. a stack trace. (And sub-paths represent
@@ -459,7 +459,7 @@
if (hp + n_bytes > hp_lim) {
hp = (Addr)VG_(am_shadow_alloc)(SUPERBLOCK_SIZE);
if (hp == 0)
- VG_(out_of_memory_NORETURN)( "massif:perm_malloc",
+ VG_(out_of_memory_NORETURN)( "massif:perm_malloc",
SUPERBLOCK_SIZE);
hp_lim = hp + SUPERBLOCK_SIZE - 1;
}
@@ -534,7 +534,7 @@
{
XPt* xpt1 = *(XPt**)n1;
XPt* xpt2 = *(XPt**)n2;
- return ( xpt1->curr_szB < xpt2->curr_szB ? 1
+ return ( xpt1->curr_szB < xpt2->curr_szB ? 1
: xpt1->curr_szB > xpt2->curr_szB ? -1
: 0);
}
@@ -641,7 +641,7 @@
// main-or-below-main.
// Eg: alloc-fn1 / alloc-fn2 / a / b / main / (below main) / c
// becomes: a / b / main
-static
+static
Int get_IPs( ThreadId tid, Bool is_custom_malloc, Addr ips[], Int max_ips)
{
Int n_ips, i, n_alloc_fns_removed = 0;
@@ -686,7 +686,7 @@
for (i = n_ips-1; i >= 0; i--) {
#define BUF_LEN 1024
Char buf[BUF_LEN];
-
+
if (VG_(get_fnname)(ips[i], buf, BUF_LEN)) {
// If it's a main-or-below-main function, we (may) want to
@@ -713,10 +713,10 @@
VG_(exit)(1);
}
n_alloc_fns_removed = i+1;
-
+
// Shuffle the rest down.
- for (j = 0; j < n_ips; j++) {
- ips[j] = ips[j + n_alloc_fns_removed];
+ for (j = 0; j < n_ips; j++) {
+ ips[j] = ips[j + n_alloc_fns_removed];
}
n_ips -= n_alloc_fns_removed;
break;
@@ -800,7 +800,7 @@
if (space_delta < 0) tl_assert(xpt->curr_szB >= -space_delta);
xpt->curr_szB += space_delta;
xpt = xpt->parent;
- }
+ }
if (space_delta < 0) tl_assert(alloc_xpt->curr_szB >= -space_delta);
alloc_xpt->curr_szB += space_delta;
}
@@ -909,7 +909,7 @@
}
// This zeroes all the fields in the snapshot, and frees the heap XTree if
-// present.
+// present.
static void delete_snapshot(Snapshot* snapshot)
{
// Nb: if there's an XTree, we free it after calling clear_snapshot,
@@ -995,7 +995,7 @@
min_j = j;
}
// Move on to next triple
- jp = j;
+ jp = j;
j = jn;
FIND_SNAPSHOT(jn+1, jn);
}
@@ -1003,11 +1003,11 @@
// print it if necessary.
tl_assert(-1 != min_j); // Check we found a minimum.
min_snapshot = & snapshots[ min_j ];
- if (VG_(clo_verbosity) > 1) {
- Char buf[64];
- VG_(snprintf)(buf, 64, " %3d (t-span = %lld)", i, min_timespan);
- VERB_snapshot(1, buf, min_j);
- }
+ if (VG_(clo_verbosity) > 1) {
+ Char buf[64];
+ VG_(snprintf)(buf, 64, " %3d (t-span = %lld)", i, min_timespan);
+ VERB_snapshot(1, buf, min_j);
+ }
delete_snapshot(min_snapshot);
n_deleted++;
}
@@ -1092,7 +1092,7 @@
// Take a snapshot. Note that with bigger depths, snapshots can be slow,
// eg. konqueror snapshots can easily take 50ms!
// [XXX: is that still true?]
-static void
+static void
take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time time,
Bool is_detailed, Char* what)
{
@@ -1303,7 +1303,7 @@
SizeT die_szB;
VERB(2, "<<< die_mem_heap");
-
+
// Update statistics
n_frees++;
@@ -1343,7 +1343,7 @@
XPt *old_where, *new_where;
VERB(2, "<<< renew_mem_heap (%lu)", new_szB);
-
+
// Update statistics
n_reallocs++;
@@ -1358,7 +1358,7 @@
// Update heap stats
update_heap_stats(new_szB - old_szB, /*n_heap_blocks_delta*/0);
-
+
if (new_szB <= old_szB) {
// new size is smaller or same; block not moved
p_new = p_old;
@@ -1402,8 +1402,8 @@
return p_new;
}
-
+
//------------------------------------------------------------//
//--- malloc() et al replacement wrappers ---//
//------------------------------------------------------------//
@@ -1550,8 +1550,8 @@
static
IRSB* ms_instrument ( VgCallbackClosure* closure,
- IRSB* bb_in,
- VexGuestLayout* layout,
+ IRSB* bb_in,
+ VexGuestLayout* layout,
VexGuestExtents* vge,
IRType gWordTy, IRType hWordTy )
{
@@ -1590,9 +1590,9 @@
static Char mbuf[32];
// tl_assert(x <= y); XXX; put back in later...
-
+
// XXX: I'm not confident that VG_(percentify) works as it should...
- VG_(percentify)(x, y, 2, 6, mbuf);
+ VG_(percentify)(x, y, 2, 6, mbuf);
// XXX: this is bogus if the denominator was zero -- resulting string is
// something like "0 --%")
if (' ' == mbuf[0]) mbuf[0] = '0';
@@ -1638,7 +1638,7 @@
is_significant_XPt(xpt->children[n_sig_children], curr_total_szB)) {
n_sig_children++;
}
- n_insig_children = xpt->n_children - n_sig_children;
+ n_insig_children = xpt->n_children - n_sig_children;
n_child_entries = n_sig_children + ( n_insig_children > 0 ? 1 : 0 );
// Print the XPt entry.
@@ -1682,7 +1682,7 @@
static void pp_snapshot(Int fd, Snapshot* snapshot, Int snapshot_n)
{
sanity_check_snapshot(snapshot);
-
+
FP("#-----------\n");
FP("snapshot=%d\n", snapshot_n);
FP("#-----------\n");
@@ -1775,17 +1775,17 @@
// Stats
tl_assert(n_xpts > 0); // always have alloc_xpt
- VERB(1, "allocs: %u", n_allocs);
- VERB(1, "zeroallocs: %u (%d%%)",
- n_zero_allocs,
- ( n_allocs ? n_zero_allocs * 100 / n_allocs : 0 ));
- VERB(1, "reallocs: %u", n_reallocs);
+ VERB(1, "allocs: %u", n_allocs);
+ VERB(1, "zeroallocs: %u (%d%%)",
+ n_zero_allocs,
+ ( n_allocs ? n_zero_allocs * 100 / n_allocs : 0 ));
+ VERB(1, "reallocs: %u", n_reallocs);
VERB(1, "frees: %u", n_frees);
VERB(1, "stack allocs: %u", n_stack_allocs);
VERB(1, "stack frees: %u", n_stack_frees);
VERB(1, "XPts: %u", n_xpts);
- VERB(1, "top-XPts: %u (%d%%)",
- alloc_xpt->n_children,
+ VERB(1, "top-XPts: %u (%d%%)",
+ alloc_xpt->n_children,
( n_xpts ? alloc_xpt->n_children * 100 / n_xpts : 0));
VERB(1, "dup'd XPts: %u", n_dupd_xpts);
VERB(1, "dup'd/freed XPts: %u", n_dupd_xpts_freed);
@@ -1827,9 +1827,9 @@
}
static void ms_pre_clo_init(void)
-{
+{
Int i;
-
+
VG_(details_name) ("Massif");
VG_(details_version) (NULL);
VG_(details_description) ("a space profiler");
|
|
From: <sv...@va...> - 2007-10-05 05:00:12
|
Author: njn
Date: 2007-10-05 06:00:13 +0100 (Fri, 05 Oct 2007)
New Revision: 6952
Log:
- Added snapshot 'kind' field, in preparation for peak-taking.
- Refactored 'take_snapshot'.
Modified:
branches/MASSIF2/massif/ms_main.c
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-04 23:12:12 UTC (rev 6951)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-05 05:00:13 UTC (rev 6952)
@@ -244,7 +244,6 @@
// These are signed so things are more obvious if they go negative.
static SSizeT sigstacks_szB = 0; // Current signal stacks space sum
static SSizeT heap_szB = 0; // Live heap size
-static SSizeT peak_total_szB = 0;
// Incremented every time memory is allocated/deallocated, by the
// allocated/deallocated amount; includes heap, heap-admin and stack
@@ -830,8 +829,17 @@
#define UNUSED_SNAPSHOT_TIME -333 // A conspicuous negative number.
typedef
+ enum {
+ Normal = 77,
+ Unused
+ }
+ SnapshotKind;
+
+typedef
struct {
+ SnapshotKind kind;
Time time;
+ // XXX: total_szB is redundant! remove it
SizeT total_szB; // Size of all allocations at that snapshot time.
SizeT heap_szB;
SizeT heap_admin_szB;
@@ -845,8 +853,9 @@
static Bool is_snapshot_in_use(Snapshot* snapshot)
{
- if (UNUSED_SNAPSHOT_TIME == snapshot->time) {
- // If .time looks unused, check everything else is.
+ if (Unused == snapshot->kind) {
+ // If snapshot is unused, check all the fields are unset.
+ tl_assert(snapshot->time == UNUSED_SNAPSHOT_TIME);
tl_assert(snapshot->total_szB == 0);
tl_assert(snapshot->heap_admin_szB == 0);
tl_assert(snapshot->heap_szB == 0);
@@ -854,6 +863,7 @@
tl_assert(snapshot->alloc_xpt == NULL);
return False;
} else {
+ tl_assert(snapshot->time != UNUSED_SNAPSHOT_TIME);
return True;
}
}
@@ -889,6 +899,7 @@
static void clear_snapshot(Snapshot* snapshot)
{
sanity_check_snapshot(snapshot);
+ snapshot->kind = Unused;
snapshot->time = UNUSED_SNAPSHOT_TIME;
snapshot->total_szB = 0;
snapshot->heap_admin_szB = 0;
@@ -913,13 +924,20 @@
static void VERB_snapshot(Int verbosity, Char* prefix, Int i)
{
- Char* suffix = ( is_detailed_snapshot(&snapshots[i]) ? "d" : ".");
+ Snapshot* snapshot = &snapshots[i];
+ Char* suffix;
+ switch (snapshot->kind) {
+ case Normal: suffix = ( is_detailed_snapshot(snapshot) ? "d" : "." ); break;
+ case Unused: suffix = "u"; break;
+ default:
+ tl_assert2(0, "VERB_snapshot: unknown snapshot kind: %d", snapshot->kind);
+ }
VERB(verbosity, "%s S%s%3d (t:%lld, hp:%ld, ad:%ld, st:%ld)",
prefix, suffix, i,
- snapshots[i].time,
- snapshots[i].heap_szB,
- snapshots[i].heap_admin_szB,
- snapshots[i].stacks_szB
+ snapshot->time,
+ snapshot->heap_szB,
+ snapshot->heap_admin_szB,
+ snapshot->stacks_szB
);
}
@@ -1074,36 +1092,28 @@
// Take a snapshot. Note that with bigger depths, snapshots can be slow,
// eg. konqueror snapshots can easily take 50ms!
// [XXX: is that still true?]
-static void take_snapshot(Int snapshot_i, Time time, Char* kind)
+static void
+take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time time,
+ Bool is_detailed, Char* what)
{
- static Int n_snapshots_since_last_detailed = 0;
-
- Snapshot* snapshot = &snapshots[snapshot_i];
-
+ tl_assert(!is_snapshot_in_use(snapshot));
tl_assert(have_started_executing_code);
- // Right! We're taking a real snapshot.
- n_real_snapshots++;
-
- // Heap -------------------------------------------------------------
+ // Heap.
if (clo_heap) {
snapshot->heap_szB = heap_szB;
- // Take a detailed snapshot if it's been long enough since the last one.
- if (DETAILED_SNAPSHOT_FREQ == n_snapshots_since_last_detailed+1) {
+ if (is_detailed) {
snapshot->alloc_xpt = dup_XTree(alloc_xpt, /*parent*/NULL);
tl_assert(snapshot->alloc_xpt->curr_szB == heap_szB);
- n_snapshots_since_last_detailed = 0;
- } else {
- n_snapshots_since_last_detailed++;
}
}
- // Heap admin -------------------------------------------------------
+ // Heap admin.
if (clo_heap_admin > 0) {
snapshot->heap_admin_szB = clo_heap_admin * n_heap_blocks;
}
- // Stack(s) ---------------------------------------------------------
+ // Stack(s).
if (clo_stacks) {
ThreadId tid;
Addr stack_min, stack_max;
@@ -1116,32 +1126,19 @@
snapshot->stacks_szB += sigstacks_szB; // Add signal stacks, too
}
- // Rest of snapshot -------------------------------------------------
+ // Rest of snapshot.
+ snapshot->kind = kind;
snapshot->time = time;
snapshot->total_szB =
snapshot->heap_szB + snapshot->heap_admin_szB + snapshot->stacks_szB;
sanity_check_snapshot(snapshot);
- // Update peak data -------------------------------------------------
- // XXX: this is not really the right way to do peak data -- it's only
- // peak snapshot data, the true peak could be between snapshots.
- if (snapshot->total_szB > peak_total_szB) {
- peak_total_szB = snapshot->total_szB;
- }
-
- // Finish up verbosity and stats stuff.
- if (n_skipped_snapshots_since_last_snapshot > 0) {
- VERB(1, " (skipped %d snapshot%s)",
- n_skipped_snapshots_since_last_snapshot,
- ( n_skipped_snapshots_since_last_snapshot == 1 ? "" : "s") );
- }
- VERB_snapshot(1, kind, snapshot_i);
- n_skipped_snapshots_since_last_snapshot = 0;
+ n_real_snapshots++;
}
// Take a snapshot, if it's time.
-static void maybe_take_snapshot(Char* kind)
+static void maybe_take_snapshot(SnapshotKind kind, Char* what)
{
// 'min_time_interval' is the minimum time interval between snapshots;
// if we try to take a snapshot and less than this much time has passed,
@@ -1150,25 +1147,43 @@
static Time min_time_interval = 0;
// Zero allows startup snapshot.
static Time earliest_possible_time_of_next_snapshot = 0;
+ static Int n_snapshots_since_last_detailed = 0;
- Time time;
Snapshot* snapshot;
+ Bool is_detailed;
+ Time time = get_time();
- time = get_time();
-
// Only do a snapshot if it's time.
if (time < earliest_possible_time_of_next_snapshot) {
n_skipped_snapshots++;
n_skipped_snapshots_since_last_snapshot++;
return;
}
+ is_detailed =
+ (DETAILED_SNAPSHOT_FREQ == n_snapshots_since_last_detailed+1);
+ // Take the snapshot.
snapshot = & snapshots[next_snapshot_i];
- tl_assert(!is_snapshot_in_use(snapshot));
- take_snapshot(next_snapshot_i, time, kind);
- next_snapshot_i++;
+ take_snapshot(snapshot, kind, time, is_detailed, what);
+ // Record if it was detailed.
+ if (is_detailed) {
+ n_snapshots_since_last_detailed = 0;
+ } else {
+ n_snapshots_since_last_detailed++;
+ }
+
+ // Finish up verbosity and stats stuff.
+ if (n_skipped_snapshots_since_last_snapshot > 0) {
+ VERB(1, " (skipped %d snapshot%s)",
+ n_skipped_snapshots_since_last_snapshot,
+ ( n_skipped_snapshots_since_last_snapshot == 1 ? "" : "s") );
+ }
+ VERB_snapshot(1, what, next_snapshot_i);
+ n_skipped_snapshots_since_last_snapshot = 0;
+
// Cull the entries, if our snapshot table is full.
+ next_snapshot_i++;
if (MAX_N_SNAPSHOTS == next_snapshot_i) {
min_time_interval = cull_snapshots();
}
@@ -1274,7 +1289,7 @@
VG_(HT_add_node)(malloc_list, hc);
// Maybe take a snapshot.
- maybe_take_snapshot(" alloc");
+ maybe_take_snapshot(Normal, " alloc");
VERB(2, ">>>");
@@ -1314,7 +1329,7 @@
VG_(cli_free)( p );
// Maybe take a snapshot.
- maybe_take_snapshot("dealloc");
+ maybe_take_snapshot(Normal, "dealloc");
VERB(2, ">>> (-%lu)", die_szB);
}
@@ -1381,7 +1396,7 @@
VG_(HT_add_node)(malloc_list, hc);
// Maybe take a snapshot.
- maybe_take_snapshot("realloc");
+ maybe_take_snapshot(Normal, "realloc");
VERB(2, ">>> (%ld)", new_szB - old_szB);
@@ -1462,7 +1477,7 @@
VERB(2, "<<< new_mem_stack (%ld)", len);
n_stack_allocs++;
update_stack_stats(len);
- maybe_take_snapshot("stk-new");
+ maybe_take_snapshot(Normal, "stk-new");
VERB(2, ">>>");
}
}
@@ -1473,7 +1488,7 @@
VERB(2, "<<< die_mem_stack (%ld)", -len);
n_stack_frees++;
update_stack_stats(-len);
- maybe_take_snapshot("stk-die");
+ maybe_take_snapshot(Normal, "stk-die");
VERB(2, ">>>");
}
}
@@ -1484,7 +1499,7 @@
if (have_started_executing_code) {
VERB(2, "<<< new_mem_stack_signal (%ld)", len);
update_sigstack_stats(len);
- maybe_take_snapshot("sig-new");
+ maybe_take_snapshot(Normal, "sig-new");
VERB(2, ">>>");
}
}
@@ -1494,7 +1509,7 @@
if (have_started_executing_code) {
VERB(2, "<<< die_mem_stack_signal (%ld)", -len);
update_sigstack_stats(-len);
- maybe_take_snapshot("sig-die");
+ maybe_take_snapshot(Normal, "sig-die");
VERB(2, ">>>");
}
}
@@ -1545,7 +1560,7 @@
// We use 'maybe_take_snapshot' instead of 'take_snapshot' to ensure
// 'maybe_take_snapshot's internal static variables are initialised.
have_started_executing_code = True;
- maybe_take_snapshot("startup");
+ maybe_take_snapshot(Normal, "startup");
}
return bb_in;
|
|
From: Tom H. <th...@cy...> - 2007-10-05 02:30:55
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-10-05 03:15:02 BST 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 == 256 tests, 27 stderr failures, 1 stdout failure, 0 posttest 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/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/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-05 02:23:25
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-10-05 03:10:04 BST 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest 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) ================================================= == 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest 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) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Oct 5 03:16:53 2007 --- new.short Fri Oct 5 03:23:25 2007 *************** *** 8,10 **** ! == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) *************** *** 15,17 **** none/tests/mremap2 (stdout) - none/tests/pth_detached (stdout) --- 15,16 ---- |
|
From: Tom H. <th...@cy...> - 2007-10-05 02:19:11
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-10-05 03:05:06 BST 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest 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) |
|
From: Tom H. <th...@cy...> - 2007-10-05 02:11:18
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-10-05 03:00:03 BST 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 == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest 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) |
|
From: Nicholas N. <nj...@cs...> - 2007-10-05 01:20:16
|
On Thu, 4 Oct 2007, Dirk Mueller wrote: > My primary concern was to ensure that no format string mismatches occur that > could cause strange misbehaviour or crashes on rare (possible not regression > tested) scenarios. I've been annoyed several times in my recent Massif2 work with incorrect format strings, so automatic checking is good. >> , but then the ',' prefix is also >> extremely useful -- it inserts commas into printed numbers, eg. prints >> "1,234,567" instead of "1234567". Any ideas for how to get the best of >> both worlds? > > There is one death to die. For now, we can keep the ',' prefix as long as gcc > does not complain about it. Otherwise we have to either overload the meaning > of one of the ANSI format string characters with it - e.g. '00' could mean > comma insertion instead of zero extension, or remove the flag alltogether. > > the only fully ANSI correct solution would be to use %s and wrap the actual > integer in a "comma_convert_decimal()" helper routine which formats the > number and returns a pointer to a string instead. It sounds like changing it from a ',' to an apostrophe will fix any problem there. Dirk, are you happy to make that change along with the others in the branch? The relevant code is in coregrind/m_debuglog.c. Nick |
|
From: Nicholas N. <nj...@cs...> - 2007-10-05 01:14:35
|
On Thu, 4 Oct 2007, Dirk Mueller wrote:
> On Wednesday, 3. October 2007, Julian Seward wrote:
>
>> Addr/Word/UWord args with %p formats, either by casting the arg to void*
>> or changing the format to 0x%lx.
>
> I'm currently unable to decide which route to take. We can represent Addr in
> two ways:
>
> VG_(printf)("%#lx", ..)
>
> or
> VG_(printf)("%p", (void*)..)
>
> I would prefer the first, given that it is shorter. Any comments? I'll make
> sure that I change it consistently (in a new branch, like requested).
I prefer the second, because I find it easier to remember. Also, AFAICT
Valgrind's 'printf' doesn't handle '#'.
Nick
|
|
From: Nicholas N. <nj...@cs...> - 2007-10-05 00:50:07
|
Hi, Julian and I have been discussing for a while the idea of creating a category of "experimental" tools in the Valgrind source tree. These would be tools that are not necessarily mature, but may be of interest to people. This would make it much easier for users to try out experimental tools -- they would be included in the Valgrind distribution -- which in turn might accelerate their development. The core Valgrind developers would maintain experimental tools at the minimum level of keeping them compiling, eg. if the core/tool interface changes, as it does occasionally. But each tool would have to have a nominated maintainer who would be reponsible for responding to bug reports, feature requests, and who would continue development. These tools would be given an "exp-" prefix to their name to indicate their experimental nature, and they would be marked clearly as experimental on the website and in the manual. Experimental tools could lose the "exp-" prefix once they reached a certain level of maturity and popularity. The tools would have to be licensed as GPLv2-or-later, like the rest of Valgrind. We are interested in hearing people's opinions on this idea. We are also interested to hear if anyone has a tool they would like to be considered for inclusion as an experimental tool. Nick |
|
From: <js...@ac...> - 2007-10-05 00:17:51
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-10-05 02:00:01 CEST 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 == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest 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) |