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
(44) |
2
(9) |
3
(30) |
4
(28) |
5
(42) |
6
(14) |
7
(10) |
|
8
(7) |
9
(8) |
10
(6) |
11
(15) |
12
(13) |
13
(14) |
14
(23) |
|
15
(17) |
16
(10) |
17
(82) |
18
(14) |
19
(21) |
20
(14) |
21
(21) |
|
22
(7) |
23
(13) |
24
(16) |
25
(11) |
26
(11) |
27
(6) |
28
(7) |
|
29
(8) |
30
(13) |
31
(8) |
|
|
|
|
|
From: Bryan M. <bra...@go...> - 2006-10-05 23:17:24
|
Bob Rossi wrote: > On Thu, Oct 05, 2006 at 08:12:57PM +0100, Bryan Meredith wrote: >> Bob Rossi wrote: >>> On Thu, Oct 05, 2006 at 07:01:31PM +0100, Bryan Meredith wrote: >>>> Bob Rossi wrote: >>>>> On Sat, Sep 23, 2006 at 05:50:07PM +0100, Bryan Meredith wrote: >>>>>> Fellow Valgrinders, >>>>>> >>>>>> please see http://www.brainmurders.eclipse.co.uk/omega.html for a >>>>>> complete overview of what this tool can do for you! >>>>>> >>>>>> (We use this heavily at work - feel free to give it a spin...) >>>>>> >>>>>> As ever, I would welcome your comments, bug reports and especially any >>>>>> news of success stories. Please share them with us on the list and copy >>>>>> me in so I don't miss them. >>>>> Hi, >>>>> >>>>> I just installed valgrind with omega support. valgrind was reporting a >>>>> memory leak with the memcheck tool, and I spent a good 2 hours trying to >>>>> figure out if it was a leak or not, cause I couldn't find WHERE it >>>>> leaked. >>>>> >>>>> After running with the omega tool, I'm now confronted with 122 >>>>> memory leaks, where as the memcheck was saying I only had 2. >>>> The results shouldn't be that different apart from the indirect leaks >>>> will also be reported each time. If this isn't because of indirect leak >>>> reporting, I have more work to do. Try running with "--instant-reports >>>> --show-indirect" as this will make the indirect leaks stand out a bit >>>> better. You might want to stick the output in a log file though :D >>> Would it be possible to not print the indirect leaks via an option? >> You can try --instant-reports on its own (it wont show the indirect >> blocks without --show-indirect) and just use the on the fly leak reports >> to clue you in. This is set to only report on the first leak for a given >> allocation / leak location pair. I will look at splitting this out in >> the summary reports as well. > > If I run like this: > > >>>>> It looks like omega is not honoring the suppressions when reporting >>>>> on memory leaks, is this true? >>>> That is correct - I don't have suppression support in Omega. >>> Any plans on adding this? Basically, there are some memory leaks in our >>> tool that are not going away any time soon. It is sort of a pain for >>> me to see them in the reports, cause it takes more time to sort through >>> what is fixable now, and what is not fixable. Also, when our nigtly >>> testsuite runs, when the suprressions are used, memcheck reports there >>> are no memory leaks, which is really helpful. We can say if things >>> passed or failed off of this. > > If I run it like this: > > LD_LIBRARY_PATH=$VECTORCAST_DIR/lib:$LD_LIBRARY_PATH > PATH=/home/TOOLS/valgrind-omega-svn-10-05-2006/bin:$PATH valgrind > --tool=omega --num-callers=20 --suppressions=clicast.supp > --instant-reports foo.exe > out-omega-instant.txt 2>&1 > > I still get massive amounts of memory leaks in comparison to memcheck. > Is this what you would expect? > The --suppressions option won't do anything to suppress memory leak reports in Omega. If you are expecting leaks to be suppressed, don't because they wont be. Without having your program to play with, it's difficult to say. I am certainly nervous that you might be getting false positives although for a complete run, they are normally identified and discarded. I think a cautious first step would be to find the leak reports that match the malloc() shown by memcheck and see if they help you. Try to ignore the rest for now. Once those are fixed (or you decide to ignore them) pick one of the others and see if it is actually a real leak. If I had your source, I would do this step but obviously, its your source, you are familiar with it and it should take you a lot less time to determine if it is a leak (not to mention, I don't really want to be signing NDAs etc). If you find any false reports and can reproduce them, please let me know in as much detail as you can so I can hopefully replicate it here and fix it. >> for some funky suppression types) but I have been focusing on getting >> Omega to give the correct results first. >> >>>>> Can omega total the memory leaks that it found and report a number the >>>>> way memcheck does? That number usually provides a "wow factor" to people >>>>> explaining to there boss that they just stopped the coffee brewing >>>>> network application from leaking 100 megs of memory each time a pot of >>>>> coffee is brewed ... >>>> Happy to include this for you - it will be in RC2. >>> Thanks! >>> >> Out of interest, has Omega helped you to fix any of the leaks reported >> by Memcheck? > > To be honest, I've just started using it today, and I'm trying to > resolve these issues before I move forward. > > Bob Rossi > |
|
From: Bryan M. <bra...@go...> - 2006-10-05 19:54:56
|
Dirk Mueller wrote: > On Thursday, 5. October 2006 20:06, Julian Seward wrote: > >> Highly likely to be OpenSUSE 10.2 alpha N where N is the latest >> available (currently 5). > > Thats right :) Anyway, it seems the worst problems are caused by the drd > patch, removing that one makes omage work (except for the crash on exit I > referred to beforehand). > > > Dirk > thanks again Dirk (and Julian). Not sure when I can investigate this - I don't have a machine I can re-install yet (waiting for pptp to get fixed on Suse 10.1 or l2tp support to appear). I will spend some time with x86_64 - it could be a common problem that manifests differently on the differing architectures. Sometimes, I really wish I knew x86 assembler :( Bryan |
|
From: Dirk M. <dm...@gm...> - 2006-10-05 19:47:15
|
On Thursday, 5. October 2006 20:06, Julian Seward wrote: > Highly likely to be OpenSUSE 10.2 alpha N where N is the latest > available (currently 5). Thats right :) Anyway, it seems the worst problems are caused by the drd patch, removing that one makes omage work (except for the crash on exit I referred to beforehand). Dirk |
|
From: Bryan M. <bra...@go...> - 2006-10-05 19:13:04
|
Bob Rossi wrote: > On Thu, Oct 05, 2006 at 07:01:31PM +0100, Bryan Meredith wrote: >> Bob Rossi wrote: >>> On Sat, Sep 23, 2006 at 05:50:07PM +0100, Bryan Meredith wrote: >>>> Fellow Valgrinders, >>>> >>>> please see http://www.brainmurders.eclipse.co.uk/omega.html for a >>>> complete overview of what this tool can do for you! >>>> >>>> (We use this heavily at work - feel free to give it a spin...) >>>> >>>> As ever, I would welcome your comments, bug reports and especially any >>>> news of success stories. Please share them with us on the list and copy >>>> me in so I don't miss them. >>> Hi, >>> >>> I just installed valgrind with omega support. valgrind was reporting a >>> memory leak with the memcheck tool, and I spent a good 2 hours trying to >>> figure out if it was a leak or not, cause I couldn't find WHERE it >>> leaked. >>> >>> After running with the omega tool, I'm now confronted with 122 >>> memory leaks, where as the memcheck was saying I only had 2. >> The results shouldn't be that different apart from the indirect leaks >> will also be reported each time. If this isn't because of indirect leak >> reporting, I have more work to do. Try running with "--instant-reports >> --show-indirect" as this will make the indirect leaks stand out a bit >> better. You might want to stick the output in a log file though :D > > Would it be possible to not print the indirect leaks via an option? You can try --instant-reports on its own (it wont show the indirect blocks without --show-indirect) and just use the on the fly leak reports to clue you in. This is set to only report on the first leak for a given allocation / leak location pair. I will look at splitting this out in the summary reports as well. > >>> It looks like omega is not honoring the suppressions when reporting >>> on memory leaks, is this true? >> That is correct - I don't have suppression support in Omega. > > Any plans on adding this? Basically, there are some memory leaks in our > tool that are not going away any time soon. It is sort of a pain for > me to see them in the reports, cause it takes more time to sort through > what is fixable now, and what is not fixable. Also, when our nigtly > testsuite runs, when the suprressions are used, memcheck reports there > are no memory leaks, which is really helpful. We can say if things > passed or failed off of this. I would like to add suppression support in (and have a couple of ideas for some funky suppression types) but I have been focusing on getting Omega to give the correct results first. > >>> Can omega total the memory leaks that it found and report a number the >>> way memcheck does? That number usually provides a "wow factor" to people >>> explaining to there boss that they just stopped the coffee brewing >>> network application from leaking 100 megs of memory each time a pot of >>> coffee is brewed ... >> Happy to include this for you - it will be in RC2. > > Thanks! > Out of interest, has Omega helped you to fix any of the leaks reported by Memcheck? Bryan |
|
From: Julian S. <js...@ac...> - 2006-10-05 18:06:33
|
> Thanks for that Dirk - I am so glad this is on x86. I forgot the other > most relevant question - what distro is this on? Highly likely to be OpenSUSE 10.2 alpha N where N is the latest available (currently 5). J |
|
From: Bryan M. <bra...@go...> - 2006-10-05 18:01:39
|
Bob Rossi wrote: > On Sat, Sep 23, 2006 at 05:50:07PM +0100, Bryan Meredith wrote: >> Fellow Valgrinders, >> >> please see http://www.brainmurders.eclipse.co.uk/omega.html for a >> complete overview of what this tool can do for you! >> >> (We use this heavily at work - feel free to give it a spin...) >> >> As ever, I would welcome your comments, bug reports and especially any >> news of success stories. Please share them with us on the list and copy >> me in so I don't miss them. > > Hi, > > I just installed valgrind with omega support. valgrind was reporting a > memory leak with the memcheck tool, and I spent a good 2 hours trying to > figure out if it was a leak or not, cause I couldn't find WHERE it > leaked. > > After running with the omega tool, I'm now confronted with 122 > memory leaks, where as the memcheck was saying I only had 2. The results shouldn't be that different apart from the indirect leaks will also be reported each time. If this isn't because of indirect leak reporting, I have more work to do. Try running with "--instant-reports --show-indirect" as this will make the indirect leaks stand out a bit better. You might want to stick the output in a log file though :D > > It looks like omega is not honoring the suppressions when reporting > on memory leaks, is this true? That is correct - I don't have suppression support in Omega. > > Also, I was only trying to fix the "definatly" lost instances of > memory leaks that memcheck found. Then I was going to turn on leak > checking in the nightly test suite. At that point, I could then continue > to fix the rest of the memory leaks memcheck found (ie. indirect lost). > > So, two more questions. > > Why does omega find so many more memory leaks than memcheck? > Are they real leaks or false positives? See above for indirect leak reporting. Apart from that, its hard to tell without having the source available in order to work out why Omega generated the leak report. > > Can omega total the memory leaks that it found and report a number the > way memcheck does? That number usually provides a "wow factor" to people > explaining to there boss that they just stopped the coffee brewing > network application from leaking 100 megs of memory each time a pot of > coffee is brewed ... Happy to include this for you - it will be in RC2. > > Thanks, > Bob Rossi > Thanks for taking the time to try my tool and tell me about it. Bryan |
|
From: <sv...@va...> - 2006-10-05 17:59:28
|
Author: sewardj
Date: 2006-10-05 18:59:23 +0100 (Thu, 05 Oct 2006)
New Revision: 6197
Log:
A memory pool update from Graydon Hoare.
Here's an update to the mempool move / change client requests and sanity=20
checking. The following changes are present:
- Added one more (hopefully last) client request, a predicate to
test whether a mempool anchor address is currently tracked.
It turns out mozilla's arena-using code is sufficiently inconsistent
in its assumptions that it's very difficult to phrase the valgrind
client-request annotations without this request. Namely: sometime
arena-init and arena-free operations are assumed to be idempotent.
- Fixed a very rapid tool-memory leak in the mempool sanity check
routine. The previous version of the patch I posted would use all
memory even on my Very Beefy Test Machine within ~15 minutes of
browsing with firefox.
- Added a little logging code to print the counts of pools and chunks
active every ~10000 sanity checks, when running with -v.
Modified:
trunk/include/valgrind.h
trunk/memcheck/mc_include.h
trunk/memcheck/mc_main.c
trunk/memcheck/mc_malloc_wrappers.c
Modified: trunk/include/valgrind.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/valgrind.h 2006-10-05 17:56:14 UTC (rev 6196)
+++ trunk/include/valgrind.h 2006-10-05 17:59:23 UTC (rev 6197)
@@ -2289,6 +2289,9 @@
VG_USERREQ__MEMPOOL_ALLOC =3D 0x1305,
VG_USERREQ__MEMPOOL_FREE =3D 0x1306,
VG_USERREQ__MEMPOOL_TRIM =3D 0x1307,
+ VG_USERREQ__MOVE_MEMPOOL =3D 0x1308,
+ VG_USERREQ__MEMPOOL_CHANGE =3D 0x1309,
+ VG_USERREQ__MEMPOOL_EXISTS =3D 0x130a,
=20
/* Allow printfs to valgrind log. */
VG_USERREQ__PRINTF =3D 0x1401,
@@ -2513,6 +2516,31 @@
pool, addr, size, 0, 0); \
}
=20
+/* Resize and/or move a piece associated with a memory pool. */
+#define VALGRIND_MOVE_MEMPOOL(poolA, poolB) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__MOVE_MEMPOOL, \
+ poolA, poolB, 0, 0, 0); \
+ }
+
+/* Resize and/or move a piece associated with a memory pool. */
+#define VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__MEMPOOL_CHANGE, \
+ pool, addrA, addrB, size, 0); \
+ }
+
+/* Return 1 if a mempool exists, else 0. */
+#define VALGRIND_MEMPOOL_EXISTS(pool) \
+ ({unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__MEMPOOL_EXISTS, \
+ pool, 0, 0, 0, 0); \
+ _qzz_res; \
+ })
+
/* Mark a piece of memory as being a stack. Returns a stack id. */
#define VALGRIND_STACK_REGISTER(start, end) \
({unsigned int _qzz_res; \
Modified: trunk/memcheck/mc_include.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_include.h 2006-10-05 17:56:14 UTC (rev 6196)
+++ trunk/memcheck/mc_include.h 2006-10-05 17:59:23 UTC (rev 6197)
@@ -87,6 +87,9 @@
Addr addr, SizeT size );
extern void MC_(mempool_free) ( Addr pool, Addr addr );
extern void MC_(mempool_trim) ( Addr pool, Addr addr, SizeT size );
+extern void MC_(move_mempool) ( Addr poolA, Addr poolB );
+extern void MC_(mempool_change) ( Addr pool, Addr addrA, Addr addrB, Si=
zeT size );
+extern Bool MC_(mempool_exists) ( Addr pool );
=20
extern MC_Chunk* MC_(get_freed_list_head)( void );
=20
Modified: trunk/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_main.c 2006-10-05 17:56:14 UTC (rev 6196)
+++ trunk/memcheck/mc_main.c 2006-10-05 17:59:23 UTC (rev 6197)
@@ -4064,7 +4064,10 @@
&& VG_USERREQ__DESTROY_MEMPOOL !=3D arg[0]
&& VG_USERREQ__MEMPOOL_ALLOC !=3D arg[0]
&& VG_USERREQ__MEMPOOL_FREE !=3D arg[0]
- && VG_USERREQ__MEMPOOL_TRIM !=3D arg[0])
+ && VG_USERREQ__MEMPOOL_TRIM !=3D arg[0]
+ && VG_USERREQ__MOVE_MEMPOOL !=3D arg[0]
+ && VG_USERREQ__MEMPOOL_CHANGE !=3D arg[0]
+ && VG_USERREQ__MEMPOOL_EXISTS !=3D arg[0])
return False;
=20
switch (arg[0]) {
@@ -4239,6 +4242,32 @@
return True;
}
=20
+ case VG_USERREQ__MOVE_MEMPOOL: {
+ Addr poolA =3D (Addr)arg[1];
+ Addr poolB =3D (Addr)arg[2];
+
+ MC_(move_mempool) ( poolA, poolB );
+ return True;
+ }
+
+ case VG_USERREQ__MEMPOOL_CHANGE: {
+ Addr pool =3D (Addr)arg[1];
+ Addr addrA =3D (Addr)arg[2];
+ Addr addrB =3D (Addr)arg[3];
+ UInt size =3D arg[4];
+
+ MC_(mempool_change) ( pool, addrA, addrB, size );
+ return True;
+ }
+
+ case VG_USERREQ__MEMPOOL_EXISTS: {
+ Addr pool =3D (Addr)arg[1];
+
+ *ret =3D (UWord) MC_(mempool_exists) ( pool );
+ return True;
+ }
+
+
default:
VG_(message)(Vg_UserMsg,=20
"Warning: unknown memcheck client request code %ll=
x",
Modified: trunk/memcheck/mc_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_malloc_wrappers.c 2006-10-05 17:56:14 UTC (rev 6196=
)
+++ trunk/memcheck/mc_malloc_wrappers.c 2006-10-05 17:59:23 UTC (rev 6197=
)
@@ -41,6 +41,7 @@
#include "pub_tool_replacemalloc.h"
#include "pub_tool_threadstate.h"
#include "pub_tool_tooliface.h" // Needed for mc_include.h
+#include "pub_tool_stacktrace.h" // For VG_(get_and_pp_StackTrace)
=20
#include "mc_include.h"
=20
@@ -53,7 +54,11 @@
static SizeT cmalloc_n_frees =3D 0;
static SizeT cmalloc_bs_mallocd =3D 0;
=20
+/* For debug printing to do with mempools: what stack trace
+ depth to show. */
+#define MEMPOOL_DEBUG_STACKTRACE_DEPTH 16
=20
+
/*------------------------------------------------------------*/
/*--- Tracking malloc'd and free'd blocks ---*/
/*------------------------------------------------------------*/
@@ -392,7 +397,21 @@
=20
void MC_(create_mempool)(Addr pool, UInt rzB, Bool is_zeroed)
{
- MC_Mempool* mp =3D VG_(malloc)(sizeof(MC_Mempool));
+ MC_Mempool* mp;
+
+ if (VG_(clo_verbosity) > 2) {
+ VG_(message)(Vg_UserMsg, "create_mempool(%p, %d, %d)",=20
+ pool, rzB, is_zeroed);
+ VG_(get_and_pp_StackTrace)
+ (VG_(get_running_tid)(), MEMPOOL_DEBUG_STACKTRACE_DEPTH);
+ }
+
+ mp =3D VG_(HT_lookup)(MC_(mempool_list), (UWord)pool);
+ if (mp !=3D NULL) {
+ VG_(tool_panic)("MC_(create_mempool): duplicate pool creation");
+ }
+ =20
+ mp =3D VG_(malloc)(sizeof(MC_Mempool));
mp->pool =3D pool;
mp->rzB =3D rzB;
mp->is_zeroed =3D is_zeroed;
@@ -415,6 +434,12 @@
MC_Chunk* mc;
MC_Mempool* mp;
=20
+ if (VG_(clo_verbosity) > 2) {
+ VG_(message)(Vg_UserMsg, "destroy_mempool(%p)", pool);
+ VG_(get_and_pp_StackTrace)
+ (VG_(get_running_tid)(), MEMPOOL_DEBUG_STACKTRACE_DEPTH);
+ }
+
mp =3D VG_(HT_remove) ( MC_(mempool_list), (UWord)pool );
=20
if (mp =3D=3D NULL) {
@@ -436,15 +461,106 @@
VG_(free)(mp);
}
=20
+static Int=20
+mp_compar(void* n1, void* n2)
+{
+ MC_Chunk* mc1 =3D *(MC_Chunk**)n1;
+ MC_Chunk* mc2 =3D *(MC_Chunk**)n2;
+ return (mc1->data < mc2->data ? -1 : 1);
+}
+
+static void=20
+check_mempool_sane(MC_Mempool* mp)
+{
+ UInt n_chunks, i, bad =3D 0; =20
+ static UInt tick =3D 0;
+
+ MC_Chunk **chunks =3D (MC_Chunk**) VG_(HT_to_array)( mp->chunks, &n_c=
hunks );
+ if (!chunks)
+ return;
+
+ if (VG_(clo_verbosity) > 1) {
+ if (tick++ >=3D 10000)
+ {
+ UInt total_pools =3D 0, total_chunks =3D 0;
+ MC_Mempool* mp2;
+ =20
+ VG_(HT_ResetIter)(MC_(mempool_list));
+ while ( (mp2 =3D VG_(HT_Next)(MC_(mempool_list))) ) {
+ total_pools++;
+ VG_(HT_ResetIter)(mp2->chunks);
+ while (VG_(HT_Next)(mp2->chunks)) {
+ total_chunks++;
+ }
+ }
+ =20
+ VG_(message)(Vg_UserMsg,=20
+ "Total mempools active: %d pools, %d chunks\n",=20
+ total_pools, total_chunks);
+ tick =3D 0;
+ }
+ }
+
+
+ VG_(ssort)((void*)chunks, n_chunks, sizeof(VgHashNode*), mp_compar);
+ =20
+ /* Sanity check; assert that the blocks are now in order */
+ for (i =3D 0; i < n_chunks-1; i++) {
+ if (chunks[i]->data > chunks[i+1]->data) {
+ VG_(message)(Vg_UserMsg,=20
+ "Mempool chunk %d / %d is out of order "
+ "wrt. its successor",=20
+ i+1, n_chunks);
+ bad =3D 1;
+ }
+ }
+ =20
+ /* Sanity check -- make sure they don't overlap */
+ for (i =3D 0; i < n_chunks-1; i++) {
+ if (chunks[i]->data + chunks[i]->size > chunks[i+1]->data ) {
+ VG_(message)(Vg_UserMsg,=20
+ "Mempool chunk %d / %d overlaps with its successor=
",=20
+ i+1, n_chunks);
+ bad =3D 1;
+ }
+ }
+
+ if (bad) {
+ VG_(message)(Vg_UserMsg,=20
+ "Bad mempool (%d chunks), dumping chunks for inspection:=
",
+ n_chunks);
+ for (i =3D 0; i < n_chunks; ++i) {
+ VG_(message)(Vg_UserMsg,=20
+ "Mempool chunk %d / %d: %d bytes [%x,%x), alloc=
ated:",
+ i+1,=20
+ n_chunks,=20
+ chunks[i]->size,=20
+ chunks[i]->data,=20
+ chunks[i]->data + chunks[i]->size);
+
+ VG_(pp_ExeContext)(chunks[i]->where);
+ }
+ }
+ VG_(free)(chunks);
+}
+
void MC_(mempool_alloc)(ThreadId tid, Addr pool, Addr addr, SizeT size)
{
- MC_Mempool* mp =3D VG_(HT_lookup) ( MC_(mempool_list), (UWord)pool );
+ MC_Mempool* mp;
=20
+ if (VG_(clo_verbosity) > 2) { =20
+ VG_(message)(Vg_UserMsg, "mempool_alloc(%p, %p, %d)", pool, addr, =
size);
+ VG_(get_and_pp_StackTrace) (tid, MEMPOOL_DEBUG_STACKTRACE_DEPTH);
+ }
+
+ mp =3D VG_(HT_lookup) ( MC_(mempool_list), (UWord)pool );
if (mp =3D=3D NULL) {
MC_(record_illegal_mempool_error) ( tid, pool );
} else {
+ check_mempool_sane(mp);
MC_(new_block)(tid, addr, size, /*ignored*/0, mp->rzB, mp->is_zero=
ed,
MC_AllocCustom, mp->chunks);
+ check_mempool_sane(mp);
}
}
=20
@@ -460,13 +576,26 @@
return;
}
=20
+ if (VG_(clo_verbosity) > 2) {
+ VG_(message)(Vg_UserMsg, "mempool_free(%p, %p)", pool, addr);
+ VG_(get_and_pp_StackTrace) (tid, MEMPOOL_DEBUG_STACKTRACE_DEPTH);
+ }
+
+ check_mempool_sane(mp);
mc =3D VG_(HT_remove)(mp->chunks, (UWord)addr);
if (mc =3D=3D NULL) {
MC_(record_free_error)(tid, (Addr)addr);
return;
}
=20
+ if (VG_(clo_verbosity) > 2) {
+ VG_(message)(Vg_UserMsg,=20
+ "mempool_free(%p, %p) freed chunk of %d bytes",=20
+ pool, addr, mc->size);
+ }
+
die_and_free_mem ( tid, mc, mp->rzB );
+ check_mempool_sane(mp);
}
=20
=20
@@ -478,12 +607,18 @@
UInt n_shadows, i;
VgHashNode** chunks;
=20
+ if (VG_(clo_verbosity) > 2) {
+ VG_(message)(Vg_UserMsg, "mempool_trim(%p, %p, %d)", pool, addr, s=
ize);
+ VG_(get_and_pp_StackTrace) (tid, MEMPOOL_DEBUG_STACKTRACE_DEPTH);
+ }
+
mp =3D VG_(HT_lookup)(MC_(mempool_list), (UWord)pool);
if (mp =3D=3D NULL) {
MC_(record_illegal_mempool_error)(tid, pool);
return;
}
=20
+ check_mempool_sane(mp);
chunks =3D VG_(HT_to_array) ( mp->chunks, &n_shadows );
if (n_shadows =3D=3D 0) {
tl_assert(chunks =3D=3D NULL);
@@ -493,7 +628,7 @@
tl_assert(chunks !=3D NULL);
for (i =3D 0; i < n_shadows; ++i) {
=20
- Addr lo, hi;
+ Addr lo, hi, min, max;
=20
mc =3D (MC_Chunk*) chunks[i];
=20
@@ -518,6 +653,7 @@
if (VG_(HT_remove)(mp->chunks, (UWord)mc->data) =3D=3D NULL) {
MC_(record_free_error)(tid, (Addr)mc->data);
VG_(free)(chunks);
+ check_mempool_sane(mp);
return;
}
die_and_free_mem ( tid, mc, mp->rzB ); =20
@@ -532,13 +668,38 @@
if (VG_(HT_remove)(mp->chunks, (UWord)mc->data) =3D=3D NULL) {
MC_(record_free_error)(tid, (Addr)mc->data);
VG_(free)(chunks);
+ check_mempool_sane(mp);
return;
}
=20
- lo =3D mc->data > addr ? mc->data : addr;
- hi =3D mc->data + mc->size < addr + size ? mc->data + mc->size =
: addr + size;
+ if (mc->data < addr) {
+ min =3D mc->data;
+ lo =3D addr;
+ } else {
+ min =3D addr;
+ lo =3D mc->data;
+ }
=20
+ if (mc->data + size > addr + size) {
+ max =3D mc->data + size;
+ hi =3D addr + size;
+ } else {
+ max =3D addr + size;
+ hi =3D mc->data + size;
+ }
+
+ tl_assert(min <=3D lo);
tl_assert(lo < hi);
+ tl_assert(hi <=3D max);
+
+ if (min < lo && !EXTENT_CONTAINS(min)) {
+ MC_(make_mem_noaccess)( min, lo - min);
+ }
+
+ if (hi < max && !EXTENT_CONTAINS(max)) {
+ MC_(make_mem_noaccess)( hi, max - hi );
+ }
+
mc->data =3D lo;
mc->size =3D (UInt) (hi - lo);
VG_(HT_add_node)( mp->chunks, mc ); =20
@@ -547,9 +708,77 @@
#undef EXTENT_CONTAINS
=20
}
+ check_mempool_sane(mp);
VG_(free)(chunks);
}
=20
+void MC_(move_mempool)(Addr poolA, Addr poolB)
+{
+ MC_Mempool* mp;
+
+ if (VG_(clo_verbosity) > 2) {
+ VG_(message)(Vg_UserMsg, "move_mempool(%p, %p)", poolA, poolB);
+ VG_(get_and_pp_StackTrace)
+ (VG_(get_running_tid)(), MEMPOOL_DEBUG_STACKTRACE_DEPTH);
+ }
+
+ mp =3D VG_(HT_remove) ( MC_(mempool_list), (UWord)poolA );
+
+ if (mp =3D=3D NULL) {
+ ThreadId tid =3D VG_(get_running_tid)();
+ MC_(record_illegal_mempool_error) ( tid, poolA );
+ return;
+ }
+
+ mp->pool =3D poolB;
+ VG_(HT_add_node)( MC_(mempool_list), mp );
+}
+
+void MC_(mempool_change)(Addr pool, Addr addrA, Addr addrB, SizeT size)
+{
+ MC_Mempool* mp;
+ MC_Chunk* mc;
+ ThreadId tid =3D VG_(get_running_tid)();
+
+ if (VG_(clo_verbosity) > 2) {
+ VG_(message)(Vg_UserMsg, "mempool_change(%p, %p, %p, %d)",=20
+ pool, addrA, addrB, size);
+ VG_(get_and_pp_StackTrace) (tid, MEMPOOL_DEBUG_STACKTRACE_DEPTH);
+ }
+
+ mp =3D VG_(HT_lookup)(MC_(mempool_list), (UWord)pool);
+ if (mp =3D=3D NULL) {
+ MC_(record_illegal_mempool_error)(tid, pool);
+ return;
+ }
+
+ check_mempool_sane(mp);
+
+ mc =3D VG_(HT_remove)(mp->chunks, (UWord)addrA);
+ if (mc =3D=3D NULL) {
+ MC_(record_free_error)(tid, (Addr)addrA);
+ return;
+ }
+
+ mc->data =3D addrB;
+ mc->size =3D size;
+ VG_(HT_add_node)( mp->chunks, mc );
+
+ check_mempool_sane(mp);
+}
+
+Bool MC_(mempool_exists)(Addr pool)
+{
+ MC_Mempool* mp;
+
+ mp =3D VG_(HT_lookup)(MC_(mempool_list), (UWord)pool);
+ if (mp =3D=3D NULL) {
+ return False;
+ }
+ return True;
+}
+
+
/*------------------------------------------------------------*/
/*--- Statistics printing ---*/
/*------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2006-10-05 17:56:19
|
Author: sewardj Date: 2006-10-05 18:56:14 +0100 (Thu, 05 Oct 2006) New Revision: 6196 Log: Excellent documentation from Graydon Hoare on his mempool client-request work. Modified: trunk/memcheck/docs/mc-manual.xml Modified: trunk/memcheck/docs/mc-manual.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/docs/mc-manual.xml 2006-10-05 13:18:26 UTC (rev 6195) +++ trunk/memcheck/docs/mc-manual.xml 2006-10-05 17:56:14 UTC (rev 6196) @@ -1072,4 +1072,202 @@ </itemizedlist> =20 </sect1> + + + + +<sect1 id=3D"mc-manual.mempools" xreflabel=3D"Memory pools"> +<title>Memory Pools: describing and working with custom allocators</titl= e> + +<para>Some programs use custom memory allocators, often for performance +reasons. There are many different sorts of memory pool, so Memcheck +attempts to reason about them using a loose, abstract model. We +use the following terminology when describing custom allocation +systems:</para> + +<itemizedlist> + <listitem> + <para>Custom allocation involves a set of independent "memory pools"= . + </para> + </listitem> + <listitem> + <para>Memcheck's notion of a a memory pool consists of a single "anc= hor + address" and a set of non-overlapping "chunks" associated with the + anchor address.</para> + </listitem> + <listitem> + <para>Typically a pool's anchor address is the address of a=20 + book-keeping "header" structure.</para> + </listitem> + <listitem> + <para>Typically the pool's chunks are drawn from a contiguous + "superblock" acquired through the system malloc() or mmap().</para> + </listitem> + +</itemizedlist> + +<para>Keep in mind that the last two points above say "typically": the +Valgrind mempool client request API is intentionally vague about the +exact structure of a mempool. There is no specific mention made of +headers or superblocks. Nevertheless, the following picture may help +elucidate the intention of the terms in the API:</para> + +<programlisting><![CDATA[ + "pool" + (anchor address) + | + v + +--------+---+ + | header | o | + +--------+-|-+ + | + v superblock + +------+---+--------------+---+------------------+ + | |rzB| allocation |rzB| | + +------+---+--------------+---+------------------+ + ^ ^ + | | + "addr" "addr"+"size" +]]></programlisting> + +<para> +Note that the header and the superblock may be contiguous or +discontiguous, and there may be multiple superblocks associated with a +single header; such variations are opaque to Memcheck. The API +only requires that your allocation scheme can present sensible values +of "pool", "addr" and "size".</para> + +<para> +Typically, before making client requests related to mempools, a client +program will have allocated such a header and superblock for their +mempool, and marked the superblock NOACCESS using the +<varname>VALGRIND_MAKE_MEM_NOACCESS</varname> client request.</para> + +<para> +When dealing with mempools, the goal is to maintain a particular +invariant condition: that Memcheck believes the unallocated portions +of the pool's superblock (including redzones) are NOACCESS. To +maintain this invariant, the client program must ensure that the +superblock starts out in that state; Memcheck cannot make it so, since +Memcheck never explicitly learns about the superblock of a pool, only +the allocated chunks within the pool.</para> + +<para> +Once the header and superblock for a pool are established and properly +marked, there are a number of client requests programs can use to +inform Memcheck about changes to the state of a mempool:</para> + +<itemizedlist> + + <listitem> + <para> + <varname>VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)</varname>: + This request registers the address "pool" as the anchor address=20 + for a memory pool. It also provides a size "rzB", specifying how=20 + large the redzones placed around chunks allocated from the pool=20 + should be. Finally, it provides an "is_zeroed" flag that specifies=20 + whether the pool's chunks are zeroed (more precisely: defined)=20 + when allocated. + </para> + <para> + Upon completion of this request, no chunks are associated with the + pool. The request simply tells Memcheck that the pool exists, so th= at + subsequent calls can refer to it as a pool. + </para> + </listitem> + + <listitem> + <para><varname>VALGRIND_DESTROY_MEMPOOL(pool)</varname>: + This request tells Memcheck that a pool is being torn down. Memcheck + then removes all records of chunks associated with the pool, as well + as its record of the pool's existence. While destroying its records = of + a mempool, Memcheck resets the redzones of any live chunks in the po= ol + to NOACCESS. + </para> + </listitem> + + <listitem> + <para><varname>VALGRIND_MEMPOOL_ALLOC(pool, addr, size)</varname>: + This request informs Memcheck that a "size"-byte chunk has been + allocated at "addr", and associates the chunk with the specified + "pool". If the pool was created with nonzero "rzB" redzones, Memchec= k + will mark the "rzB" bytes before and after the chunk as NOACCESS. If + the pool was created with the "is_zeroed" flag set, Memcheck will ma= rk + the chunk as DEFINED, otherwise Memcheck will mark the chunk as + UNDEFINED. + </para> + </listitem> + + <listitem> + <para><varname>VALGRIND_MEMPOOL_FREE(pool, addr)</varname>: + This request informs Memcheck that the chunk at "addr" should no + longer be considered allocated. Memcheck will mark the chunk + associated with "addr" as NOACCESS, and delete its record of the + chunk's existence. + </para> + </listitem> + + <listitem> + <para><varname>VALGRIND_MEMPOOL_TRIM(pool, addr, size)</varname>: + This request "trims" the chunks associated with "pool". The request + only operates on chunks associated with "pool". Trimming is formally + defined as:</para> + <itemizedlist> + <listitem> + <para> All chunks entirely inside the range [addr,addr+size) are + preserved.</para> + </listitem> + <listitem> + <para>All chunks entirely outside the range [addr,addr+size) are + discarded, as though <varname>VALGRIND_MEMPOOL_FREE</varname> + was called on them. </para> + </listitem> + <listitem> + <para>All other chunks must intersect with the range=20 + [addr,addr+size); areas outside the intersection are marked as=20 + NOACCESS, as though they had been independently freed with=20 + <varname>VALGRIND_MEMPOOL_FREE</varname>.</para> + </listitem> + </itemizedlist> + <para>This is a somewhat rare request, but can be useful in=20 + implementing the type of mass-free operations common in custom=20 + LIFO allocators.</para> + </listitem> + + <listitem> + <para><varname>VALGRIND_MOVE_MEMPOOL(poolA, poolB)</varname>: + This request informs Memcheck that the pool previously anchored at + address "poolA" has moved to anchor address "poolB". This is a rare + request, typically only needed if you realloc() the header of=20 + a mempool.</para> + <para>No memory-status bits are altered by this request.</para> + </listitem> + + <listitem> + <para> + <varname>VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size)</varname>= : + This request informs Memcheck that the chunk previously allocated at + address "addrA" within "pool" has been moved and/or resized, and sho= uld + be changed to cover the region [addrB,addrB+size). This is a rare + request, typically only needed if you realloc() a superblock or wish + to extend a chunk without changing its memory-status bits. + </para> + <para>No memory-status bits are altered by this request. + </para> + </listitem> + + <listitem> + <para><varname>VALGRIND_MEMPOOL_EXISTS(pool)</varname>: + This request informs the caller whether or not Memcheck is currently= =20 + tracking a mempool at anchor address "pool". It evaluates to 1 when=20 + there is a mempool associated with that address, 0 otherwise. This i= s a=20 + rare request, only useful in circumstances when client code might ha= ve=20 + lost track of the set of active mempools. + </para> + </listitem> + +</itemizedlist> + + +</sect1> </chapter> |
|
From: Bryan M. <bra...@go...> - 2006-10-05 17:49:14
|
Dirk Mueller wrote: > On Wednesday, 4. October 2006 23:46, Bryan Meredith wrote: > >> that's a start - x86 or x86_64? > > x86 > >> What version of gcc do you have on your system? > > gcc 4.1.3 > >> How does it crash? > > it crashes during exit, leaving a big useless core file behind: > > >> How did you run it? > > valgrind --tool=omega konqueror > > > Thanks, > Dirk > Thanks for that Dirk - I am so glad this is on x86. I forgot the other most relevant question - what distro is this on? Bryan |
|
From: <js...@ac...> - 2006-10-05 13:27:17
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-10-05 09:00:01 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 == 208 tests, 10 stderr failures, 7 stdout failures, 0 posttest failures == memcheck/tests/leak-cycle (stderr) 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/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/jm-int (stdout) 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) ================================================= == 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 == 207 tests, 10 stderr failures, 7 stdout failures, 0 posttest failures == memcheck/tests/leak-cycle (stderr) 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/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/jm-int (stdout) 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) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Oct 5 09:12:12 2006 --- new.short Thu Oct 5 09:24:20 2006 *************** *** 8,10 **** ! == 207 tests, 10 stderr failures, 7 stdout failures, 0 posttest failures == memcheck/tests/leak-cycle (stderr) --- 8,10 ---- ! == 208 tests, 10 stderr failures, 7 stdout failures, 0 posttest failures == memcheck/tests/leak-cycle (stderr) |
|
From: <sv...@va...> - 2006-10-05 13:18:28
|
Author: sewardj
Date: 2006-10-05 14:18:26 +0100 (Thu, 05 Oct 2006)
New Revision: 6195
Log:
Get rid of syscall numbers for ptx and ora syscalls.
Modified:
branches/AIX5/coregrind/m_vkiscnums.c
branches/AIX5/include/vki/vki-scnums-aix5.h
Modified: branches/AIX5/coregrind/m_vkiscnums.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_vkiscnums.c 2006-10-05 12:43:32 UTC (rev 61=
94)
+++ branches/AIX5/coregrind/m_vkiscnums.c 2006-10-05 13:18:26 UTC (rev 61=
95)
@@ -524,57 +524,6 @@
Int VG_(aix5_NR_iosuspend) =3D __NR_AIX5_UNKNOWN;
Int VG_(aix5_NR_kaio_rdwr) =3D __NR_AIX5_UNKNOWN;
Int VG_(aix5_NR_aio_nwait) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_sysinfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_li_getinfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_li_seltrc) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_set_tuning_phase) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_tuning_mode) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_li_disable) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_li_enable) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_dkstats_pathname) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_pathstats) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_numpathstats) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_counts) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_intrs) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_num_intr_source) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_file_count) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_cinodes) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_ncino) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_syswait) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_misc_intrs) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_domain_proto) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_flckinfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_shminfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_seminfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_msginfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_kmembuckets) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_numkmembuckets) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_kmemstats) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_rtstat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_udpstat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_tcpstat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_icmp6stat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_icmpstat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_ip6stat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_ipstat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_mbstat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_pfhdata) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_vmker) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_vminfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_cpuinfo) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_ndd) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_ndds) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_numndds) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_ifnet) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_ifnets) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_numifnets) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_dkstat) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_dkstats_diskname) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_dkstats) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_numdkstats) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_numintrs) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_ptx_get_emal_sample) =3D __NR_AIX5_UNKNOWN;
-Int VG_(aix5_NR_oracle_kstat) =3D __NR_AIX5_UNKNOWN;
Int VG_(aix5_NR__posix_iofsync) =3D __NR_AIX5_UNKNOWN;
Int VG_(aix5_NR__posix_aio_nwait_timeout) =3D __NR_AIX5_UNKNOWN;
Int VG_(aix5_NR__posix_kaio_stats) =3D __NR_AIX5_UNKNOWN;
@@ -1111,57 +1060,6 @@
XXX(iosuspend)
XXX(kaio_rdwr)
XXX(aio_nwait)
- XXX(ptx_get_sysinfo)
- XXX(ptx_li_getinfo)
- XXX(ptx_li_seltrc)
- XXX(ptx_set_tuning_phase)
- XXX(ptx_get_tuning_mode)
- XXX(ptx_li_disable)
- XXX(ptx_li_enable)
- XXX(ptx_get_dkstats_pathname)
- XXX(ptx_get_pathstats)
- XXX(ptx_get_numpathstats)
- XXX(ptx_get_counts)
- XXX(ptx_get_intrs)
- XXX(ptx_get_num_intr_source)
- XXX(ptx_get_file_count)
- XXX(ptx_get_cinodes)
- XXX(ptx_get_ncino)
- XXX(ptx_get_syswait)
- XXX(ptx_get_misc_intrs)
- XXX(ptx_get_domain_proto)
- XXX(ptx_get_flckinfo)
- XXX(ptx_get_shminfo)
- XXX(ptx_get_seminfo)
- XXX(ptx_get_msginfo)
- XXX(ptx_get_kmembuckets)
- XXX(ptx_get_numkmembuckets)
- XXX(ptx_get_kmemstats)
- XXX(ptx_get_rtstat)
- XXX(ptx_get_udpstat)
- XXX(ptx_get_tcpstat)
- XXX(ptx_get_icmp6stat)
- XXX(ptx_get_icmpstat)
- XXX(ptx_get_ip6stat)
- XXX(ptx_get_ipstat)
- XXX(ptx_get_mbstat)
- XXX(ptx_get_pfhdata)
- XXX(ptx_get_vmker)
- XXX(ptx_get_vminfo)
- XXX(ptx_get_cpuinfo)
- XXX(ptx_get_ndd)
- XXX(ptx_get_ndds)
- XXX(ptx_get_numndds)
- XXX(ptx_get_ifnet)
- XXX(ptx_get_ifnets)
- XXX(ptx_get_numifnets)
- XXX(ptx_get_dkstat)
- XXX(ptx_get_dkstats_diskname)
- XXX(ptx_get_dkstats)
- XXX(ptx_get_numdkstats)
- XXX(ptx_get_numintrs)
- XXX(ptx_get_emal_sample)
- XXX(oracle_kstat)
XXX(_posix_iofsync)
XXX(_posix_aio_nwait_timeout)
XXX(_posix_kaio_stats)
Modified: branches/AIX5/include/vki/vki-scnums-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-scnums-aix5.h 2006-10-05 12:43:32 UTC (=
rev 6194)
+++ branches/AIX5/include/vki/vki-scnums-aix5.h 2006-10-05 13:18:26 UTC (=
rev 6195)
@@ -1459,159 +1459,6 @@
extern Int VG_(aix5_NR_aio_nwait);
#define __NR_AIX5_aio_nwait VG_(aix5_NR_aio_nwait)
=20
-extern Int VG_(aix5_NR_ptx_get_sysinfo);
-#define __NR_AIX5_ptx_get_sysinfo VG_(aix5_NR_ptx_get_sysinfo)
-
-extern Int VG_(aix5_NR_ptx_li_getinfo);
-#define __NR_AIX5_ptx_li_getinfo VG_(aix5_NR_ptx_li_getinfo)
-
-extern Int VG_(aix5_NR_ptx_li_seltrc);
-#define __NR_AIX5_ptx_li_seltrc VG_(aix5_NR_ptx_li_seltrc)
-
-extern Int VG_(aix5_NR_ptx_set_tuning_phase);
-#define __NR_AIX5_ptx_set_tuning_phase VG_(aix5_NR_ptx_set_tuning_phase)
-
-extern Int VG_(aix5_NR_ptx_get_tuning_mode);
-#define __NR_AIX5_ptx_get_tuning_mode VG_(aix5_NR_ptx_get_tuning_mode)
-
-extern Int VG_(aix5_NR_ptx_li_disable);
-#define __NR_AIX5_ptx_li_disable VG_(aix5_NR_ptx_li_disable)
-
-extern Int VG_(aix5_NR_ptx_li_enable);
-#define __NR_AIX5_ptx_li_enable VG_(aix5_NR_ptx_li_enable)
-
-extern Int VG_(aix5_NR_ptx_get_dkstats_pathname);
-#define __NR_AIX5_ptx_get_dkstats_pathname VG_(aix5_NR_ptx_get_dkstats_p=
athname)
-
-extern Int VG_(aix5_NR_ptx_get_pathstats);
-#define __NR_AIX5_ptx_get_pathstats VG_(aix5_NR_ptx_get_pathstats)
-
-extern Int VG_(aix5_NR_ptx_get_numpathstats);
-#define __NR_AIX5_ptx_get_numpathstats VG_(aix5_NR_ptx_get_numpathstats)
-
-extern Int VG_(aix5_NR_ptx_get_counts);
-#define __NR_AIX5_ptx_get_counts VG_(aix5_NR_ptx_get_counts)
-
-extern Int VG_(aix5_NR_ptx_get_intrs);
-#define __NR_AIX5_ptx_get_intrs VG_(aix5_NR_ptx_get_intrs)
-
-extern Int VG_(aix5_NR_ptx_get_num_intr_source);
-#define __NR_AIX5_ptx_get_num_intr_source VG_(aix5_NR_ptx_get_num_intr_s=
ource)
-
-extern Int VG_(aix5_NR_ptx_get_file_count);
-#define __NR_AIX5_ptx_get_file_count VG_(aix5_NR_ptx_get_file_count)
-
-extern Int VG_(aix5_NR_ptx_get_cinodes);
-#define __NR_AIX5_ptx_get_cinodes VG_(aix5_NR_ptx_get_cinodes)
-
-extern Int VG_(aix5_NR_ptx_get_ncino);
-#define __NR_AIX5_ptx_get_ncino VG_(aix5_NR_ptx_get_ncino)
-
-extern Int VG_(aix5_NR_ptx_get_syswait);
-#define __NR_AIX5_ptx_get_syswait VG_(aix5_NR_ptx_get_syswait)
-
-extern Int VG_(aix5_NR_ptx_get_misc_intrs);
-#define __NR_AIX5_ptx_get_misc_intrs VG_(aix5_NR_ptx_get_misc_intrs)
-
-extern Int VG_(aix5_NR_ptx_get_domain_proto);
-#define __NR_AIX5_ptx_get_domain_proto VG_(aix5_NR_ptx_get_domain_proto)
-
-extern Int VG_(aix5_NR_ptx_get_flckinfo);
-#define __NR_AIX5_ptx_get_flckinfo VG_(aix5_NR_ptx_get_flckinfo)
-
-extern Int VG_(aix5_NR_ptx_get_shminfo);
-#define __NR_AIX5_ptx_get_shminfo VG_(aix5_NR_ptx_get_shminfo)
-
-extern Int VG_(aix5_NR_ptx_get_seminfo);
-#define __NR_AIX5_ptx_get_seminfo VG_(aix5_NR_ptx_get_seminfo)
-
-extern Int VG_(aix5_NR_ptx_get_msginfo);
-#define __NR_AIX5_ptx_get_msginfo VG_(aix5_NR_ptx_get_msginfo)
-
-extern Int VG_(aix5_NR_ptx_get_kmembuckets);
-#define __NR_AIX5_ptx_get_kmembuckets VG_(aix5_NR_ptx_get_kmembuckets)
-
-extern Int VG_(aix5_NR_ptx_get_numkmembuckets);
-#define __NR_AIX5_ptx_get_numkmembuckets VG_(aix5_NR_ptx_get_numkmembuck=
ets)
-
-extern Int VG_(aix5_NR_ptx_get_kmemstats);
-#define __NR_AIX5_ptx_get_kmemstats VG_(aix5_NR_ptx_get_kmemstats)
-
-extern Int VG_(aix5_NR_ptx_get_rtstat);
-#define __NR_AIX5_ptx_get_rtstat VG_(aix5_NR_ptx_get_rtstat)
-
-extern Int VG_(aix5_NR_ptx_get_udpstat);
-#define __NR_AIX5_ptx_get_udpstat VG_(aix5_NR_ptx_get_udpstat)
-
-extern Int VG_(aix5_NR_ptx_get_tcpstat);
-#define __NR_AIX5_ptx_get_tcpstat VG_(aix5_NR_ptx_get_tcpstat)
-
-extern Int VG_(aix5_NR_ptx_get_icmp6stat);
-#define __NR_AIX5_ptx_get_icmp6stat VG_(aix5_NR_ptx_get_icmp6stat)
-
-extern Int VG_(aix5_NR_ptx_get_icmpstat);
-#define __NR_AIX5_ptx_get_icmpstat VG_(aix5_NR_ptx_get_icmpstat)
-
-extern Int VG_(aix5_NR_ptx_get_ip6stat);
-#define __NR_AIX5_ptx_get_ip6stat VG_(aix5_NR_ptx_get_ip6stat)
-
-extern Int VG_(aix5_NR_ptx_get_ipstat);
-#define __NR_AIX5_ptx_get_ipstat VG_(aix5_NR_ptx_get_ipstat)
-
-extern Int VG_(aix5_NR_ptx_get_mbstat);
-#define __NR_AIX5_ptx_get_mbstat VG_(aix5_NR_ptx_get_mbstat)
-
-extern Int VG_(aix5_NR_ptx_get_pfhdata);
-#define __NR_AIX5_ptx_get_pfhdata VG_(aix5_NR_ptx_get_pfhdata)
-
-extern Int VG_(aix5_NR_ptx_get_vmker);
-#define __NR_AIX5_ptx_get_vmker VG_(aix5_NR_ptx_get_vmker)
-
-extern Int VG_(aix5_NR_ptx_get_vminfo);
-#define __NR_AIX5_ptx_get_vminfo VG_(aix5_NR_ptx_get_vminfo)
-
-extern Int VG_(aix5_NR_ptx_get_cpuinfo);
-#define __NR_AIX5_ptx_get_cpuinfo VG_(aix5_NR_ptx_get_cpuinfo)
-
-extern Int VG_(aix5_NR_ptx_get_ndd);
-#define __NR_AIX5_ptx_get_ndd VG_(aix5_NR_ptx_get_ndd)
-
-extern Int VG_(aix5_NR_ptx_get_ndds);
-#define __NR_AIX5_ptx_get_ndds VG_(aix5_NR_ptx_get_ndds)
-
-extern Int VG_(aix5_NR_ptx_get_numndds);
-#define __NR_AIX5_ptx_get_numndds VG_(aix5_NR_ptx_get_numndds)
-
-extern Int VG_(aix5_NR_ptx_get_ifnet);
-#define __NR_AIX5_ptx_get_ifnet VG_(aix5_NR_ptx_get_ifnet)
-
-extern Int VG_(aix5_NR_ptx_get_ifnets);
-#define __NR_AIX5_ptx_get_ifnets VG_(aix5_NR_ptx_get_ifnets)
-
-extern Int VG_(aix5_NR_ptx_get_numifnets);
-#define __NR_AIX5_ptx_get_numifnets VG_(aix5_NR_ptx_get_numifnets)
-
-extern Int VG_(aix5_NR_ptx_get_dkstat);
-#define __NR_AIX5_ptx_get_dkstat VG_(aix5_NR_ptx_get_dkstat)
-
-extern Int VG_(aix5_NR_ptx_get_dkstats_diskname);
-#define __NR_AIX5_ptx_get_dkstats_diskname VG_(aix5_NR_ptx_get_dkstats_d=
iskname)
-
-extern Int VG_(aix5_NR_ptx_get_dkstats);
-#define __NR_AIX5_ptx_get_dkstats VG_(aix5_NR_ptx_get_dkstats)
-
-extern Int VG_(aix5_NR_ptx_get_numdkstats);
-#define __NR_AIX5_ptx_get_numdkstats VG_(aix5_NR_ptx_get_numdkstats)
-
-extern Int VG_(aix5_NR_ptx_get_numintrs);
-#define __NR_AIX5_ptx_get_numintrs VG_(aix5_NR_ptx_get_numintrs)
-
-extern Int VG_(aix5_NR_ptx_get_emal_sample);
-#define __NR_AIX5_ptx_get_emal_sample VG_(aix5_NR_ptx_get_emal_sample)
-
-extern Int VG_(aix5_NR_oracle_kstat);
-#define __NR_AIX5_oracle_kstat VG_(aix5_NR_oracle_kstat)
-
extern Int VG_(aix5_NR__posix_iofsync);
#define __NR_AIX5__posix_iofsync VG_(aix5_NR__posix_iofsync)
=20
|
|
From: <sv...@va...> - 2006-10-05 12:43:36
|
Author: sewardj
Date: 2006-10-05 13:43:32 +0100 (Thu, 05 Oct 2006)
New Revision: 6194
Log:
Half-hearted attempt at ISO C90 compliance in the new AIX code.
Modified:
branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c
branches/AIX5/coregrind/m_debuginfo/readxcoff.c
branches/AIX5/coregrind/m_initimg/initimg-aix5.c
branches/AIX5/coregrind/m_main.c
branches/AIX5/coregrind/m_scheduler/scheduler.c
Modified: branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c 2006-10-05 12:42=
:34 UTC (rev 6193)
+++ branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c 2006-10-05 12:43=
:32 UTC (rev 6194)
@@ -1855,9 +1855,10 @@
SysRes VG_(am_mmap_file_fixed_client)
( Addr start, SizeT length, UInt prot, Int fd, Off64T offset )
{
+ SysRes r =3D {0,0};
ML_(am_barf)("unimplemented: VG_(am_mmap_file_fixed_client)");
/*NOTREACHED*/
- SysRes r =3D {0,0}; return r;
+ return r;
}
=20
=20
@@ -1866,9 +1867,10 @@
=20
SysRes VG_(am_mmap_anon_fixed_client) ( Addr start, SizeT length, UInt p=
rot )
{
+ SysRes r =3D {0,0};
ML_(am_barf)("unimplemented: VG_(am_mmap_anon_fixed_client)");
/*NOTREACHED*/
- SysRes r =3D {0,0}; return r;
+ return r;
}
=20
=20
@@ -2081,9 +2083,10 @@
SysRes VG_(am_munmap_client)( /*OUT*/Bool* need_discard,
Addr start, SizeT len )
{
+ SysRes r =3D {0,0};=20
ML_(am_barf)("unimplemented: VG_(am_munmap_client)");
/*NOTREACHED*/
- SysRes r =3D {0,0}; return r;
+ return r;
}
=20
=20
Modified: branches/AIX5/coregrind/m_debuginfo/readxcoff.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_debuginfo/readxcoff.c 2006-10-05 12:42:34 U=
TC (rev 6193)
+++ branches/AIX5/coregrind/m_debuginfo/readxcoff.c 2006-10-05 12:43:32 U=
TC (rev 6194)
@@ -877,9 +877,9 @@
but at least it is simple: the CSECT_LEN(aux) field
contains it's length, so we just heave that into the
pot for phase 2. */
+ XCoffSym cand;
if (0) VG_(printf)("SD: len is %d\n", (Int)CSECT_LEN(aux));
if (0) VG_(printf)("SD: proposed %p\n", sym->n_value);
- XCoffSym cand;
init_XCoffSym(&cand);
cand.first =3D sym->n_value;
cand.last =3D cand.first + (UWord)CSECT_LEN(aux) - 1;
Modified: branches/AIX5/coregrind/m_initimg/initimg-aix5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_initimg/initimg-aix5.c 2006-10-05 12:42:34 =
UTC (rev 6193)
+++ branches/AIX5/coregrind/m_initimg/initimg-aix5.c 2006-10-05 12:43:32 =
UTC (rev 6194)
@@ -268,6 +268,7 @@
void VG_(finalise_thread1state)( /*MOD*/ThreadArchState* arch,
ClientInitImgInfo ciii )
{
+ UInt adler32_act;
SysRes sres;
/* On AIX we get a block of 37 words telling us the initial state
for (GPR0 .. GPR31, PC, CR, LR, CTR, XER), and we start with all
@@ -427,7 +428,7 @@
=20
Huffman_Uncompress( (void*)ciii.compressed_page, unz_page,
VKI_PAGE_SIZE, VKI_PAGE_SIZE );
- UInt adler32_act =3D compute_adler32(unz_page, VKI_PAGE_SIZE);
+ adler32_act =3D compute_adler32(unz_page, VKI_PAGE_SIZE);
=20
VG_(debugLog)(1, "initimg",=20
"decompress done, adler32s: act 0x%x, exp 0x%x\n",
@@ -479,9 +480,10 @@
sys_kload() but didn't make usla do the relevant
relocations. */
} else {
+ UChar** p;
Int r =3D loadquery(L_GETMESSAGES, buf, NBUF);
VG_(debugLog)(0, "initimg", "loadquery returned %d (0 =3D success)=
\n", r);
- UChar** p =3D (UChar**)(&buf[0]);
+ p =3D (UChar**)(&buf[0]);
for (; *p; p++)
VG_(debugLog)(0, "initimg", "\"%s\"\n", *p);
VG_(debugLog)(0, "initimg", "Use /usr/sbin/execerror to make "
Modified: branches/AIX5/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_main.c 2006-10-05 12:42:34 UTC (rev 6193)
+++ branches/AIX5/coregrind/m_main.c 2006-10-05 12:43:32 UTC (rev 6194)
@@ -2284,22 +2284,24 @@
void _start_in_C_aix5 ( AIX5Bootblock* bootblock );
void _start_in_C_aix5 ( AIX5Bootblock* bootblock )
{
- Int r;
+ Int r;
+ ULong* intregs37;
+ UWord argc, argv, envp;
__NR_getpid =3D bootblock->__NR_getpid;
__NR_write =3D bootblock->__NR_write;
__NR_exit =3D bootblock->__NR_exit;
__NR_open =3D bootblock->__NR_open;
__NR_read =3D bootblock->__NR_read;
__NR_close =3D bootblock->__NR_close;
- ULong* intregs37 =3D &bootblock->iregs_pc_cr_lr_ctr_xer[0];
+ intregs37 =3D &bootblock->iregs_pc_cr_lr_ctr_xer[0];
# if defined(VGP_ppc32_aix5)
- UWord argc =3D (UWord)intregs37[3]; /* client's r3 =3D=3D argc */
- UWord argv =3D (UWord)intregs37[4];
- UWord envp =3D (UWord)intregs37[5];
+ argc =3D (UWord)intregs37[3]; /* client's r3 =3D=3D argc */
+ argv =3D (UWord)intregs37[4];
+ envp =3D (UWord)intregs37[5];
# else /* defined(VGP_ppc64_aix5) */
- UWord argc =3D (UWord)intregs37[14]; /* client's r14 =3D=3D argc */
- UWord argv =3D (UWord)intregs37[15];
- UWord envp =3D (UWord)intregs37[16];
+ argc =3D (UWord)intregs37[14]; /* client's r14 =3D=3D argc */
+ argv =3D (UWord)intregs37[15];
+ envp =3D (UWord)intregs37[16];
# endif
sp_at_startup =3D (Addr)0xDeadBeefDeadBeefULL; /* Not important on AI=
X. */
r =3D valgrind_main( (Int)argc, (HChar**)argv, (HChar**)envp,=20
Modified: branches/AIX5/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_scheduler/scheduler.c 2006-10-05 12:42:34 U=
TC (rev 6193)
+++ branches/AIX5/coregrind/m_scheduler/scheduler.c 2006-10-05 12:43:32 U=
TC (rev 6194)
@@ -861,15 +861,16 @@
/* ------------ now we don't have The Lock ------------ */
=20
# if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
- static Int ctr=3D0;
- vg_assert(__NR_AIX5__nsleep !=3D __NR_AIX5_UNKNOWN);
- vg_assert(__NR_AIX5_yield !=3D __NR_AIX5_UNKNOWN);
- if (1 && rt > 0 && ((++ctr % 3) =3D=3D 0)) {=20
- //struct vki_timespec ts;
- //ts.tv_sec =3D 0;
- //ts.tv_nsec =3D 0*1000*1000;
- //VG_(do_syscall2)(__NR_AIX5__nsleep, (UWord)&ts, (UWord)NUL=
L);
- VG_(do_syscall0)(__NR_AIX5_yield);
+ { static Int ctr=3D0;
+ vg_assert(__NR_AIX5__nsleep !=3D __NR_AIX5_UNKNOWN);
+ vg_assert(__NR_AIX5_yield !=3D __NR_AIX5_UNKNOWN);
+ if (1 && rt > 0 && ((++ctr % 3) =3D=3D 0)) {=20
+ //struct vki_timespec ts;
+ //ts.tv_sec =3D 0;
+ //ts.tv_nsec =3D 0*1000*1000;
+ //VG_(do_syscall2)(__NR_AIX5__nsleep, (UWord)&ts, (UWord)N=
ULL);
+ VG_(do_syscall0)(__NR_AIX5_yield);
+ }
}
# endif
=20
|
|
From: <sv...@va...> - 2006-10-05 12:42:37
|
Author: sewardj Date: 2006-10-05 13:42:34 +0100 (Thu, 05 Oct 2006) New Revision: 6193 Log: -gstabs doesn't work for gcc-3.4.3 on ppc32-aix5; forget about it entirel= y. Modified: branches/AIX5/helgrind/tests/Makefile.am Modified: branches/AIX5/helgrind/tests/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/AIX5/helgrind/tests/Makefile.am 2006-10-05 12:41:44 UTC (rev= 6192) +++ branches/AIX5/helgrind/tests/Makefile.am 2006-10-05 12:42:34 UTC (rev= 6193) @@ -22,7 +22,11 @@ if VGP_PPC64_LINUX AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_= PRI) else -AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -gstabs $(AM_FLAG_M3264_= PRI) + +# In fact -gstabs is broken on many systems now +#AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -gstabs $(AM_FLAG_M3264= _PRI) +AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_= PRI) + endif =20 LDADD =3D -lpthread |
|
From: <sv...@va...> - 2006-10-05 12:41:49
|
Author: sewardj
Date: 2006-10-05 13:41:44 +0100 (Thu, 05 Oct 2006)
New Revision: 6192
Log:
Tidy up fstatfs things.
Modified:
branches/AIX5/auxprogs/aix5_VKI_info.c
branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c
branches/AIX5/include/vki/vki-ppc32-aix5.h
branches/AIX5/include/vki/vki-ppc64-aix5.h
Modified: branches/AIX5/auxprogs/aix5_VKI_info.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/auxprogs/aix5_VKI_info.c 2006-10-05 12:38:52 UTC (rev 6=
191)
+++ branches/AIX5/auxprogs/aix5_VKI_info.c 2006-10-05 12:41:44 UTC (rev 6=
192)
@@ -127,14 +127,6 @@
printf("#define _VKI_IOC_READ %d\n", 3 & (IOC_OUT >> 30));
printf("#define _VKI_IOC_WRITE %d\n", 3 & (IOC_IN >> 30));
printf("\n");
- printf("/* -------------- Filesystems --------------- */\n");
- printf("\n");
-
- /* info about struct statfs */
- struct statfs stf;
- printf("sizeof(struct statfs) =3D %d\n", (int)sizeof(struct statfs));
-
- printf("\n");
printf("/* ---------------- MMappery ---------------- */\n");
printf("\n");
printf("#define VKI_PAGE_SIZE %d\n", (int)sysconf(_SC_PAGESIZE));
Modified: branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c 2006-10-05 12:38:52 =
UTC (rev 6191)
+++ branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c 2006-10-05 12:41:44 =
UTC (rev 6192)
@@ -257,6 +257,7 @@
#include <sys/times.h>
#include <sys/shm.h>
#include <semaphore.h>
+#include <sys/statfs.h>
/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
=20
HChar* ML_(aix5debugstuff_pc_to_fnname) ( Addr pc )
@@ -2154,11 +2155,11 @@
PRINT("sys_statfs ( %p(%s), %p )",ARG1,ARG1,ARG2);
PRE_REG_READ2(long, "statfs", const char *, path, struct statfs *, bu=
f);
PRE_MEM_RASCIIZ( "statfs(path)", ARG1 );
- PRE_MEM_WRITE( "statfs(buf)", ARG2, sizeof(struct vki_statfs) );
+ PRE_MEM_WRITE( "statfs(buf)", ARG2, sizeof(struct statfs) );
}
POST(sys_statfs)
{
- POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs) );
+ POST_MEM_WRITE( ARG2, sizeof(struct statfs) );
}
=20
PRE(sys_statx)
Modified: branches/AIX5/include/vki/vki-ppc32-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-ppc32-aix5.h 2006-10-05 12:38:52 UTC (r=
ev 6191)
+++ branches/AIX5/include/vki/vki-ppc32-aix5.h 2006-10-05 12:41:44 UTC (r=
ev 6192)
@@ -143,15 +143,6 @@
#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
=20
-/* -------------- Filesystems --------------- */
-
-/* Known:
- sizeof(struct statfs) =3D 132
-*/
-struct vki_statfs {
- UChar __off0[132];
-};
-
/* ---------------- MMappery ---------------- */
=20
#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
Modified: branches/AIX5/include/vki/vki-ppc64-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-ppc64-aix5.h 2006-10-05 12:38:52 UTC (r=
ev 6191)
+++ branches/AIX5/include/vki/vki-ppc64-aix5.h 2006-10-05 12:41:44 UTC (r=
ev 6192)
@@ -143,15 +143,6 @@
#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
=20
-/* -------------- Filesystems --------------- */
-
-/* Known:
- sizeof(struct statfs) =3D 176
-*/
-struct vki_statfs {
- UChar __off0[176];
-};
-
/* ---------------- MMappery ---------------- */
=20
#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
|
|
From: <sv...@va...> - 2006-10-05 12:38:58
|
Author: sewardj Date: 2006-10-05 13:38:52 +0100 (Thu, 05 Oct 2006) New Revision: 6191 Log: Stop mpxlc complaining so much about libmpiwrap.c. Modified: branches/AIX5/auxprogs/Makefile.am Modified: branches/AIX5/auxprogs/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/AIX5/auxprogs/Makefile.am 2006-10-05 10:32:48 UTC (rev 6190) +++ branches/AIX5/auxprogs/Makefile.am 2006-10-05 12:38:52 UTC (rev 6191) @@ -44,8 +44,10 @@ # if VGO_AIX5 HACKY_FLAGS_PRI =3D -g -O -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \ + -qflag=3Dw:w \ `echo $(AM_FLAG_M3264_PRI) | sed s/maix/q/g` HACKY_FLAGS_SEC =3D -g -O -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \ + -qflag=3Dw:w \ `echo $(AM_FLAG_M3264_SEC) | sed s/maix/q/g` else HACKY_FLAGS_PRI =3D -g -O -fno-omit-frame-pointer -Wall -fpic -shared \ |
|
From: <sv...@va...> - 2006-10-05 10:32:53
|
Author: sewardj
Date: 2006-10-05 11:32:48 +0100 (Thu, 05 Oct 2006)
New Revision: 6190
Log:
If the child exits with a signal, make the launcher exit with the same
signal, so that the appearance to the outside observer is the same as
if Valgrind had not been used to run the child. This also makes the
behaviour the same as on Linux.
Modified:
branches/AIX5/coregrind/launcher-aix5.c
Modified: branches/AIX5/coregrind/launcher-aix5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/launcher-aix5.c 2006-10-05 08:55:30 UTC (rev =
6189)
+++ branches/AIX5/coregrind/launcher-aix5.c 2006-10-05 10:32:48 UTC (rev =
6190)
@@ -1603,12 +1603,14 @@
return WEXITSTATUS(status);
}=20
else if (WIFSIGNALED(status)) {
- VG_(debugLog)(0, "launcher",
+ VG_(debugLog)(1, "launcher",
"parent: child exited on signal %d\n",
- WTERMSIG(status));
+ (int)WTERMSIG(status));
+ /* Since the child exited with a signal, we'd better
+ whack ourselves on the head with the same signal. */
+ kill( getpid(), (int)WTERMSIG(status) );
+ /* presumably NOTREACHED? */
return 0; /* This is completely bogus */
- /* Better: since the child exited with a signal, we'd better
- whack ourselves on the head with the same signal. Duh. */
}=20
else {
/* erm. Can we ever get here? */
|
|
From: Julian S. <js...@ac...> - 2006-10-05 10:17:10
|
Unlike libc, but like (I believe) {Open,Net,Free}BSD, I'm fairly
sure AIX passes the same structs across the libc-kernel boundary
as it does across the application-libc boundary. As a result
include/vki/vki-ppc{32,64}-aix5.h contain the bare minimum of stuff
needed for V get the services it needs from the kernel; they don't
hold enough info to write all the syscall wrappers (unlike on Linux).
To do the syscall wrappers I just #include the relevant libc headers
(see coregrind/m_syswrap/syswrap-aix5.c:254).
So I suspect .. this commit isn't really necessary.
J
On Thursday 05 October 2006 09:54, sv...@va... wrote:
> Author: tom
> Date: 2006-10-05 09:54:38 +0100 (Thu, 05 Oct 2006)
> New Revision: 6188
>
> Log:
> Gather information on struct statfs.
>
> Modified:
> branches/AIX5/auxprogs/aix5_VKI_info.c
>
>
> Modified: branches/AIX5/auxprogs/aix5_VKI_info.c
> ===================================================================
> --- branches/AIX5/auxprogs/aix5_VKI_info.c 2006-10-05 08:33:11 UTC (rev
> 6187) +++ branches/AIX5/auxprogs/aix5_VKI_info.c 2006-10-05 08:54:38 UTC
> (rev 6188) @@ -5,6 +5,7 @@
> #include <stdlib.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> +#include <sys/statfs.h>
> #include <fcntl.h>
> #include <unistd.h>
> #include <sys/mman.h>
> @@ -126,6 +127,14 @@
> printf("#define _VKI_IOC_READ %d\n", 3 & (IOC_OUT >> 30));
> printf("#define _VKI_IOC_WRITE %d\n", 3 & (IOC_IN >> 30));
> printf("\n");
> + printf("/* -------------- Filesystems --------------- */\n");
> + printf("\n");
> +
> + /* info about struct statfs */
> + struct statfs stf;
> + printf("sizeof(struct statfs) = %d\n", (int)sizeof(struct statfs));
> +
> + printf("\n");
> printf("/* ---------------- MMappery ---------------- */\n");
> printf("\n");
> printf("#define VKI_PAGE_SIZE %d\n", (int)sysconf(_SC_PAGESIZE));
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys -- and earn
> cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: Julian S. <js...@ac...> - 2006-10-05 10:07:33
|
> >> Log: > >> Mark the argument block as volatile to ensure the compiler actually > >> bothers to do the write to it (as it can't know that the inline > >> assembly is going to read from it). > > > > Can you add a comment to the code about this? And for your next commit? > > That's a bit of a quick hack really - I'm not sure why we're bothering > to create that block at all instead of just asking gcc to bind the > variables to the assembly directly. Perhaps Julian can comment? General lameness/conservatism on my part, mostly. Over the years I've sometimes found it difficult to write inline assembly which works reliably over different gcc versions, particularly for doing stuff like syscalls in which there are a lot of register constraints to get right. I don't think it helped that I never really felt confident I understood the finer details of the gcc inline-assembly constraint syntax. Nor did I entirely believe that all versions of gcc implement it properly :) So, more recently I've taken to parking all the relevant info in a block of words in C and passing a pointer to it into the code fragment, which is simple at least. It is maybe not the best solution,I agree. > On Thursday 05 October 2006 09:48, Dirk Mueller wrote: > > Hmm, this might work, but I'm not 100% sure it is correct. why are the > fields besides [0] not listed in the asm constraints? Then it would tell > the compiler what is going on. My understanding of 'volatile' is it tells the compiler not to change the number of memory references to the object. Harbison & Steele says: The 'volatile' type specifier informs the ISO C implementation that certain objects can have their values altered in ways not under control of the implementation. That is, any object (strictly speaking, any lvalue expression) of a 'volatile'-qualified type should not participate in optimizations that would increase, decrease, or delay any references to, or modifications of, the object. [ .. followed by a definition of sequence points in C .. ] Tom's fix seems like a fairly safe solution to me. Dirk, was there some other problem you thought could happen? J |
|
From: <sv...@va...> - 2006-10-05 08:55:33
|
Author: tom
Date: 2006-10-05 09:55:30 +0100 (Thu, 05 Oct 2006)
New Revision: 6189
Log:
Handle kpread and statfs system calls on ppc32-aix5 systems.
Modified:
branches/AIX5/coregrind/m_syswrap/priv_syswrap-aix5.h
branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c
branches/AIX5/coregrind/m_syswrap/syswrap-ppc32-aix5.c
branches/AIX5/include/vki/vki-ppc32-aix5.h
branches/AIX5/include/vki/vki-ppc64-aix5.h
Modified: branches/AIX5/coregrind/m_syswrap/priv_syswrap-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_syswrap/priv_syswrap-aix5.h 2006-10-05 08:5=
4:38 UTC (rev 6188)
+++ branches/AIX5/coregrind/m_syswrap/priv_syswrap-aix5.h 2006-10-05 08:5=
5:30 UTC (rev 6189)
@@ -122,6 +122,7 @@
DECL_TEMPLATE(aix5, sys_kioctl);
DECL_TEMPLATE(aix5, sys_klseek);
DECL_TEMPLATE(aix5, sys_knlist);
+DECL_TEMPLATE(aix5, sys_kpread);
DECL_TEMPLATE(aix5, sys_kread);
DECL_TEMPLATE(aix5, sys_kreadv);
DECL_TEMPLATE(aix5, sys_kthread_ctl);
@@ -165,6 +166,7 @@
DECL_TEMPLATE(aix5, sys_sigcleanup);
DECL_TEMPLATE(aix5, sys_sigprocmask);
DECL_TEMPLATE(aix5, sys_socket);
+DECL_TEMPLATE(aix5, sys_statfs);
DECL_TEMPLATE(aix5, sys_statx);
DECL_TEMPLATE(aix5, sys_symlink);
DECL_TEMPLATE(aix5, sys_sys_parm);
Modified: branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c 2006-10-05 08:54:38 =
UTC (rev 6188)
+++ branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c 2006-10-05 08:55:30 =
UTC (rev 6189)
@@ -1492,6 +1492,24 @@
PRINT("knlist (BOGUS HANDLER)");
}
=20
+PRE(sys_kpread)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_kpread ( %d, %p, %llu, %lld )",
+ ARG1, ARG2, (ULong)ARG3, ARG4);
+ PRE_REG_READ4(ssize_t, "kpread",
+ unsigned int, fd, char *, buf,
+ vki_size_t, count, long, offset);
+ PRE_MEM_WRITE( "kpread(buf)", ARG2, ARG3 );
+}
+POST(sys_kpread)
+{
+ vg_assert(SUCCESS);
+ if (RES > 0) {
+ POST_MEM_WRITE( ARG2, RES );
+ }
+}
+
PRE(sys_kread)
{
*flags |=3D SfMayBlock;
@@ -2131,6 +2149,18 @@
PRE_REG_READ3(int, "socket", int, domain, int, type, int, protocol);
}
=20
+PRE(sys_statfs)
+{
+ PRINT("sys_statfs ( %p(%s), %p )",ARG1,ARG1,ARG2);
+ PRE_REG_READ2(long, "statfs", const char *, path, struct statfs *, bu=
f);
+ PRE_MEM_RASCIIZ( "statfs(path)", ARG1 );
+ PRE_MEM_WRITE( "statfs(buf)", ARG2, sizeof(struct vki_statfs) );
+}
+POST(sys_statfs)
+{
+ POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs) );
+}
+
PRE(sys_statx)
{
PRINT("statx ( %p(%s), %p, %ld, %ld )", ARG1,ARG1,ARG2,ARG3,ARG4);
Modified: branches/AIX5/coregrind/m_syswrap/syswrap-ppc32-aix5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_syswrap/syswrap-ppc32-aix5.c 2006-10-05 08:=
54:38 UTC (rev 6188)
+++ branches/AIX5/coregrind/m_syswrap/syswrap-ppc32-aix5.c 2006-10-05 08:=
55:30 UTC (rev 6189)
@@ -782,6 +782,7 @@
AIXXY(__NR_AIX5_kioctl, sys_kioctl),
AIXX_(__NR_AIX5_klseek, sys_klseek),
AIXX_(__NR_AIX5_knlist, sys_knlist),
+ AIXXY(__NR_AIX5_kpread, sys_kpread),
AIXXY(__NR_AIX5_kread, sys_kread),
AIXXY(__NR_AIX5_kreadv, sys_kreadv),
AIXX_(__NR_AIX5_kthread_ctl, sys_kthread_ctl),
@@ -826,6 +827,7 @@
AIXXY(__NR_AIX5_sigprocmask, sys_sigprocmask),
AIXX_(__NR_AIX5_socket, sys_socket),
AIXXY(__NR_AIX5_statx, sys_statx),
+ AIXXY(__NR_AIX5_statfs, sys_statfs),
AIXX_(__NR_AIX5_symlink, sys_symlink),
AIXXY(__NR_AIX5_sys_parm, sys_sys_parm),
AIXXY(__NR_AIX5_sysconfig, sys_sysconfig),
Modified: branches/AIX5/include/vki/vki-ppc32-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-ppc32-aix5.h 2006-10-05 08:54:38 UTC (r=
ev 6188)
+++ branches/AIX5/include/vki/vki-ppc32-aix5.h 2006-10-05 08:55:30 UTC (r=
ev 6189)
@@ -143,6 +143,15 @@
#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
=20
+/* -------------- Filesystems --------------- */
+
+/* Known:
+ sizeof(struct statfs) =3D 132
+*/
+struct vki_statfs {
+ UChar __off0[132];
+};
+
/* ---------------- MMappery ---------------- */
=20
#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
Modified: branches/AIX5/include/vki/vki-ppc64-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-ppc64-aix5.h 2006-10-05 08:54:38 UTC (r=
ev 6188)
+++ branches/AIX5/include/vki/vki-ppc64-aix5.h 2006-10-05 08:55:30 UTC (r=
ev 6189)
@@ -143,6 +143,15 @@
#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
=20
+/* -------------- Filesystems --------------- */
+
+/* Known:
+ sizeof(struct statfs) =3D 176
+*/
+struct vki_statfs {
+ UChar __off0[176];
+};
+
/* ---------------- MMappery ---------------- */
=20
#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
|
|
From: <sv...@va...> - 2006-10-05 08:54:40
|
Author: tom
Date: 2006-10-05 09:54:38 +0100 (Thu, 05 Oct 2006)
New Revision: 6188
Log:
Gather information on struct statfs.
Modified:
branches/AIX5/auxprogs/aix5_VKI_info.c
Modified: branches/AIX5/auxprogs/aix5_VKI_info.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/auxprogs/aix5_VKI_info.c 2006-10-05 08:33:11 UTC (rev 6=
187)
+++ branches/AIX5/auxprogs/aix5_VKI_info.c 2006-10-05 08:54:38 UTC (rev 6=
188)
@@ -5,6 +5,7 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/statfs.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
@@ -126,6 +127,14 @@
printf("#define _VKI_IOC_READ %d\n", 3 & (IOC_OUT >> 30));
printf("#define _VKI_IOC_WRITE %d\n", 3 & (IOC_IN >> 30));
printf("\n");
+ printf("/* -------------- Filesystems --------------- */\n");
+ printf("\n");
+
+ /* info about struct statfs */
+ struct statfs stf;
+ printf("sizeof(struct statfs) =3D %d\n", (int)sizeof(struct statfs));
+
+ printf("\n");
printf("/* ---------------- MMappery ---------------- */\n");
printf("\n");
printf("#define VKI_PAGE_SIZE %d\n", (int)sysconf(_SC_PAGESIZE));
|
|
From: Dirk M. <dm...@gm...> - 2006-10-05 08:48:27
|
On Thursday, 5. October 2006 10:11, sv...@va... wrote: > Mark the argument block as volatile to ensure the compiler actually > bothers to do the write to it (as it can't know that the inline > assembly is going to read from it). Hmm, this might work, but I'm not 100% sure it is correct. why are the fields besides [0] not listed in the asm constraints? Then it would tell the compiler what is going on. Dirk |
|
From: Tom H. <to...@co...> - 2006-10-05 08:38:14
|
In message <Pin...@mu...>
Nicholas Nethercote <nj...@cs...> wrote:
> On Thu, 5 Oct 2006 sv...@va... wrote:
>
>> Author: tom
>> Date: 2006-10-05 09:11:06 +0100 (Thu, 05 Oct 2006)
>> New Revision: 6184
>>
>> Log:
>> Mark the argument block as volatile to ensure the compiler actually
>> bothers to do the write to it (as it can't know that the inline
>> assembly is going to read from it).
>
> Can you add a comment to the code about this? And for your next commit?
That's a bit of a quick hack really - I'm not sure why we're bothering
to create that block at all instead of just asking gcc to bind the
variables to the assembly directly. Perhaps Julian can comment?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Nicholas N. <nj...@cs...> - 2006-10-05 08:33:14
|
On Thu, 5 Oct 2006 sv...@va... wrote: > Author: tom > Date: 2006-10-05 09:11:06 +0100 (Thu, 05 Oct 2006) > New Revision: 6184 > > Log: > Mark the argument block as volatile to ensure the compiler actually > bothers to do the write to it (as it can't know that the inline > assembly is going to read from it). Can you add a comment to the code about this? And for your next commit? Thanks :) Nick |
|
From: <sv...@va...> - 2006-10-05 08:33:14
|
Author: tom Date: 2006-10-05 09:33:11 +0100 (Thu, 05 Oct 2006) New Revision: 6187 Log: Use -mcpu=3Dpowerpc rather than -mpowerpc. Modified: branches/AIX5/Makefile.flags.am Modified: branches/AIX5/Makefile.flags.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/AIX5/Makefile.flags.am 2006-10-05 08:32:47 UTC (rev 6186) +++ branches/AIX5/Makefile.flags.am 2006-10-05 08:33:11 UTC (rev 6187) @@ -30,15 +30,15 @@ =20 AM_FLAG_M3264_PPC32_AIX5 =3D @FLAG_MAIX32@ AM_CPPFLAGS_PPC32_AIX5 =3D $(add_includes_ppc32_aix5) -AM_CFLAGS_PPC32_AIX5 =3D $(WERROR) @FLAG_MAIX32@ -mpowerpc $(AM_CFL= AGS_BASE) +AM_CFLAGS_PPC32_AIX5 =3D $(WERROR) @FLAG_MAIX32@ -mcpu=3Dpowerpc $(= AM_CFLAGS_BASE) AM_CCASFLAGS_PPC32_AIX5 =3D $(add_includes_ppc32_aix5) \ - @FLAG_MAIX32@ -mpowerpc -g + @FLAG_MAIX32@ -mcpu=3Dpowerpc -g =20 AM_FLAG_M3264_PPC64_AIX5 =3D @FLAG_MAIX64@ AM_CPPFLAGS_PPC64_AIX5 =3D $(add_includes_ppc64_aix5) -AM_CFLAGS_PPC64_AIX5 =3D $(WERROR) @FLAG_MAIX64@ -mpowerpc64 $(AM_C= FLAGS_BASE) +AM_CFLAGS_PPC64_AIX5 =3D $(WERROR) @FLAG_MAIX64@ -mcpu=3Dpowerpc64 = $(AM_CFLAGS_BASE) AM_CCASFLAGS_PPC64_AIX5 =3D $(add_includes_ppc64_aix5) \ - @FLAG_MAIX64@ -mpowerpc64 -g + @FLAG_MAIX64@ -mcpu=3Dpowerpc64 -g =20 # Flags for the primary target. These must be used to build the # regtests and performance tests. In fact, these must be used to |
|
From: <sv...@va...> - 2006-10-05 08:32:52
|
Author: tom
Date: 2006-10-05 09:32:47 +0100 (Thu, 05 Oct 2006)
New Revision: 6186
Log:
Make debug code for dumping thread state compile on AIX 5.1 systems.
Modified:
branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c
Modified: branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c 2006-10-05 08:11:56 =
UTC (rev 6185)
+++ branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c 2006-10-05 08:32:47 =
UTC (rev 6186)
@@ -292,23 +292,43 @@
case TSTATE_CANCEL_CHKPT: return "CANCEL_CHKPT";
case TSTATE_INTR: return "INTR";
case TSTATE_EXEMPT: return "EXEMPT";
+#ifdef TSTATE_PROFILING_OFF
case TSTATE_PROFILING_OFF: return "PROFILING_OFF";
+#endif
case TSTATE_SUSPEND: return "SUSPEND";
case TSTATE_CONT: return "CONT";
+#ifdef TSTATE_CREDS
case TSTATE_CREDS: return "CREDS";
+#endif
+#ifdef TSTATE_PROCHANDLERS
case TSTATE_PROCHANDLERS: return "PROCHANDLERS";
+#endif
case TSTATE_ADVH: return "ADVH";
case TSTATE_SYNCH: return "SYNCH";
case TSTATE_USCHED: return "USCHED";
case TSTATE_DEFAULT_SCHED: return "DEFAULT_SCHED";
+#ifdef TSTATE_INHERIT_SCHED
case TSTATE_INHERIT_SCHED: return "INHERIT_SCHED";
+#endif
+#ifdef TSTATE_LOCAL_INIT
case TSTATE_LOCAL_INIT: return "LOCAL_INIT";
+#endif
+#ifdef TSTATE_LOCAL_TERM
case TSTATE_LOCAL_TERM: return "LOCAL_TERM";
+#endif
+#ifdef TSTATE_LOCAL_MCHANGE
case TSTATE_LOCAL_MCHANGE: return "LOCAL_MCHANGE";
+#endif
case TSTATE_CHANGE_ALL: return "CHANGE_ALL";
+#ifdef TSTATE_CHANGE_PTID
case TSTATE_CHANGE_PTID: return "CHANGE_PTID";
+#endif
+#ifdef TSTATE_CHANGE_PROFILE
case TSTATE_CHANGE_PROFILE: return "CHANGE_PROFILE";
+#endif
+#ifdef TSTATE_CHANGE_SSTACK
case TSTATE_CHANGE_SSTACK: return "CHANGE_SSTACK";
+#endif
case TSTATE_CHANGE_ERRNOP: return "CHANGE_ERRNOP";
case TSTATE_CHANGE_SIGMASK: return "CHANGE_SIGMASK";
case TSTATE_CHANGE_PSIG: return "CHANGE_PSIG";
@@ -379,10 +399,11 @@
VG_(printf)(" fpscrx %d\n", ts->fpscrx);
VG_(printf)(" sigaltstack ??\n");
VG_(printf)(" thread_control_p 0x%llx\n", (ULong)ts->thread_control_=
p);
- VG_(printf)(" prbase %p\n", (void*)ts->prbase);
- VG_(printf)(" credp %p\n", (void*)ts->credp);
- VG_(printf)(" ptid %d\n", (int)ts->ptid);
- VG_(printf)(" tct_clock %d\n", (int)ts->tct_clock);
+// AIX 5.1 does not seem to have these members
+// VG_(printf)(" prbase %p\n", (void*)ts->prbase);
+// VG_(printf)(" credp %p\n", (void*)ts->credp);
+// VG_(printf)(" ptid %d\n", (int)ts->ptid);
+// VG_(printf)(" tct_clock %d\n", (int)ts->tct_clock);
UInt* p =3D (UInt*)tsA;
for (i =3D 0; i < sizeof(struct tstate)/sizeof(UInt); i++) {
HChar* s =3D ML_(aix5debugstuff_pc_to_fnname)( (Addr)p[i] );
|