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
(5) |
2
(15) |
3
(20) |
|
4
(4) |
5
(11) |
6
(8) |
7
(36) |
8
(23) |
9
(6) |
10
(4) |
|
11
(4) |
12
(19) |
13
(17) |
14
(33) |
15
(16) |
16
(17) |
17
(4) |
|
18
(4) |
19
(30) |
20
(22) |
21
(23) |
22
(29) |
23
(20) |
24
(12) |
|
25
(7) |
26
(33) |
27
(10) |
28
(12) |
29
(19) |
30
(15) |
31
(8) |
|
From: <sv...@va...> - 2009-01-19 23:42:50
|
Author: njn
Date: 2009-01-19 23:42:45 +0000 (Mon, 19 Jan 2009)
New Revision: 8987
Log:
Make this file compile without warnings when the PERF_FAST_* macros are
disabled.
Modified:
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mc_main.c
===================================================================
--- trunk/memcheck/mc_main.c 2009-01-19 22:16:52 UTC (rev 8986)
+++ trunk/memcheck/mc_main.c 2009-01-19 23:42:45 UTC (rev 8987)
@@ -2356,23 +2356,25 @@
static INLINE void make_aligned_word32_undefined ( Addr a )
{
- UWord sm_off;
- SecMap* sm;
-
PROF_EVENT(300, "make_aligned_word32_undefined");
#ifndef PERF_FAST_STACK2
make_mem_undefined(a, 4);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(301, "make_aligned_word32_undefined-slow1");
- make_mem_undefined(a, 4);
- return;
+ {
+ UWord sm_off;
+ SecMap* sm;
+
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(301, "make_aligned_word32_undefined-slow1");
+ make_mem_undefined(a, 4);
+ return;
+ }
+
+ sm = get_secmap_for_writing_low(a);
+ sm_off = SM_OFF(a);
+ sm->vabits8[sm_off] = VA_BITS8_UNDEFINED;
}
-
- sm = get_secmap_for_writing_low(a);
- sm_off = SM_OFF(a);
- sm->vabits8[sm_off] = VA_BITS8_UNDEFINED;
#endif
}
@@ -2397,36 +2399,38 @@
static INLINE
void make_aligned_word32_noaccess ( Addr a )
{
- UWord sm_off;
- SecMap* sm;
-
PROF_EVENT(310, "make_aligned_word32_noaccess");
#ifndef PERF_FAST_STACK2
MC_(make_mem_noaccess)(a, 4);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(311, "make_aligned_word32_noaccess-slow1");
- MC_(make_mem_noaccess)(a, 4);
- return;
- }
+ {
+ UWord sm_off;
+ SecMap* sm;
- sm = get_secmap_for_writing_low(a);
- sm_off = SM_OFF(a);
- sm->vabits8[sm_off] = VA_BITS8_NOACCESS;
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(311, "make_aligned_word32_noaccess-slow1");
+ MC_(make_mem_noaccess)(a, 4);
+ return;
+ }
- //// BEGIN inlined, specialised version of MC_(helperc_b_store4)
- //// Set the origins for a+0 .. a+3.
- if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
- OCacheLine* line;
- UWord lineoff = oc_line_offset(a);
- if (OC_ENABLE_ASSERTIONS) {
- tl_assert(lineoff >= 0 && lineoff < OC_W32S_PER_LINE);
+ sm = get_secmap_for_writing_low(a);
+ sm_off = SM_OFF(a);
+ sm->vabits8[sm_off] = VA_BITS8_NOACCESS;
+
+ //// BEGIN inlined, specialised version of MC_(helperc_b_store4)
+ //// Set the origins for a+0 .. a+3.
+ if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
+ OCacheLine* line;
+ UWord lineoff = oc_line_offset(a);
+ if (OC_ENABLE_ASSERTIONS) {
+ tl_assert(lineoff >= 0 && lineoff < OC_W32S_PER_LINE);
+ }
+ line = find_OCacheLine( a );
+ line->descr[lineoff] = 0;
}
- line = find_OCacheLine( a );
- line->descr[lineoff] = 0;
+ //// END inlined, specialised version of MC_(helperc_b_store4)
}
- //// END inlined, specialised version of MC_(helperc_b_store4)
#endif
}
@@ -2436,23 +2440,25 @@
static INLINE void make_aligned_word64_undefined ( Addr a )
{
- UWord sm_off16;
- SecMap* sm;
-
PROF_EVENT(320, "make_aligned_word64_undefined");
#ifndef PERF_FAST_STACK2
make_mem_undefined(a, 8);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(321, "make_aligned_word64_undefined-slow1");
- make_mem_undefined(a, 8);
- return;
+ {
+ UWord sm_off16;
+ SecMap* sm;
+
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(321, "make_aligned_word64_undefined-slow1");
+ make_mem_undefined(a, 8);
+ return;
+ }
+
+ sm = get_secmap_for_writing_low(a);
+ sm_off16 = SM_OFF_16(a);
+ ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_UNDEFINED;
}
-
- sm = get_secmap_for_writing_low(a);
- sm_off16 = SM_OFF_16(a);
- ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_UNDEFINED;
#endif
}
@@ -2478,36 +2484,38 @@
static INLINE
void make_aligned_word64_noaccess ( Addr a )
{
- UWord sm_off16;
- SecMap* sm;
-
PROF_EVENT(330, "make_aligned_word64_noaccess");
#ifndef PERF_FAST_STACK2
MC_(make_mem_noaccess)(a, 8);
#else
- if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
- PROF_EVENT(331, "make_aligned_word64_noaccess-slow1");
- MC_(make_mem_noaccess)(a, 8);
- return;
- }
+ {
+ UWord sm_off16;
+ SecMap* sm;
- sm = get_secmap_for_writing_low(a);
- sm_off16 = SM_OFF_16(a);
- ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_NOACCESS;
+ if (UNLIKELY(a > MAX_PRIMARY_ADDRESS)) {
+ PROF_EVENT(331, "make_aligned_word64_noaccess-slow1");
+ MC_(make_mem_noaccess)(a, 8);
+ return;
+ }
- //// BEGIN inlined, specialised version of MC_(helperc_b_store8)
- //// Clear the origins for a+0 .. a+7.
- if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
- OCacheLine* line;
- UWord lineoff = oc_line_offset(a);
- tl_assert(lineoff >= 0
- && lineoff < OC_W32S_PER_LINE -1/*'cos 8-aligned*/);
- line = find_OCacheLine( a );
- line->descr[lineoff+0] = 0;
- line->descr[lineoff+1] = 0;
+ sm = get_secmap_for_writing_low(a);
+ sm_off16 = SM_OFF_16(a);
+ ((UShort*)(sm->vabits8))[sm_off16] = VA_BITS16_NOACCESS;
+
+ //// BEGIN inlined, specialised version of MC_(helperc_b_store8)
+ //// Clear the origins for a+0 .. a+7.
+ if (UNLIKELY( MC_(clo_mc_level) == 3 )) {
+ OCacheLine* line;
+ UWord lineoff = oc_line_offset(a);
+ tl_assert(lineoff >= 0
+ && lineoff < OC_W32S_PER_LINE -1/*'cos 8-aligned*/);
+ line = find_OCacheLine( a );
+ line->descr[lineoff+0] = 0;
+ line->descr[lineoff+1] = 0;
+ }
+ //// END inlined, specialised version of MC_(helperc_b_store8)
}
- //// END inlined, specialised version of MC_(helperc_b_store8)
#endif
}
@@ -2516,8 +2524,15 @@
/*--- Stack pointer adjustment ---*/
/*------------------------------------------------------------*/
+#ifdef PERF_FAST_STACK
+# define MAYBE_USED
+#else
+# define MAYBE_USED __attribute__((unused))
+#endif
+
/*--------------- adjustment by 4 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_4_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2529,6 +2544,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_4(Addr new_SP)
{
PROF_EVENT(110, "new_mem_stack_4");
@@ -2539,6 +2555,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_4(Addr new_SP)
{
PROF_EVENT(120, "die_mem_stack_4");
@@ -2551,6 +2568,7 @@
/*--------------- adjustment by 8 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_8_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2565,6 +2583,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_8(Addr new_SP)
{
PROF_EVENT(111, "new_mem_stack_8");
@@ -2578,6 +2597,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_8(Addr new_SP)
{
PROF_EVENT(121, "die_mem_stack_8");
@@ -2593,6 +2613,7 @@
/*--------------- adjustment by 12 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_12_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2611,6 +2632,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_12(Addr new_SP)
{
PROF_EVENT(112, "new_mem_stack_12");
@@ -2628,6 +2650,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_12(Addr new_SP)
{
PROF_EVENT(122, "die_mem_stack_12");
@@ -2650,6 +2673,7 @@
/*--------------- adjustment by 16 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_16_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2669,6 +2693,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_16(Addr new_SP)
{
PROF_EVENT(113, "new_mem_stack_16");
@@ -2687,6 +2712,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_16(Addr new_SP)
{
PROF_EVENT(123, "die_mem_stack_16");
@@ -2706,6 +2732,7 @@
/*--------------- adjustment by 32 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_32_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2729,6 +2756,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_32(Addr new_SP)
{
PROF_EVENT(114, "new_mem_stack_32");
@@ -2751,6 +2779,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_32(Addr new_SP)
{
PROF_EVENT(124, "die_mem_stack_32");
@@ -2775,6 +2804,7 @@
/*--------------- adjustment by 112 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_112_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2799,6 +2829,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_112(Addr new_SP)
{
PROF_EVENT(115, "new_mem_stack_112");
@@ -2822,6 +2853,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_112(Addr new_SP)
{
PROF_EVENT(125, "die_mem_stack_112");
@@ -2847,6 +2879,7 @@
/*--------------- adjustment by 128 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_128_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2873,6 +2906,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_128(Addr new_SP)
{
PROF_EVENT(116, "new_mem_stack_128");
@@ -2898,6 +2932,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_128(Addr new_SP)
{
PROF_EVENT(126, "die_mem_stack_128");
@@ -2925,6 +2960,7 @@
/*--------------- adjustment by 144 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_144_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -2953,6 +2989,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_144(Addr new_SP)
{
PROF_EVENT(117, "new_mem_stack_144");
@@ -2980,6 +3017,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_144(Addr new_SP)
{
PROF_EVENT(127, "die_mem_stack_144");
@@ -3009,6 +3047,7 @@
/*--------------- adjustment by 160 bytes ---------------*/
+MAYBE_USED
static void VG_REGPARM(2) mc_new_mem_stack_160_w_ECU(Addr new_SP, UInt ecu)
{
UInt otag = ecu | MC_OKIND_STACK;
@@ -3039,6 +3078,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_new_mem_stack_160(Addr new_SP)
{
PROF_EVENT(118, "new_mem_stack_160");
@@ -3068,6 +3108,7 @@
}
}
+MAYBE_USED
static void VG_REGPARM(1) mc_die_mem_stack_160(Addr new_SP)
{
PROF_EVENT(128, "die_mem_stack_160");
@@ -3869,34 +3910,36 @@
static INLINE
ULong mc_LOADV64 ( Addr a, Bool isBigEndian )
{
- UWord sm_off16, vabits16;
- SecMap* sm;
-
PROF_EVENT(200, "mc_LOADV64");
#ifndef PERF_FAST_LOADV
return mc_LOADVn_slow( a, 64, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
- PROF_EVENT(201, "mc_LOADV64-slow1");
- return (ULong)mc_LOADVn_slow( a, 64, isBigEndian );
- }
+ {
+ UWord sm_off16, vabits16;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off16 = SM_OFF_16(a);
- vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
+ PROF_EVENT(201, "mc_LOADV64-slow1");
+ return (ULong)mc_LOADVn_slow( a, 64, isBigEndian );
+ }
- // Handle common case quickly: a is suitably aligned, is mapped, and
- // addressible.
- // Convert V bits from compact memory form to expanded register form.
- if (LIKELY(vabits16 == VA_BITS16_DEFINED)) {
- return V_BITS64_DEFINED;
- } else if (LIKELY(vabits16 == VA_BITS16_UNDEFINED)) {
- return V_BITS64_UNDEFINED;
- } else {
- /* Slow case: the 8 bytes are not all-defined or all-undefined. */
- PROF_EVENT(202, "mc_LOADV64-slow2");
- return mc_LOADVn_slow( a, 64, isBigEndian );
+ sm = get_secmap_for_reading_low(a);
+ sm_off16 = SM_OFF_16(a);
+ vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+
+ // Handle common case quickly: a is suitably aligned, is mapped, and
+ // addressible.
+ // Convert V bits from compact memory form to expanded register form.
+ if (LIKELY(vabits16 == VA_BITS16_DEFINED)) {
+ return V_BITS64_DEFINED;
+ } else if (LIKELY(vabits16 == VA_BITS16_UNDEFINED)) {
+ return V_BITS64_UNDEFINED;
+ } else {
+ /* Slow case: the 8 bytes are not all-defined or all-undefined. */
+ PROF_EVENT(202, "mc_LOADV64-slow2");
+ return mc_LOADVn_slow( a, 64, isBigEndian );
+ }
}
#endif
}
@@ -3914,9 +3957,6 @@
static INLINE
void mc_STOREV64 ( Addr a, ULong vbits64, Bool isBigEndian )
{
- UWord sm_off16, vabits16;
- SecMap* sm;
-
PROF_EVENT(210, "mc_STOREV64");
#ifndef PERF_FAST_STOREV
@@ -3924,36 +3964,41 @@
// Investigate further.
mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
- PROF_EVENT(211, "mc_STOREV64-slow1");
- mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
- return;
- }
+ {
+ UWord sm_off16, vabits16;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off16 = SM_OFF_16(a);
- vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,64) )) {
+ PROF_EVENT(211, "mc_STOREV64-slow1");
+ mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
+ return;
+ }
- if (LIKELY( !is_distinguished_sm(sm) &&
- (VA_BITS16_DEFINED == vabits16 ||
- VA_BITS16_UNDEFINED == vabits16) ))
- {
- /* Handle common case quickly: a is suitably aligned, */
- /* is mapped, and is addressible. */
- // Convert full V-bits in register to compact 2-bit form.
- if (V_BITS64_DEFINED == vbits64) {
- ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_DEFINED;
- } else if (V_BITS64_UNDEFINED == vbits64) {
- ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_UNDEFINED;
+ sm = get_secmap_for_reading_low(a);
+ sm_off16 = SM_OFF_16(a);
+ vabits16 = ((UShort*)(sm->vabits8))[sm_off16];
+
+ if (LIKELY( !is_distinguished_sm(sm) &&
+ (VA_BITS16_DEFINED == vabits16 ||
+ VA_BITS16_UNDEFINED == vabits16) ))
+ {
+ /* Handle common case quickly: a is suitably aligned, */
+ /* is mapped, and is addressible. */
+ // Convert full V-bits in register to compact 2-bit form.
+ if (V_BITS64_DEFINED == vbits64) {
+ ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_DEFINED;
+ } else if (V_BITS64_UNDEFINED == vbits64) {
+ ((UShort*)(sm->vabits8))[sm_off16] = (UShort)VA_BITS16_UNDEFINED;
+ } else {
+ /* Slow but general case -- writing partially defined bytes. */
+ PROF_EVENT(212, "mc_STOREV64-slow2");
+ mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
+ }
} else {
- /* Slow but general case -- writing partially defined bytes. */
- PROF_EVENT(212, "mc_STOREV64-slow2");
+ /* Slow but general case. */
+ PROF_EVENT(213, "mc_STOREV64-slow3");
mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
}
- } else {
- /* Slow but general case. */
- PROF_EVENT(213, "mc_STOREV64-slow3");
- mc_STOREVn_slow( a, 64, vbits64, isBigEndian );
}
#endif
}
@@ -3973,36 +4018,38 @@
static INLINE
UWord mc_LOADV32 ( Addr a, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(220, "mc_LOADV32");
#ifndef PERF_FAST_LOADV
return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
- PROF_EVENT(221, "mc_LOADV32-slow1");
- return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
+ PROF_EVENT(221, "mc_LOADV32-slow1");
+ return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
+ }
- // Handle common case quickly: a is suitably aligned, is mapped, and the
- // entire word32 it lives in is addressible.
- // Convert V bits from compact memory form to expanded register form.
- // For 64-bit platforms, set the high 32 bits of retval to 1 (undefined).
- // Almost certainly not necessary, but be paranoid.
- if (LIKELY(vabits8 == VA_BITS8_DEFINED)) {
- return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_DEFINED);
- } else if (LIKELY(vabits8 == VA_BITS8_UNDEFINED)) {
- return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_UNDEFINED);
- } else {
- /* Slow case: the 4 bytes are not all-defined or all-undefined. */
- PROF_EVENT(222, "mc_LOADV32-slow2");
- return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+
+ // Handle common case quickly: a is suitably aligned, is mapped, and the
+ // entire word32 it lives in is addressible.
+ // Convert V bits from compact memory form to expanded register form.
+ // For 64-bit platforms, set the high 32 bits of retval to 1 (undefined).
+ // Almost certainly not necessary, but be paranoid.
+ if (LIKELY(vabits8 == VA_BITS8_DEFINED)) {
+ return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_DEFINED);
+ } else if (LIKELY(vabits8 == VA_BITS8_UNDEFINED)) {
+ return ((UWord)0xFFFFFFFF00000000ULL | (UWord)V_BITS32_UNDEFINED);
+ } else {
+ /* Slow case: the 4 bytes are not all-defined or all-undefined. */
+ PROF_EVENT(222, "mc_LOADV32-slow2");
+ return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
+ }
}
#endif
}
@@ -4020,52 +4067,54 @@
static INLINE
void mc_STOREV32 ( Addr a, UWord vbits32, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(230, "mc_STOREV32");
#ifndef PERF_FAST_STOREV
mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
- PROF_EVENT(231, "mc_STOREV32-slow1");
- mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
- return;
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
-
- // Cleverness: sometimes we don't have to write the shadow memory at
- // all, if we can tell that what we want to write is the same as what is
- // already there. The 64/16/8 bit cases also have cleverness at this
- // point, but it works a little differently to the code below.
- if (V_BITS32_DEFINED == vbits32) {
- if (vabits8 == (UInt)VA_BITS8_DEFINED) {
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,32) )) {
+ PROF_EVENT(231, "mc_STOREV32-slow1");
+ mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
return;
- } else if (!is_distinguished_sm(sm) && VA_BITS8_UNDEFINED == vabits8) {
- sm->vabits8[sm_off] = (UInt)VA_BITS8_DEFINED;
- } else {
- // not defined/undefined, or distinguished and changing state
- PROF_EVENT(232, "mc_STOREV32-slow2");
- mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
}
- } else if (V_BITS32_UNDEFINED == vbits32) {
- if (vabits8 == (UInt)VA_BITS8_UNDEFINED) {
- return;
- } else if (!is_distinguished_sm(sm) && VA_BITS8_DEFINED == vabits8) {
- sm->vabits8[sm_off] = (UInt)VA_BITS8_UNDEFINED;
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+
+ // Cleverness: sometimes we don't have to write the shadow memory at
+ // all, if we can tell that what we want to write is the same as what is
+ // already there. The 64/16/8 bit cases also have cleverness at this
+ // point, but it works a little differently to the code below.
+ if (V_BITS32_DEFINED == vbits32) {
+ if (vabits8 == (UInt)VA_BITS8_DEFINED) {
+ return;
+ } else if (!is_distinguished_sm(sm) && VA_BITS8_UNDEFINED == vabits8) {
+ sm->vabits8[sm_off] = (UInt)VA_BITS8_DEFINED;
+ } else {
+ // not defined/undefined, or distinguished and changing state
+ PROF_EVENT(232, "mc_STOREV32-slow2");
+ mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
+ }
+ } else if (V_BITS32_UNDEFINED == vbits32) {
+ if (vabits8 == (UInt)VA_BITS8_UNDEFINED) {
+ return;
+ } else if (!is_distinguished_sm(sm) && VA_BITS8_DEFINED == vabits8) {
+ sm->vabits8[sm_off] = (UInt)VA_BITS8_UNDEFINED;
+ } else {
+ // not defined/undefined, or distinguished and changing state
+ PROF_EVENT(233, "mc_STOREV32-slow3");
+ mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
+ }
} else {
- // not defined/undefined, or distinguished and changing state
- PROF_EVENT(233, "mc_STOREV32-slow3");
+ // Partially defined word
+ PROF_EVENT(234, "mc_STOREV32-slow4");
mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
}
- } else {
- // Partially defined word
- PROF_EVENT(234, "mc_STOREV32-slow4");
- mc_STOREVn_slow( a, 32, (ULong)vbits32, isBigEndian );
}
#endif
}
@@ -4085,38 +4134,40 @@
static INLINE
UWord mc_LOADV16 ( Addr a, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(240, "mc_LOADV16");
#ifndef PERF_FAST_LOADV
return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
- PROF_EVENT(241, "mc_LOADV16-slow1");
- return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- // Handle common case quickly: a is suitably aligned, is mapped, and is
- // addressible.
- // Convert V bits from compact memory form to expanded register form
- if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS16_DEFINED; }
- else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS16_UNDEFINED; }
- else {
- // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
- // the two sub-bytes.
- UChar vabits4 = extract_vabits4_from_vabits8(a, vabits8);
- if (vabits4 == VA_BITS4_DEFINED ) { return V_BITS16_DEFINED; }
- else if (vabits4 == VA_BITS4_UNDEFINED) { return V_BITS16_UNDEFINED; }
- else {
- /* Slow case: the two bytes are not all-defined or all-undefined. */
- PROF_EVENT(242, "mc_LOADV16-slow2");
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
+ PROF_EVENT(241, "mc_LOADV16-slow1");
return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
}
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ // Handle common case quickly: a is suitably aligned, is mapped, and is
+ // addressible.
+ // Convert V bits from compact memory form to expanded register form
+ if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS16_DEFINED; }
+ else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS16_UNDEFINED; }
+ else {
+ // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
+ // the two sub-bytes.
+ UChar vabits4 = extract_vabits4_from_vabits8(a, vabits8);
+ if (vabits4 == VA_BITS4_DEFINED ) { return V_BITS16_DEFINED; }
+ else if (vabits4 == VA_BITS4_UNDEFINED) { return V_BITS16_UNDEFINED; }
+ else {
+ /* Slow case: the two bytes are not all-defined or all-undefined. */
+ PROF_EVENT(242, "mc_LOADV16-slow2");
+ return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
+ }
+ }
}
#endif
}
@@ -4134,45 +4185,47 @@
static INLINE
void mc_STOREV16 ( Addr a, UWord vbits16, Bool isBigEndian )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(250, "mc_STOREV16");
#ifndef PERF_FAST_STOREV
mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
- PROF_EVENT(251, "mc_STOREV16-slow1");
- mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
- return;
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- if (LIKELY( !is_distinguished_sm(sm) &&
- (VA_BITS8_DEFINED == vabits8 ||
- VA_BITS8_UNDEFINED == vabits8) ))
- {
- /* Handle common case quickly: a is suitably aligned, */
- /* is mapped, and is addressible. */
- // Convert full V-bits in register to compact 2-bit form.
- if (V_BITS16_DEFINED == vbits16) {
- insert_vabits4_into_vabits8( a, VA_BITS4_DEFINED ,
- &(sm->vabits8[sm_off]) );
- } else if (V_BITS16_UNDEFINED == vbits16) {
- insert_vabits4_into_vabits8( a, VA_BITS4_UNDEFINED,
- &(sm->vabits8[sm_off]) );
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,16) )) {
+ PROF_EVENT(251, "mc_STOREV16-slow1");
+ mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
+ return;
+ }
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ if (LIKELY( !is_distinguished_sm(sm) &&
+ (VA_BITS8_DEFINED == vabits8 ||
+ VA_BITS8_UNDEFINED == vabits8) ))
+ {
+ /* Handle common case quickly: a is suitably aligned, */
+ /* is mapped, and is addressible. */
+ // Convert full V-bits in register to compact 2-bit form.
+ if (V_BITS16_DEFINED == vbits16) {
+ insert_vabits4_into_vabits8( a, VA_BITS4_DEFINED ,
+ &(sm->vabits8[sm_off]) );
+ } else if (V_BITS16_UNDEFINED == vbits16) {
+ insert_vabits4_into_vabits8( a, VA_BITS4_UNDEFINED,
+ &(sm->vabits8[sm_off]) );
+ } else {
+ /* Slow but general case -- writing partially defined bytes. */
+ PROF_EVENT(252, "mc_STOREV16-slow2");
+ mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
+ }
} else {
- /* Slow but general case -- writing partially defined bytes. */
- PROF_EVENT(252, "mc_STOREV16-slow2");
+ /* Slow but general case. */
+ PROF_EVENT(253, "mc_STOREV16-slow3");
mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
}
- } else {
- /* Slow but general case. */
- PROF_EVENT(253, "mc_STOREV16-slow3");
- mc_STOREVn_slow( a, 16, (ULong)vbits16, isBigEndian );
}
#endif
}
@@ -4193,38 +4246,40 @@
VG_REGPARM(1)
UWord MC_(helperc_LOADV8) ( Addr a )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(260, "mc_LOADV8");
#ifndef PERF_FAST_LOADV
return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
- PROF_EVENT(261, "mc_LOADV8-slow1");
- return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- // Convert V bits from compact memory form to expanded register form
- // Handle common case quickly: a is mapped, and the entire
- // word32 it lives in is addressible.
- if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS8_DEFINED; }
- else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS8_UNDEFINED; }
- else {
- // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
- // the single byte.
- UChar vabits2 = extract_vabits2_from_vabits8(a, vabits8);
- if (vabits2 == VA_BITS2_DEFINED ) { return V_BITS8_DEFINED; }
- else if (vabits2 == VA_BITS2_UNDEFINED) { return V_BITS8_UNDEFINED; }
- else {
- /* Slow case: the byte is not all-defined or all-undefined. */
- PROF_EVENT(262, "mc_LOADV8-slow2");
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
+ PROF_EVENT(261, "mc_LOADV8-slow1");
return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
}
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ // Convert V bits from compact memory form to expanded register form
+ // Handle common case quickly: a is mapped, and the entire
+ // word32 it lives in is addressible.
+ if (vabits8 == VA_BITS8_DEFINED ) { return V_BITS8_DEFINED; }
+ else if (vabits8 == VA_BITS8_UNDEFINED) { return V_BITS8_UNDEFINED; }
+ else {
+ // The 4 (yes, 4) bytes are not all-defined or all-undefined, check
+ // the single byte.
+ UChar vabits2 = extract_vabits2_from_vabits8(a, vabits8);
+ if (vabits2 == VA_BITS2_DEFINED ) { return V_BITS8_DEFINED; }
+ else if (vabits2 == VA_BITS2_UNDEFINED) { return V_BITS8_UNDEFINED; }
+ else {
+ /* Slow case: the byte is not all-defined or all-undefined. */
+ PROF_EVENT(262, "mc_LOADV8-slow2");
+ return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
+ }
+ }
}
#endif
}
@@ -4233,49 +4288,51 @@
VG_REGPARM(2)
void MC_(helperc_STOREV8) ( Addr a, UWord vbits8 )
{
- UWord sm_off, vabits8;
- SecMap* sm;
-
PROF_EVENT(270, "mc_STOREV8");
#ifndef PERF_FAST_STOREV
mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
#else
- if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
- PROF_EVENT(271, "mc_STOREV8-slow1");
- mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
- return;
- }
+ {
+ UWord sm_off, vabits8;
+ SecMap* sm;
- sm = get_secmap_for_reading_low(a);
- sm_off = SM_OFF(a);
- vabits8 = sm->vabits8[sm_off];
- if (LIKELY
- ( !is_distinguished_sm(sm) &&
- ( (VA_BITS8_DEFINED == vabits8 || VA_BITS8_UNDEFINED == vabits8)
- || (VA_BITS2_NOACCESS != extract_vabits2_from_vabits8(a, vabits8))
- )
+ if (UNLIKELY( UNALIGNED_OR_HIGH(a,8) )) {
+ PROF_EVENT(271, "mc_STOREV8-slow1");
+ mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
+ return;
+ }
+
+ sm = get_secmap_for_reading_low(a);
+ sm_off = SM_OFF(a);
+ vabits8 = sm->vabits8[sm_off];
+ if (LIKELY
+ ( !is_distinguished_sm(sm) &&
+ ( (VA_BITS8_DEFINED == vabits8 || VA_BITS8_UNDEFINED == vabits8)
+ || (VA_BITS2_NOACCESS != extract_vabits2_from_vabits8(a, vabits8))
+ )
+ )
)
- )
- {
- /* Handle common case quickly: a is mapped, the entire word32 it
- lives in is addressible. */
- // Convert full V-bits in register to compact 2-bit form.
- if (V_BITS8_DEFINED == vbits8) {
- insert_vabits2_into_vabits8( a, VA_BITS2_DEFINED,
- &(sm->vabits8[sm_off]) );
- } else if (V_BITS8_UNDEFINED == vbits8) {
- insert_vabits2_into_vabits8( a, VA_BITS2_UNDEFINED,
- &(sm->vabits8[sm_off]) );
+ {
+ /* Handle common case quickly: a is mapped, the entire word32 it
+ lives in is addressible. */
+ // Convert full V-bits in register to compact 2-bit form.
+ if (V_BITS8_DEFINED == vbits8) {
+ insert_vabits2_into_vabits8( a, VA_BITS2_DEFINED,
+ &(sm->vabits8[sm_off]) );
+ } else if (V_BITS8_UNDEFINED == vbits8) {
+ insert_vabits2_into_vabits8( a, VA_BITS2_UNDEFINED,
+ &(sm->vabits8[sm_off]) );
+ } else {
+ /* Slow but general case -- writing partially defined bytes. */
+ PROF_EVENT(272, "mc_STOREV8-slow2");
+ mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
+ }
} else {
- /* Slow but general case -- writing partially defined bytes. */
- PROF_EVENT(272, "mc_STOREV8-slow2");
+ /* Slow but general case. */
+ PROF_EVENT(273, "mc_STOREV8-slow3");
mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
}
- } else {
- /* Slow but general case. */
- PROF_EVENT(273, "mc_STOREV8-slow3");
- mc_STOREVn_slow( a, 8, (ULong)vbits8, False/*irrelevant*/ );
}
#endif
}
|
|
From: <sv...@va...> - 2009-01-19 22:52:53
|
Author: njn
Date: 2009-01-19 21:33:25 +0000 (Mon, 19 Jan 2009)
New Revision: 8984
Log:
Add a comment explaining this test.
Modified:
trunk/none/tests/execve.c
Modified: trunk/none/tests/execve.c
===================================================================
--- trunk/none/tests/execve.c 2009-01-19 19:58:32 UTC (rev 8983)
+++ trunk/none/tests/execve.c 2009-01-19 21:33:25 UTC (rev 8984)
@@ -6,6 +6,8 @@
{
if (argc == 1)
{
+ // This tests the case where argv and envp are NULL, which is easy to
+ // get wrong because it's an unusual case.
if (execve(argv[0], NULL, NULL) < 0)
{
perror("execve");
|
|
From: <sv...@va...> - 2009-01-19 22:37:50
|
Author: njn Date: 2009-01-19 22:02:26 +0000 (Mon, 19 Jan 2009) New Revision: 8985 Log: Make this compile again. Modified: branches/DARWIN/memcheck/tests/linux/brk.c Modified: branches/DARWIN/memcheck/tests/linux/brk.c =================================================================== --- branches/DARWIN/memcheck/tests/linux/brk.c 2009-01-19 21:33:25 UTC (rev 8984) +++ branches/DARWIN/memcheck/tests/linux/brk.c 2009-01-19 22:02:26 UTC (rev 8985) @@ -1,5 +1,6 @@ #include <assert.h> #include <stdio.h> +#include <sys/syscall.h> #include <sys/types.h> #include <unistd.h> |
Author: njn Date: 2009-01-19 22:16:52 +0000 (Mon, 19 Jan 2009) New Revision: 8986 Log: The Darwin patch had a mix of 3-space and 4-space indenting, in some places within a single file or even a single function. This commit changes it all (or as much as I could find) to 3-space indenting. Modified: branches/DARWIN/cachegrind/cg-x86.c branches/DARWIN/cachegrind/cg_arch.h branches/DARWIN/coregrind/launcher-darwin.c branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c branches/DARWIN/coregrind/m_debuginfo/readmacho.c branches/DARWIN/coregrind/m_debuginfo/storage.c branches/DARWIN/coregrind/m_debugstub/debugstub-darwin.c branches/DARWIN/coregrind/m_libcfile.c branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c branches/DARWIN/coregrind/m_scheduler/scheduler.c branches/DARWIN/coregrind/m_scheduler/sema.c branches/DARWIN/coregrind/m_stacktrace.c branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c branches/DARWIN/coregrind/m_syswrap/syswrap-main.c branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c branches/DARWIN/coregrind/m_transtab.c branches/DARWIN/coregrind/m_ume_macho.c branches/DARWIN/memcheck/mc_main.c branches/DARWIN/memcheck/mc_replace_strmem.c [... diff too large to include ...] |
|
From: <sv...@va...> - 2009-01-19 19:58:37
|
Author: bart Date: 2009-01-19 19:58:32 +0000 (Mon, 19 Jan 2009) New Revision: 8983 Log: Removed superfluous dependency. Modified: trunk/drd/tests/Makefile.am Modified: trunk/drd/tests/Makefile.am =================================================================== --- trunk/drd/tests/Makefile.am 2009-01-19 06:38:44 UTC (rev 8982) +++ trunk/drd/tests/Makefile.am 2009-01-19 19:58:32 UTC (rev 8983) @@ -443,7 +443,7 @@ tc24_nonzero_sem_LDADD = -lpthread trylock_SOURCES = trylock.c -trylock_LDADD = -lpthread -lrt +trylock_LDADD = -lpthread if HAVE_BOOST_1_35 boost_thread_SOURCES = boost_thread.cpp |
|
From: Greg P. <gp...@ap...> - 2009-01-19 19:43:05
|
On Jan 18, 2009, at 5:45 PM, Nicholas Nethercote wrote: > Greg, you originally had '-gstabs' in AM_CFLAGS_BASE and AM_CFLAGS_PIC > in Makefile.flags.am. I changed this back to -g because it broke > things on Linux and didn't seem to make any difference on Darwin > anyway. Perhaps this was an attempt to avoid this .dSYM problem? That was intended to get useful debug info for valgrind itself, when debugging valgrind. -gstabs might work for the regtests too, though. I think Xcode is able to build dwarf-in-executable, but I don't know what options or programs it uses to do that. -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: John R.
|
>> if (argc == 1)
>> {
>> if (execve(argv[0], NULL, NULL) < 0)
> I suspect it is checking that we handle a NULL argv pointer to execve
> correctly - presumably at some point we complained about it.
The possibility that 0==argc is forgotten often, both by application
writers and tool writers. One typical bug is an unguarded reference
to argv[0].
--
|
|
From: Nicholas N. <n.n...@gm...> - 2009-01-19 08:57:11
|
On Mon, Jan 19, 2009 at 7:49 PM, Tom Hughes <to...@co...> wrote: > Nicholas Nethercote wrote: > >> I discovered that on Darwin, DWARF debug info doesn't get put into >> executables. Rather, if you do something like this: >> >> gcc -g a.c >> >> Then alongside the created executable 'a.out', a directory called >> 'a.out.dSYM' is made, and it holds the debug info. Greg's patch looks >> for such directories when loading debuginfo. >> >> However, if you do the compilation in two steps: >> >> gcc -g -c a.c >> gcc -g a.o >> >> then the .dSYM directory is not created. Rather, you have to do an >> additional step to create it: >> >> dsymutil a.out > > That's quite bizarre though, as it means the data must be present in the > executable if dsymutil can extract it to the separate directory? AIUI the debug info is in the .o files, and the .o files can be found from the executable. See http://wiki.dwarfstd.org/index.php?title=Apple's_"Lazy"_DWARF_Scheme N |
|
From: Tom H. <to...@co...> - 2009-01-19 08:52:51
|
Nicholas Nethercote wrote:
> int main(int argc, char **argv)
> {
> if (argc == 1)
> {
> if (execve(argv[0], NULL, NULL) < 0)
> {
> perror("execve");
> exit(1);
> }
> }
>
> exit(0);
> }
> --------------------------------
>
> Any ideas what this is meant to demonstrate? I don't even understand
> it, it looks to me like it should go into an infinite loop, just
> repeatedly execve'ing itself. Any explanations are welcome...
It only exec's itself once, as that exec doesn't pass any arguments so
the second time round argc will be zero and it won't do the exec.
I suspect it is checking that we handle a NULL argv pointer to execve
correctly - presumably at some point we complained about it.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Tom H. <to...@co...> - 2009-01-19 08:49:41
|
Nicholas Nethercote wrote: > I discovered that on Darwin, DWARF debug info doesn't get put into > executables. Rather, if you do something like this: > > gcc -g a.c > > Then alongside the created executable 'a.out', a directory called > 'a.out.dSYM' is made, and it holds the debug info. Greg's patch looks > for such directories when loading debuginfo. > > However, if you do the compilation in two steps: > > gcc -g -c a.c > gcc -g a.o > > then the .dSYM directory is not created. Rather, you have to do an > additional step to create it: > > dsymutil a.out That's quite bizarre though, as it means the data must be present in the executable if dsymutil can extract it to the separate directory? Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Bart V. A. <bar...@gm...> - 2009-01-19 08:36:16
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) started at 2009-01-19 02:00:01 EST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 406 tests, 44 stderr failures, 12 stdout failures, 2 post failures == exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) massif/tests/long-names (post) massif/tests/overloaded-new (post) memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/x86-linux/scalar (stderr) memcheck/tests/x86-linux/scalar_exit_group (stderr) memcheck/tests/x86-linux/scalar_fork (stderr) memcheck/tests/x86-linux/scalar_supp (stderr) memcheck/tests/x86-linux/scalar_vfork (stderr) memcheck/tests/zeropage (stdout) none/tests/async-sigs (stdout) 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-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 401 tests, 40 stderr failures, 12 stdout failures, 2 post failures == drd/tests/pth_create_chain (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) massif/tests/long-names (post) massif/tests/overloaded-new (post) memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/zeropage (stdout) none/tests/async-sigs (stdout) 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-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Mon Jan 19 02:48:11 2009 --- new.short Mon Jan 19 03:36:10 2009 *************** *** 8,11 **** ! == 401 tests, 40 stderr failures, 12 stdout failures, 2 post failures == ! drd/tests/pth_create_chain (stderr) exp-ptrcheck/tests/bad_percentify (stderr) --- 8,10 ---- ! == 406 tests, 44 stderr failures, 12 stdout failures, 2 post failures == exp-ptrcheck/tests/bad_percentify (stderr) *************** *** 50,51 **** --- 49,55 ---- memcheck/tests/varinfo6 (stderr) + memcheck/tests/x86-linux/scalar (stderr) + memcheck/tests/x86-linux/scalar_exit_group (stderr) + memcheck/tests/x86-linux/scalar_fork (stderr) + memcheck/tests/x86-linux/scalar_supp (stderr) + memcheck/tests/x86-linux/scalar_vfork (stderr) memcheck/tests/zeropage (stdout) |
|
From: <sv...@va...> - 2009-01-19 06:38:56
|
Author: njn Date: 2009-01-19 06:38:44 +0000 (Mon, 19 Jan 2009) New Revision: 8982 Log: Remove a no-longer-needed comment. Modified: branches/DARWIN/memcheck/tests/Makefile.am Modified: branches/DARWIN/memcheck/tests/Makefile.am =================================================================== --- branches/DARWIN/memcheck/tests/Makefile.am 2009-01-19 06:07:23 UTC (rev 8981) +++ branches/DARWIN/memcheck/tests/Makefile.am 2009-01-19 06:38:44 UTC (rev 8982) @@ -5,9 +5,6 @@ SUBDIRS = . # Arch-specific tests. -# DDD: at least some of the supposedly arch-specific tests are really -# platform-specific, eg. x86/scalar*.c. Need to create platform-specific -# dirs. if VGA_X86 SUBDIRS += x86 endif |
|
From: <sv...@va...> - 2009-01-19 06:07:30
|
Author: njn
Date: 2009-01-19 06:07:23 +0000 (Mon, 19 Jan 2009)
New Revision: 8981
Log:
Disable pending on Darwin via the Makefile.am, rather than conditional
compilation.
Filter "libSystem" on Darwin, which appears to be equivalent to "libc".
Modified:
branches/DARWIN/none/tests/Makefile.am
branches/DARWIN/none/tests/pending.c
branches/DARWIN/tests/filter_libc
Modified: branches/DARWIN/none/tests/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/Makefile.am 2009-01-19 05:43:38 UTC (rev 8980)
+++ branches/DARWIN/none/tests/Makefile.am 2009-01-19 06:07:23 UTC (rev 8981)
@@ -146,7 +146,6 @@
floored fork fucomip manythreads \
munmap_exe map_unaligned map_unmap mq mremap mremap2 \
nestedfns \
- pending \
pth_atfork1 pth_blockedsig pth_cancel1 pth_cancel2 pth_cvsimple \
pth_empty pth_exit pth_exit2 pth_mutexspeed pth_once pth_rwlock \
pth_stackalign \
@@ -159,11 +158,12 @@
coolo_sigaction gxx304
# DDD: not sure if these ones should work on Darwin or not... if not, should
-# be moved into linux/.
+# be moved into linux/. ('pending' probably should, it uses signals.)
if ! VGO_DARWIN
check_PROGRAMS += \
async-sigs \
- fdleak_ipv4
+ fdleak_ipv4 \
+ pending
endif
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
Modified: branches/DARWIN/none/tests/pending.c
===================================================================
--- branches/DARWIN/none/tests/pending.c 2009-01-19 05:43:38 UTC (rev 8980)
+++ branches/DARWIN/none/tests/pending.c 2009-01-19 06:07:23 UTC (rev 8981)
@@ -11,7 +11,6 @@
#include <unistd.h>
#include <stdlib.h>
-#if !defined(__APPLE__)
static volatile int gotsig = 0;
static volatile int early = 1;
@@ -83,12 +82,3 @@
printf("OK\n");
return 0;
}
-
-#else
-
-int main(int argc, char **argv)
-{
- return 0;
-}
-
-#endif
Modified: branches/DARWIN/tests/filter_libc
===================================================================
--- branches/DARWIN/tests/filter_libc 2009-01-19 05:43:38 UTC (rev 8980)
+++ branches/DARWIN/tests/filter_libc 2009-01-19 06:07:23 UTC (rev 8981)
@@ -15,8 +15,9 @@
s/ __GI___/ __/;
s/ __([a-z]*)_nocancel / $1 /;
- s/\(in \/.*libc.*\)$/(in \/...libc...)/;
- s/\(within \/.*libc.*\)$/(within \/...libc...)/;
+ # "libSystem*" occurs on Darwin.
+ s/\(in \/.*(libc|libSystem).*\)$/(in \/...libc...)/;
+ s/\(within \/.*(libc|libSystem).*\)$/(within \/...libc...)/;
s/\(below main\) \(.+\.[cS]:\d+\)$/(below main) (in \/...libc...)/;
|
|
From: Nicholas N. <n.n...@gm...> - 2009-01-19 05:53:24
|
Hi,
none/tests/execve.c looks like this:
------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv)
{
if (argc == 1)
{
if (execve(argv[0], NULL, NULL) < 0)
{
perror("execve");
exit(1);
}
}
exit(0);
}
--------------------------------
Any ideas what this is meant to demonstrate? I don't even understand
it, it looks to me like it should go into an infinite loop, just
repeatedly execve'ing itself. Any explanations are welcome...
N
|
|
From: <sv...@va...> - 2009-01-19 05:43:45
|
Author: njn
Date: 2009-01-19 05:43:38 +0000 (Mon, 19 Jan 2009)
New Revision: 8980
Log:
Tweak an error message. none/tests/cmdline5 now passes.
Modified:
branches/DARWIN/coregrind/launcher-darwin.c
Modified: branches/DARWIN/coregrind/launcher-darwin.c
===================================================================
--- branches/DARWIN/coregrind/launcher-darwin.c 2009-01-19 05:28:35 UTC (rev 8979)
+++ branches/DARWIN/coregrind/launcher-darwin.c 2009-01-19 05:43:38 UTC (rev 8980)
@@ -86,7 +86,7 @@
va_list vargs;
va_start(vargs, format);
- fprintf(stderr, "valgrind: Cannot continue: ");
+ fprintf(stderr, "valgrind: ");
vfprintf(stderr, format, vargs);
fprintf(stderr, "\n");
va_end(vargs);
|
|
From: <sv...@va...> - 2009-01-19 05:28:41
|
Author: njn Date: 2009-01-19 05:28:35 +0000 (Mon, 19 Jan 2009) New Revision: 8979 Log: Make brk2 work on Darwin by doing extra filtering. Modified: branches/DARWIN/memcheck/tests/brk2.stderr.exp branches/DARWIN/memcheck/tests/brk2.vgtest Modified: branches/DARWIN/memcheck/tests/brk2.stderr.exp =================================================================== --- branches/DARWIN/memcheck/tests/brk2.stderr.exp 2009-01-19 05:25:11 UTC (rev 8978) +++ branches/DARWIN/memcheck/tests/brk2.stderr.exp 2009-01-19 05:28:35 UTC (rev 8979) @@ -1,7 +1,7 @@ ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -malloc/free: in use at exit: 0 bytes in 0 blocks. -malloc/free: 0 allocs, 0 frees, 0 bytes allocated. +malloc/free: in use at exit: ... bytes in ... blocks. +malloc/free: ... allocs, ... frees, ... bytes allocated. For a detailed leak analysis, rerun with: --leak-check=yes For counts of detected errors, rerun with: -v Modified: branches/DARWIN/memcheck/tests/brk2.vgtest =================================================================== --- branches/DARWIN/memcheck/tests/brk2.vgtest 2009-01-19 05:25:11 UTC (rev 8978) +++ branches/DARWIN/memcheck/tests/brk2.vgtest 2009-01-19 05:28:35 UTC (rev 8979) @@ -1 +1,2 @@ prog: brk2 +stderr_filter: filter_allocs |
|
From: <sv...@va...> - 2009-01-19 05:25:18
|
Author: njn
Date: 2009-01-19 05:25:11 +0000 (Mon, 19 Jan 2009)
New Revision: 8978
Log:
Move Linux-specific 'brk' into memcheck/tests/linux/.
Added:
branches/DARWIN/memcheck/tests/linux/brk.c
branches/DARWIN/memcheck/tests/linux/brk.stderr.exp
branches/DARWIN/memcheck/tests/linux/brk.stderr.exp2
branches/DARWIN/memcheck/tests/linux/brk.vgtest
Removed:
branches/DARWIN/memcheck/tests/brk.c
branches/DARWIN/memcheck/tests/brk.stderr.exp
branches/DARWIN/memcheck/tests/brk.stderr.exp2
branches/DARWIN/memcheck/tests/brk.vgtest
Modified:
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/linux/Makefile.am
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-01-19 04:01:28 UTC (rev 8977)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-01-19 05:25:11 UTC (rev 8978)
@@ -48,7 +48,6 @@
badloop.stderr.exp badloop.vgtest \
badpoll.stderr.exp badpoll.vgtest \
badrw.stderr.exp badrw.vgtest \
- brk.stderr.exp brk.vgtest \
brk2.stderr.exp brk2.vgtest \
buflen_check.stderr.exp buflen_check.stderr.exp2 buflen_check.vgtest \
clientperm.stderr.exp \
@@ -197,7 +196,7 @@
check_PROGRAMS = \
addressable \
badaddrvalue badfree badjump badjump2 \
- badloop badpoll badrw brk brk2 buflen_check \
+ badloop badpoll badrw brk2 buflen_check \
clientperm custom_alloc \
deep_templates \
describe-block \
Deleted: branches/DARWIN/memcheck/tests/brk.c
===================================================================
--- branches/DARWIN/memcheck/tests/brk.c 2009-01-19 04:01:28 UTC (rev 8977)
+++ branches/DARWIN/memcheck/tests/brk.c 2009-01-19 05:25:11 UTC (rev 8978)
@@ -1,44 +0,0 @@
-#include <assert.h>
-#include <stdio.h>
-#if !defined(_AIX)
-# include <sys/syscall.h>
-#endif
-#include <sys/types.h>
-#include <unistd.h>
-
-// kernel brk() and libc brk() act quite differently...
-
-int main(void)
-{
- int i;
- void* orig_ds = sbrk(0);
- void* ds = orig_ds;
- void* vals[10];
- void* res;
-#define EOL ((void*)( ~(long)0 ))
- vals[0] = (void*)0;
- vals[1] = (void*)1;
- vals[2] = ds - 0x1; // small shrink
- vals[3] = ds;
- vals[4] = ds + 0x1000; // small growth
- vals[5] = ds + 0x40000000; // too-big growth
- vals[6] = ds + 0x500; // shrink a little, but still above start size
- vals[7] = ds - 0x1; // shrink below start size
-// vals[8] = ds - 0x1000; // shrink a lot below start size (into text)
-// vals[9] = EOL;
- vals[8] = EOL;
-
- for (i = 0; EOL != vals[i]; i++) {
-# if !defined(_AIX) && !defined(__APPLE__)
- res = (void*)syscall(__NR_brk, vals[i]);
-# endif
- }
-
- assert( 0 == brk(orig_ds) ); // libc brk()
-
- for (i = 0; EOL != vals[i]; i++) {
- res = (void*)(long)brk(vals[i]);
- }
-
- return 0;
-}
Deleted: branches/DARWIN/memcheck/tests/brk.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/brk.stderr.exp 2009-01-19 04:01:28 UTC (rev 8977)
+++ branches/DARWIN/memcheck/tests/brk.stderr.exp 2009-01-19 05:25:11 UTC (rev 8978)
@@ -1,7 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
Deleted: branches/DARWIN/memcheck/tests/brk.stderr.exp2
===================================================================
--- branches/DARWIN/memcheck/tests/brk.stderr.exp2 2009-01-19 04:01:28 UTC (rev 8977)
+++ branches/DARWIN/memcheck/tests/brk.stderr.exp2 2009-01-19 05:25:11 UTC (rev 8978)
@@ -1,7 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 1 allocs, 1 frees, 24 bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
Deleted: branches/DARWIN/memcheck/tests/brk.vgtest
===================================================================
--- branches/DARWIN/memcheck/tests/brk.vgtest 2009-01-19 04:01:28 UTC (rev 8977)
+++ branches/DARWIN/memcheck/tests/brk.vgtest 2009-01-19 05:25:11 UTC (rev 8978)
@@ -1 +0,0 @@
-prog: brk
Modified: branches/DARWIN/memcheck/tests/linux/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-01-19 04:01:28 UTC (rev 8977)
+++ branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-01-19 05:25:11 UTC (rev 8978)
@@ -1,10 +1,12 @@
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
+ brk.stderr.exp brk.vgtest \
capget capget.stderr.exp \
timerfd-syscall timerfd-syscall.stderr.exp
check_PROGRAMS = \
+ brk \
capget \
timerfd-syscall
Copied: branches/DARWIN/memcheck/tests/linux/brk.c (from rev 8974, branches/DARWIN/memcheck/tests/brk.c)
===================================================================
--- branches/DARWIN/memcheck/tests/linux/brk.c (rev 0)
+++ branches/DARWIN/memcheck/tests/linux/brk.c 2009-01-19 05:25:11 UTC (rev 8978)
@@ -0,0 +1,39 @@
+#include <assert.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+// kernel brk() and libc brk() act quite differently...
+
+int main(void)
+{
+ int i;
+ void* orig_ds = sbrk(0);
+ void* ds = orig_ds;
+ void* vals[10];
+ void* res;
+#define EOL ((void*)( ~(long)0 ))
+ vals[0] = (void*)0;
+ vals[1] = (void*)1;
+ vals[2] = ds - 0x1; // small shrink
+ vals[3] = ds;
+ vals[4] = ds + 0x1000; // small growth
+ vals[5] = ds + 0x40000000; // too-big growth
+ vals[6] = ds + 0x500; // shrink a little, but still above start size
+ vals[7] = ds - 0x1; // shrink below start size
+// vals[8] = ds - 0x1000; // shrink a lot below start size (into text)
+// vals[9] = EOL;
+ vals[8] = EOL;
+
+ for (i = 0; EOL != vals[i]; i++) {
+ res = (void*)syscall(__NR_brk, vals[i]);
+ }
+
+ assert( 0 == brk(orig_ds) ); // libc brk()
+
+ for (i = 0; EOL != vals[i]; i++) {
+ res = (void*)(long)brk(vals[i]);
+ }
+
+ return 0;
+}
Copied: branches/DARWIN/memcheck/tests/linux/brk.stderr.exp (from rev 8974, branches/DARWIN/memcheck/tests/brk.stderr.exp)
===================================================================
--- branches/DARWIN/memcheck/tests/linux/brk.stderr.exp (rev 0)
+++ branches/DARWIN/memcheck/tests/linux/brk.stderr.exp 2009-01-19 05:25:11 UTC (rev 8978)
@@ -0,0 +1,7 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: 0 bytes in 0 blocks.
+malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
+For a detailed leak analysis, rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v
Copied: branches/DARWIN/memcheck/tests/linux/brk.stderr.exp2 (from rev 8974, branches/DARWIN/memcheck/tests/brk.stderr.exp2)
===================================================================
--- branches/DARWIN/memcheck/tests/linux/brk.stderr.exp2 (rev 0)
+++ branches/DARWIN/memcheck/tests/linux/brk.stderr.exp2 2009-01-19 05:25:11 UTC (rev 8978)
@@ -0,0 +1,7 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: 0 bytes in 0 blocks.
+malloc/free: 1 allocs, 1 frees, 24 bytes allocated.
+For a detailed leak analysis, rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v
Copied: branches/DARWIN/memcheck/tests/linux/brk.vgtest (from rev 8974, branches/DARWIN/memcheck/tests/brk.vgtest)
===================================================================
--- branches/DARWIN/memcheck/tests/linux/brk.vgtest (rev 0)
+++ branches/DARWIN/memcheck/tests/linux/brk.vgtest 2009-01-19 05:25:11 UTC (rev 8978)
@@ -0,0 +1 @@
+prog: brk
|
|
From: <sv...@va...> - 2009-01-19 04:01:43
|
Author: njn Date: 2009-01-19 04:01:28 +0000 (Mon, 19 Jan 2009) New Revision: 8977 Log: Fix Callgrind test filters as well. Modified: branches/DARWIN/callgrind/tests/filter_stderr Modified: branches/DARWIN/callgrind/tests/filter_stderr =================================================================== --- branches/DARWIN/callgrind/tests/filter_stderr 2009-01-19 03:58:31 UTC (rev 8976) +++ branches/DARWIN/callgrind/tests/filter_stderr 2009-01-19 04:01:28 UTC (rev 8977) @@ -14,10 +14,10 @@ sed "s/^\(Collected *:\)[ 0-9]*$/\1/" | # Remove numbers from I/D/L2 "refs:" lines -sed "s/\(\(I\|D\|L2\) *refs:\)[ 0-9,()+rdw]*$/\1/" | +perl -p -e 's/((I|D|L2) *refs:)[ 0-9,()+rdw]*$/\1/' | # Remove numbers from I1/D1/L2/L2i/L2d "misses:" and "miss rates:" lines -sed "s/\(\(I1\|D1\|L2\|L2i\|L2d\) *\(misses\|miss rate\):\)[ 0-9,()+rdw%\.]*$/\1/" | +perl -p -e 's/((I1|D1|L2|L2i|L2d) *(misses|miss rate):)[ 0-9,()+rdw%\.]*$/\1/' | # Remove CPUID warnings lines for P4s and other machines sed "/warning: Pentium 4 with 12 KB micro-op instruction trace cache/d" | |
|
From: <sv...@va...> - 2009-01-19 03:58:51
|
Author: njn Date: 2009-01-19 03:58:31 +0000 (Mon, 19 Jan 2009) New Revision: 8976 Log: Use perl instead of sed for some Cachegrind test filters. Makes five extra regtests succeed on Darwin. Modified: branches/DARWIN/cachegrind/tests/filter_stderr Modified: branches/DARWIN/cachegrind/tests/filter_stderr =================================================================== --- branches/DARWIN/cachegrind/tests/filter_stderr 2009-01-19 03:44:19 UTC (rev 8975) +++ branches/DARWIN/cachegrind/tests/filter_stderr 2009-01-19 03:58:31 UTC (rev 8976) @@ -8,10 +8,10 @@ sed "/^Cachegrind, a cache and branch-prediction profiler./ , /./ d" | # Remove numbers from I/D/L2 "refs:" lines -sed "s/\(\(I\|D\|L2\) *refs:\)[ 0-9,()+rdw]*$/\1/" | +perl -p -e 's/((I|D|L2) *refs:)[ 0-9,()+rdw]*$/\1/' | # Remove numbers from I1/D1/L2/L2i/L2d "misses:" and "miss rates:" lines -sed "s/\(\(I1\|D1\|L2\|L2i\|L2d\) *\(misses\|miss rate\):\)[ 0-9,()+rdw%\.]*$/\1/" | +perl -p -e 's/((I1|D1|L2|L2i|L2d) *(misses|miss rate):)[ 0-9,()+rdw%\.]*$/\1/' | # Remove CPUID warnings lines for P4s and other machines sed "/warning: Pentium 4 with 12 KB micro-op instruction trace cache/d" | |
|
From: Tom H. <th...@cy...> - 2009-01-19 03:47:38
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-01-19 03:20:04 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 481 tests, 4 stderr failures, 0 stdout failures, 0 post failures == drd/tests/qt4_semaphore (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) memcheck/tests/x86-linux/scalar (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 481 tests, 3 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) memcheck/tests/x86/scalar (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Mon Jan 19 03:33:51 2009 --- new.short Mon Jan 19 03:47:30 2009 *************** *** 8,13 **** ! == 481 tests, 3 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) ! memcheck/tests/x86/scalar (stderr) --- 8,14 ---- ! == 481 tests, 4 stderr failures, 0 stdout failures, 0 post failures == ! drd/tests/qt4_semaphore (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/preen_invars (stderr) ! memcheck/tests/x86-linux/scalar (stderr) |
|
From: <sv...@va...> - 2009-01-19 03:44:37
|
Author: njn
Date: 2009-01-19 03:44:19 +0000 (Mon, 19 Jan 2009)
New Revision: 8975
Log:
Create memcheck/tests/linux/ and move some Linux-specific tests
into it. Partial merge from DARWIN branch, r8943.
Added:
trunk/memcheck/tests/linux/
trunk/memcheck/tests/linux/Makefile.am
trunk/memcheck/tests/linux/capget.c
trunk/memcheck/tests/linux/capget.stderr.exp
trunk/memcheck/tests/linux/capget.vgtest
trunk/memcheck/tests/linux/filter_stderr
trunk/memcheck/tests/linux/timerfd-syscall.c
trunk/memcheck/tests/linux/timerfd-syscall.stderr.exp
trunk/memcheck/tests/linux/timerfd-syscall.stdout.exp
trunk/memcheck/tests/linux/timerfd-syscall.vgtest
Removed:
trunk/memcheck/tests/linux-capget.c
trunk/memcheck/tests/linux-capget.stderr.exp
trunk/memcheck/tests/linux-capget.vgtest
trunk/memcheck/tests/linux-timerfd-syscall.c
trunk/memcheck/tests/linux-timerfd-syscall.stderr.exp
trunk/memcheck/tests/linux-timerfd-syscall.stdout.exp
trunk/memcheck/tests/linux-timerfd-syscall.vgtest
Modified:
trunk/configure.in
trunk/memcheck/tests/Makefile.am
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/configure.in 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1629,6 +1629,7 @@
memcheck/tests/ppc32/Makefile
memcheck/tests/ppc64/Makefile
memcheck/tests/x86/Makefile
+ memcheck/tests/linux/Makefile
memcheck/tests/x86-linux/Makefile
memcheck/docs/Makefile
cachegrind/Makefile
Modified: trunk/memcheck/tests/Makefile.am
===================================================================
--- trunk/memcheck/tests/Makefile.am 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/Makefile.am 2009-01-19 03:44:19 UTC (rev 8975)
@@ -18,6 +18,11 @@
SUBDIRS += ppc64
endif
+# OS-specific tests
+if VGO_LINUX
+SUBDIRS += linux
+endif
+
# Platform-specific tests
if VGP_X86_LINUX
SUBDIRS += x86-linux
@@ -73,10 +78,8 @@
leak-tree.stderr.exp2 leak-tree.stderr.exp64 \
leak-regroot.vgtest leak-regroot.stderr.exp \
leakotron.vgtest leakotron.stdout.exp leakotron.stderr.exp \
- linux-capget linux-capget.stderr.exp \
linux-syslog-syscall linux-syslog-syscall.stderr.exp \
linux-syscalls-2007 linux-syscalls-2007.stderr.exp \
- linux-timerfd-syscall linux-timerfd-syscall.stderr.exp \
long_namespace_xml.vgtest long_namespace_xml.stdout.exp \
long_namespace_xml.stderr.exp \
lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \
@@ -199,10 +202,8 @@
file_locking \
fprw fwrite hello inits inline \
leak-0 leak-cycle leak-pool leak-tree leak-regroot leakotron \
- linux-capget \
linux-syslog-syscall \
linux-syscalls-2007 \
- linux-timerfd-syscall \
long_namespace_xml \
lsframe1 lsframe2 \
mallinfo \
@@ -246,7 +247,6 @@
oset_test_CFLAGS = $(AM_FLAG_M3264_PRI) \
-DVGA_$(VG_ARCH_PRI)=1 -DVGO_$(VG_OS)=1 \
-DVGP_$(VG_ARCH_PRI)_$(VG_OS)=1
-linux_timerfd_syscall_LDADD = -lrt
vcpu_bz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
vcpu_fbench_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
vcpu_fnfns_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
Added: trunk/memcheck/tests/linux/Makefile.am
===================================================================
--- trunk/memcheck/tests/linux/Makefile.am (rev 0)
+++ trunk/memcheck/tests/linux/Makefile.am 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,17 @@
+noinst_SCRIPTS = filter_stderr
+
+EXTRA_DIST = $(noinst_SCRIPTS) \
+ capget capget.stderr.exp \
+ timerfd-syscall timerfd-syscall.stderr.exp
+
+check_PROGRAMS = \
+ capget \
+ timerfd-syscall
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g \
+ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CCASFLAGS = @FLAG_M32@
+
+timerfd_syscall_LDADD = -lrt
Copied: trunk/memcheck/tests/linux/capget.c (from rev 8969, trunk/memcheck/tests/linux-capget.c)
===================================================================
--- trunk/memcheck/tests/linux/capget.c (rev 0)
+++ trunk/memcheck/tests/linux/capget.c 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,50 @@
+#if defined(linux)
+
+
+#include <stdio.h> /* printf() */
+#include <unistd.h> /* syscall() */
+#include <sys/syscall.h> /* __NR_capget */
+#include <linux/capability.h> /* _LINUX_CAPABILITY_VERSION */
+
+
+int main()
+{
+ struct __user_cap_header_struct h;
+ struct __user_cap_data_struct d;
+ int syscall_result;
+
+ h.version = _LINUX_CAPABILITY_VERSION;
+ h.pid = 0;
+ syscall_result = syscall(__NR_capget, &h, &d);
+ if (syscall_result >= 0)
+ {
+ fprintf(stderr,
+ "capget result:\n"
+ "effective %#x\n"
+ "permitted %#x\n"
+ "inheritable %#x\n",
+ d.effective,
+ d.permitted,
+ d.inheritable);
+ }
+ else
+ {
+ perror("capget");
+ }
+ return 0;
+}
+
+
+#else
+
+
+#include <stdio.h>
+
+int main()
+{
+ fprintf(stderr, "This program is Linux-specific\n");
+ return 0;
+}
+
+
+#endif
Property changes on: trunk/memcheck/tests/linux/capget.c
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/memcheck/tests/linux/capget.stderr.exp (from rev 8969, trunk/memcheck/tests/linux-capget.stderr.exp)
===================================================================
--- trunk/memcheck/tests/linux/capget.stderr.exp (rev 0)
+++ trunk/memcheck/tests/linux/capget.stderr.exp 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,11 @@
+
+capget result:
+effective 0
+permitted 0
+inheritable 0
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: ... bytes in ... blocks.
+malloc/free: ... allocs, ... frees, ... bytes allocated.
+For a detailed leak analysis, rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v
Property changes on: trunk/memcheck/tests/linux/capget.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/memcheck/tests/linux/capget.vgtest (from rev 8969, trunk/memcheck/tests/linux-capget.vgtest)
===================================================================
--- trunk/memcheck/tests/linux/capget.vgtest (rev 0)
+++ trunk/memcheck/tests/linux/capget.vgtest 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,2 @@
+prog: capget
+stderr_filter: ../filter_allocs
Property changes on: trunk/memcheck/tests/linux/capget.vgtest
___________________________________________________________________
Name: svn:mergeinfo
+
Added: trunk/memcheck/tests/linux/filter_stderr
===================================================================
--- trunk/memcheck/tests/linux/filter_stderr (rev 0)
+++ trunk/memcheck/tests/linux/filter_stderr 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+../filter_stderr
Property changes on: trunk/memcheck/tests/linux/filter_stderr
___________________________________________________________________
Name: svn:executable
+ *
Copied: trunk/memcheck/tests/linux/timerfd-syscall.c (from rev 8969, trunk/memcheck/tests/linux-timerfd-syscall.c)
===================================================================
--- trunk/memcheck/tests/linux/timerfd-syscall.c (rev 0)
+++ trunk/memcheck/tests/linux/timerfd-syscall.c 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,310 @@
+/** Test Valgrind's interception of the Linux syscalls timerfd_create(),
+ * timerfd_gettime() and timerfd_settime().
+ *
+ * This is a modified version of
+ * timerfd-test2 by Davide Libenzi (test app for timerfd)
+ * Copyright (C) 2007 Davide Libenzi <da...@xm...>
+ * Modified for inclusion in Valgrind.
+ * Copyright (C) 2008 Bart Van Assche <bar...@gm...>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See also http://www.xmailserver.org/timerfd-test2.c
+ */
+
+#if defined(__linux__)
+
+#define _GNU_SOURCE
+
+#include "../../../config.h"
+#include <errno.h>
+#include <fcntl.h>
+#include <poll.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#if defined(HAVE_SYS_SIGNAL_H)
+#include <sys/signal.h>
+#endif
+#if defined(HAVE_SYS_SYSCALL_H)
+#include <sys/syscall.h>
+#endif
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+#if defined(HAVE_SYS_TYPES_H)
+#include <sys/types.h>
+#endif
+
+
+/*
+ * timerfd_* system call numbers introduced in 2.6.23. These constants are
+ * not yet in the glibc 2.7 headers, that is why they are defined here.
+ */
+#ifndef __NR_timerfd_create
+#if defined(__x86_64__)
+#define __NR_timerfd_create 283
+#define __NR_timerfd_settime 286
+#define __NR_timerfd_gettime 287
+#elif defined(__i386__)
+#define __NR_timerfd_create 322
+#define __NR_timerfd_settime 325
+#define __NR_timerfd_gettime 326
+#elif defined(__powerpc__)
+#define __NR_timerfd_create 306
+#define __NR_timerfd_settime 311
+#define __NR_timerfd_gettime 312
+#else
+#error Cannot detect your architecture!
+#endif
+#endif
+
+
+
+/* Definitions from include/linux/timerfd.h */
+#define TFD_TIMER_ABSTIME (1 << 0)
+
+
+
+struct tmr_type
+{
+ int id;
+ char const *name;
+};
+
+
+#if defined(HAVE_CLOCK_GETTIME)
+unsigned long long getustime(int clockid)
+{
+ struct timespec tp;
+
+ if (clock_gettime((clockid_t) clockid, &tp))
+ {
+ perror("clock_gettime");
+ return 0;
+ }
+
+ return 1000000ULL * tp.tv_sec + tp.tv_nsec / 1000;
+}
+#else
+unsigned long long getustime(int clockid)
+{
+ fprintf(stderr, "error: clock_gettime\n");
+ return 0;
+}
+#endif
+
+void set_timespec(struct timespec *tmr, unsigned long long ustime)
+{
+ tmr->tv_sec = (time_t) (ustime / 1000000ULL);
+ tmr->tv_nsec = (long) (1000ULL * (ustime % 1000000ULL));
+}
+
+int timerfd_create(int clockid, int flags)
+{
+ return syscall(__NR_timerfd_create, clockid, flags);
+}
+
+int timerfd_settime(int ufc, int flags, const struct itimerspec *utmr,
+ struct itimerspec *otmr)
+{
+ return syscall(__NR_timerfd_settime, ufc, flags, utmr, otmr);
+}
+
+int timerfd_gettime(int ufc, struct itimerspec *otmr)
+{
+ return syscall(__NR_timerfd_gettime, ufc, otmr);
+}
+
+long waittmr(int tfd, int timeo)
+{
+ u_int64_t ticks;
+ struct pollfd pfd;
+
+ pfd.fd = tfd;
+ pfd.events = POLLIN;
+ pfd.revents = 0;
+ if (poll(&pfd, 1, timeo) < 0)
+ {
+ perror("poll");
+ return -1;
+ }
+ if ((pfd.revents & POLLIN) == 0)
+ {
+ fprintf(stdout, "no ticks happened\n");
+ return -1;
+ }
+ if (read(tfd, &ticks, sizeof(ticks)) != sizeof(ticks))
+ {
+ perror("timerfd read");
+ return -1;
+ }
+
+ return ticks;
+}
+
+int main(int ac, char **av)
+{
+ int i, tfd;
+ long ticks;
+ unsigned long long tnow, ttmr;
+ u_int64_t uticks;
+ struct itimerspec tmr;
+ struct tmr_type clks[] =
+ {
+#if defined(HAVE_CLOCK_MONOTONIC)
+ { CLOCK_MONOTONIC, "CLOCK MONOTONIC" },
+#endif
+ { CLOCK_REALTIME, "CLOCK REALTIME" },
+ };
+
+ for (i = 0; i < sizeof(clks) / sizeof(clks[0]); i++)
+ {
+ fprintf(stdout, "\n\n---------------------------------------\n");
+ fprintf(stdout, "| testing %s\n", clks[i].name);
+ fprintf(stdout, "---------------------------------------\n\n");
+
+ fprintf(stdout, "relative timer test (at 500 ms) ...\n");
+ set_timespec(&tmr.it_value, 500 * 1000);
+ set_timespec(&tmr.it_interval, 0);
+ tnow = getustime(clks[i].id);
+ if ((tfd = timerfd_create(clks[i].id, 0)) == -1)
+ {
+ perror("timerfd_create");
+ return 1;
+ }
+
+ if (timerfd_settime(tfd, 0, &tmr, NULL))
+ {
+ perror("timerfd_settime");
+ return 1;
+ }
+
+ fprintf(stdout, "wating timer ...\n");
+ ticks = waittmr(tfd, -1);
+ ttmr = getustime(clks[i].id);
+ if (ticks <= 0)
+ fprintf(stdout, "whooops! no timer showed up!\n");
+ else
+ fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
+ ticks, (ttmr - tnow) * 1e-6);
+
+
+ fprintf(stdout, "absolute timer test (at 500 ms) ...\n");
+ tnow = getustime(clks[i].id);
+ set_timespec(&tmr.it_value, tnow + 500 * 1000);
+ set_timespec(&tmr.it_interval, 0);
+ if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL))
+ {
+ perror("timerfd_settime");
+ return 1;
+ }
+
+ fprintf(stdout, "wating timer ...\n");
+ ticks = waittmr(tfd, -1);
+ ttmr = getustime(clks[i].id);
+ if (ticks <= 0)
+ fprintf(stdout, "whooops! no timer showed up!\n");
+ else
+ fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
+ ticks, (ttmr - tnow) * 1e-6);
+
+ fprintf(stdout, "sequential timer test (100 ms clock) ...\n");
+ tnow = getustime(clks[i].id);
+ set_timespec(&tmr.it_value, tnow + 100 * 1000);
+ set_timespec(&tmr.it_interval, 100 * 1000);
+ if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL))
+ {
+ perror("timerfd_settime");
+ return 1;
+ }
+
+ fprintf(stdout, "sleeping one second ...\n");
+ sleep(1);
+ if (timerfd_gettime(tfd, &tmr))
+ {
+ perror("timerfd_gettime");
+ return 1;
+ }
+ fprintf(stdout, "timerfd_gettime returned:\n"
+ "\tit_value = %.1f it_interval = %.1f\n",
+ tmr.it_value.tv_sec + 1e-9 * tmr.it_value.tv_nsec,
+ tmr.it_interval.tv_sec + 1e-9 * tmr.it_interval.tv_nsec);
+ fprintf(stdout, "sleeping 1 second ...\n");
+ sleep(1);
+
+ fprintf(stdout, "wating timer ...\n");
+ ticks = waittmr(tfd, -1);
+ ttmr = getustime(clks[i].id);
+ if (ticks <= 0)
+ fprintf(stdout, "whooops! no timer showed up!\n");
+ else
+ fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
+ ticks, (ttmr - tnow) * 1e-6);
+
+
+ fprintf(stdout, "O_NONBLOCK test ...\n");
+ tnow = getustime(clks[i].id);
+ set_timespec(&tmr.it_value, 100 * 1000);
+ set_timespec(&tmr.it_interval, 0);
+ if (timerfd_settime(tfd, 0, &tmr, NULL))
+ {
+ perror("timerfd_settime");
+ return 1;
+ }
+#if 0
+ fprintf(stdout, "timerfd = %d\n", tfd);
+#endif
+
+ fprintf(stdout, "wating timer (flush the single tick) ...\n");
+ ticks = waittmr(tfd, -1);
+ ttmr = getustime(clks[i].id);
+ if (ticks <= 0)
+ fprintf(stdout, "whooops! no timer showed up!\n");
+ else
+ fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
+ ticks, (ttmr - tnow) * 1e-6);
+
+ fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) | O_NONBLOCK);
+
+ if (read(tfd, &uticks, sizeof(uticks)) > 0)
+ fprintf(stdout, "whooops! timer ticks not zero when should have been\n");
+ else if (errno != EAGAIN)
+ fprintf(stdout, "whooops! bad errno value (%d = '%s')!\n",
+ errno, strerror(errno));
+ else
+ fprintf(stdout, "success\n");
+
+ fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) & ~O_NONBLOCK);
+
+ close(tfd);
+ }
+
+ return 0;
+}
+
+#endif /* __linux__ */
+
+#if defined(_AIX)
+#include <stdio.h>
+int main(int ac, char **av)
+{
+ fprintf(stderr, "This test does not work on AIX5.\n");
+ return 0;
+}
+#endif /* _AIX */
Property changes on: trunk/memcheck/tests/linux/timerfd-syscall.c
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/memcheck/tests/linux/timerfd-syscall.stderr.exp (from rev 8969, trunk/memcheck/tests/linux-timerfd-syscall.stderr.exp)
===================================================================
--- trunk/memcheck/tests/linux/timerfd-syscall.stderr.exp (rev 0)
+++ trunk/memcheck/tests/linux/timerfd-syscall.stderr.exp 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,7 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: 0 bytes in 0 blocks.
+malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
+For a detailed leak analysis, rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v
Property changes on: trunk/memcheck/tests/linux/timerfd-syscall.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/memcheck/tests/linux/timerfd-syscall.stdout.exp (from rev 8969, trunk/memcheck/tests/linux-timerfd-syscall.stdout.exp)
===================================================================
--- trunk/memcheck/tests/linux/timerfd-syscall.stdout.exp (rev 0)
+++ trunk/memcheck/tests/linux/timerfd-syscall.stdout.exp 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,46 @@
+
+
+---------------------------------------
+| testing CLOCK MONOTONIC
+---------------------------------------
+
+relative timer test (at 500 ms) ...
+wating timer ...
+got timer ticks (1) after 0.5 s
+absolute timer test (at 500 ms) ...
+wating timer ...
+got timer ticks (1) after 0.5 s
+sequential timer test (100 ms clock) ...
+sleeping one second ...
+timerfd_gettime returned:
+ it_value = 0.1 it_interval = 0.1
+sleeping 1 second ...
+wating timer ...
+got timer ticks (20) after 2.0 s
+O_NONBLOCK test ...
+wating timer (flush the single tick) ...
+got timer ticks (1) after 0.1 s
+success
+
+
+---------------------------------------
+| testing CLOCK REALTIME
+---------------------------------------
+
+relative timer test (at 500 ms) ...
+wating timer ...
+got timer ticks (1) after 0.5 s
+absolute timer test (at 500 ms) ...
+wating timer ...
+got timer ticks (1) after 0.5 s
+sequential timer test (100 ms clock) ...
+sleeping one second ...
+timerfd_gettime returned:
+ it_value = 0.1 it_interval = 0.1
+sleeping 1 second ...
+wating timer ...
+got timer ticks (20) after 2.0 s
+O_NONBLOCK test ...
+wating timer (flush the single tick) ...
+got timer ticks (1) after 0.1 s
+success
Property changes on: trunk/memcheck/tests/linux/timerfd-syscall.stdout.exp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/memcheck/tests/linux/timerfd-syscall.vgtest (from rev 8969, trunk/memcheck/tests/linux-timerfd-syscall.vgtest)
===================================================================
--- trunk/memcheck/tests/linux/timerfd-syscall.vgtest (rev 0)
+++ trunk/memcheck/tests/linux/timerfd-syscall.vgtest 2009-01-19 03:44:19 UTC (rev 8975)
@@ -0,0 +1,2 @@
+prereq: [ "$(uname)" = "Linux" ] && awk 'END{exit("'$(uname -r)'" >= "2.6.25" ? 0 : 1)}' </dev/null
+prog: timerfd-syscall
Property changes on: trunk/memcheck/tests/linux/timerfd-syscall.vgtest
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: trunk/memcheck/tests/linux-capget.c
===================================================================
--- trunk/memcheck/tests/linux-capget.c 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/linux-capget.c 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1,50 +0,0 @@
-#if defined(linux)
-
-
-#include <stdio.h> /* printf() */
-#include <unistd.h> /* syscall() */
-#include <sys/syscall.h> /* __NR_capget */
-#include <linux/capability.h> /* _LINUX_CAPABILITY_VERSION */
-
-
-int main()
-{
- struct __user_cap_header_struct h;
- struct __user_cap_data_struct d;
- int syscall_result;
-
- h.version = _LINUX_CAPABILITY_VERSION;
- h.pid = 0;
- syscall_result = syscall(__NR_capget, &h, &d);
- if (syscall_result >= 0)
- {
- fprintf(stderr,
- "capget result:\n"
- "effective %#x\n"
- "permitted %#x\n"
- "inheritable %#x\n",
- d.effective,
- d.permitted,
- d.inheritable);
- }
- else
- {
- perror("capget");
- }
- return 0;
-}
-
-
-#else
-
-
-#include <stdio.h>
-
-int main()
-{
- fprintf(stderr, "This program is Linux-specific\n");
- return 0;
-}
-
-
-#endif
Deleted: trunk/memcheck/tests/linux-capget.stderr.exp
===================================================================
--- trunk/memcheck/tests/linux-capget.stderr.exp 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/linux-capget.stderr.exp 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1,11 +0,0 @@
-
-capget result:
-effective 0
-permitted 0
-inheritable 0
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: ... bytes in ... blocks.
-malloc/free: ... allocs, ... frees, ... bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
Deleted: trunk/memcheck/tests/linux-capget.vgtest
===================================================================
--- trunk/memcheck/tests/linux-capget.vgtest 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/linux-capget.vgtest 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1,2 +0,0 @@
-prog: linux-capget
-stderr_filter: filter_allocs
Deleted: trunk/memcheck/tests/linux-timerfd-syscall.c
===================================================================
--- trunk/memcheck/tests/linux-timerfd-syscall.c 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/linux-timerfd-syscall.c 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1,310 +0,0 @@
-/** Test Valgrind's interception of the Linux syscalls timerfd_create(),
- * timerfd_gettime() and timerfd_settime().
- *
- * This is a modified version of
- * timerfd-test2 by Davide Libenzi (test app for timerfd)
- * Copyright (C) 2007 Davide Libenzi <da...@xm...>
- * Modified for inclusion in Valgrind.
- * Copyright (C) 2008 Bart Van Assche <bar...@gm...>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * See also http://www.xmailserver.org/timerfd-test2.c
- */
-
-#if defined(__linux__)
-
-#define _GNU_SOURCE
-
-#include "../../config.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <poll.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#if defined(HAVE_SYS_SIGNAL_H)
-#include <sys/signal.h>
-#endif
-#if defined(HAVE_SYS_SYSCALL_H)
-#include <sys/syscall.h>
-#endif
-#if defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
-#endif
-#if defined(HAVE_SYS_TYPES_H)
-#include <sys/types.h>
-#endif
-
-
-/*
- * timerfd_* system call numbers introduced in 2.6.23. These constants are
- * not yet in the glibc 2.7 headers, that is why they are defined here.
- */
-#ifndef __NR_timerfd_create
-#if defined(__x86_64__)
-#define __NR_timerfd_create 283
-#define __NR_timerfd_settime 286
-#define __NR_timerfd_gettime 287
-#elif defined(__i386__)
-#define __NR_timerfd_create 322
-#define __NR_timerfd_settime 325
-#define __NR_timerfd_gettime 326
-#elif defined(__powerpc__)
-#define __NR_timerfd_create 306
-#define __NR_timerfd_settime 311
-#define __NR_timerfd_gettime 312
-#else
-#error Cannot detect your architecture!
-#endif
-#endif
-
-
-
-/* Definitions from include/linux/timerfd.h */
-#define TFD_TIMER_ABSTIME (1 << 0)
-
-
-
-struct tmr_type
-{
- int id;
- char const *name;
-};
-
-
-#if defined(HAVE_CLOCK_GETTIME)
-unsigned long long getustime(int clockid)
-{
- struct timespec tp;
-
- if (clock_gettime((clockid_t) clockid, &tp))
- {
- perror("clock_gettime");
- return 0;
- }
-
- return 1000000ULL * tp.tv_sec + tp.tv_nsec / 1000;
-}
-#else
-unsigned long long getustime(int clockid)
-{
- fprintf(stderr, "error: clock_gettime\n");
- return 0;
-}
-#endif
-
-void set_timespec(struct timespec *tmr, unsigned long long ustime)
-{
- tmr->tv_sec = (time_t) (ustime / 1000000ULL);
- tmr->tv_nsec = (long) (1000ULL * (ustime % 1000000ULL));
-}
-
-int timerfd_create(int clockid, int flags)
-{
- return syscall(__NR_timerfd_create, clockid, flags);
-}
-
-int timerfd_settime(int ufc, int flags, const struct itimerspec *utmr,
- struct itimerspec *otmr)
-{
- return syscall(__NR_timerfd_settime, ufc, flags, utmr, otmr);
-}
-
-int timerfd_gettime(int ufc, struct itimerspec *otmr)
-{
- return syscall(__NR_timerfd_gettime, ufc, otmr);
-}
-
-long waittmr(int tfd, int timeo)
-{
- u_int64_t ticks;
- struct pollfd pfd;
-
- pfd.fd = tfd;
- pfd.events = POLLIN;
- pfd.revents = 0;
- if (poll(&pfd, 1, timeo) < 0)
- {
- perror("poll");
- return -1;
- }
- if ((pfd.revents & POLLIN) == 0)
- {
- fprintf(stdout, "no ticks happened\n");
- return -1;
- }
- if (read(tfd, &ticks, sizeof(ticks)) != sizeof(ticks))
- {
- perror("timerfd read");
- return -1;
- }
-
- return ticks;
-}
-
-int main(int ac, char **av)
-{
- int i, tfd;
- long ticks;
- unsigned long long tnow, ttmr;
- u_int64_t uticks;
- struct itimerspec tmr;
- struct tmr_type clks[] =
- {
-#if defined(HAVE_CLOCK_MONOTONIC)
- { CLOCK_MONOTONIC, "CLOCK MONOTONIC" },
-#endif
- { CLOCK_REALTIME, "CLOCK REALTIME" },
- };
-
- for (i = 0; i < sizeof(clks) / sizeof(clks[0]); i++)
- {
- fprintf(stdout, "\n\n---------------------------------------\n");
- fprintf(stdout, "| testing %s\n", clks[i].name);
- fprintf(stdout, "---------------------------------------\n\n");
-
- fprintf(stdout, "relative timer test (at 500 ms) ...\n");
- set_timespec(&tmr.it_value, 500 * 1000);
- set_timespec(&tmr.it_interval, 0);
- tnow = getustime(clks[i].id);
- if ((tfd = timerfd_create(clks[i].id, 0)) == -1)
- {
- perror("timerfd_create");
- return 1;
- }
-
- if (timerfd_settime(tfd, 0, &tmr, NULL))
- {
- perror("timerfd_settime");
- return 1;
- }
-
- fprintf(stdout, "wating timer ...\n");
- ticks = waittmr(tfd, -1);
- ttmr = getustime(clks[i].id);
- if (ticks <= 0)
- fprintf(stdout, "whooops! no timer showed up!\n");
- else
- fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
- ticks, (ttmr - tnow) * 1e-6);
-
-
- fprintf(stdout, "absolute timer test (at 500 ms) ...\n");
- tnow = getustime(clks[i].id);
- set_timespec(&tmr.it_value, tnow + 500 * 1000);
- set_timespec(&tmr.it_interval, 0);
- if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL))
- {
- perror("timerfd_settime");
- return 1;
- }
-
- fprintf(stdout, "wating timer ...\n");
- ticks = waittmr(tfd, -1);
- ttmr = getustime(clks[i].id);
- if (ticks <= 0)
- fprintf(stdout, "whooops! no timer showed up!\n");
- else
- fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
- ticks, (ttmr - tnow) * 1e-6);
-
- fprintf(stdout, "sequential timer test (100 ms clock) ...\n");
- tnow = getustime(clks[i].id);
- set_timespec(&tmr.it_value, tnow + 100 * 1000);
- set_timespec(&tmr.it_interval, 100 * 1000);
- if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL))
- {
- perror("timerfd_settime");
- return 1;
- }
-
- fprintf(stdout, "sleeping one second ...\n");
- sleep(1);
- if (timerfd_gettime(tfd, &tmr))
- {
- perror("timerfd_gettime");
- return 1;
- }
- fprintf(stdout, "timerfd_gettime returned:\n"
- "\tit_value = %.1f it_interval = %.1f\n",
- tmr.it_value.tv_sec + 1e-9 * tmr.it_value.tv_nsec,
- tmr.it_interval.tv_sec + 1e-9 * tmr.it_interval.tv_nsec);
- fprintf(stdout, "sleeping 1 second ...\n");
- sleep(1);
-
- fprintf(stdout, "wating timer ...\n");
- ticks = waittmr(tfd, -1);
- ttmr = getustime(clks[i].id);
- if (ticks <= 0)
- fprintf(stdout, "whooops! no timer showed up!\n");
- else
- fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
- ticks, (ttmr - tnow) * 1e-6);
-
-
- fprintf(stdout, "O_NONBLOCK test ...\n");
- tnow = getustime(clks[i].id);
- set_timespec(&tmr.it_value, 100 * 1000);
- set_timespec(&tmr.it_interval, 0);
- if (timerfd_settime(tfd, 0, &tmr, NULL))
- {
- perror("timerfd_settime");
- return 1;
- }
-#if 0
- fprintf(stdout, "timerfd = %d\n", tfd);
-#endif
-
- fprintf(stdout, "wating timer (flush the single tick) ...\n");
- ticks = waittmr(tfd, -1);
- ttmr = getustime(clks[i].id);
- if (ticks <= 0)
- fprintf(stdout, "whooops! no timer showed up!\n");
- else
- fprintf(stdout, "got timer ticks (%ld) after %.1f s\n",
- ticks, (ttmr - tnow) * 1e-6);
-
- fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) | O_NONBLOCK);
-
- if (read(tfd, &uticks, sizeof(uticks)) > 0)
- fprintf(stdout, "whooops! timer ticks not zero when should have been\n");
- else if (errno != EAGAIN)
- fprintf(stdout, "whooops! bad errno value (%d = '%s')!\n",
- errno, strerror(errno));
- else
- fprintf(stdout, "success\n");
-
- fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) & ~O_NONBLOCK);
-
- close(tfd);
- }
-
- return 0;
-}
-
-#endif /* __linux__ */
-
-#if defined(_AIX)
-#include <stdio.h>
-int main(int ac, char **av)
-{
- fprintf(stderr, "This test does not work on AIX5.\n");
- return 0;
-}
-#endif /* _AIX */
Deleted: trunk/memcheck/tests/linux-timerfd-syscall.stderr.exp
===================================================================
--- trunk/memcheck/tests/linux-timerfd-syscall.stderr.exp 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/linux-timerfd-syscall.stderr.exp 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1,7 +0,0 @@
-
-
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
-For a detailed leak analysis, rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
Deleted: trunk/memcheck/tests/linux-timerfd-syscall.stdout.exp
===================================================================
--- trunk/memcheck/tests/linux-timerfd-syscall.stdout.exp 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/linux-timerfd-syscall.stdout.exp 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1,46 +0,0 @@
-
-
----------------------------------------
-| testing CLOCK MONOTONIC
----------------------------------------
-
-relative timer test (at 500 ms) ...
-wating timer ...
-got timer ticks (1) after 0.5 s
-absolute timer test (at 500 ms) ...
-wating timer ...
-got timer ticks (1) after 0.5 s
-sequential timer test (100 ms clock) ...
-sleeping one second ...
-timerfd_gettime returned:
- it_value = 0.1 it_interval = 0.1
-sleeping 1 second ...
-wating timer ...
-got timer ticks (20) after 2.0 s
-O_NONBLOCK test ...
-wating timer (flush the single tick) ...
-got timer ticks (1) after 0.1 s
-success
-
-
----------------------------------------
-| testing CLOCK REALTIME
----------------------------------------
-
-relative timer test (at 500 ms) ...
-wating timer ...
-got timer ticks (1) after 0.5 s
-absolute timer test (at 500 ms) ...
-wating timer ...
-got timer ticks (1) after 0.5 s
-sequential timer test (100 ms clock) ...
-sleeping one second ...
-timerfd_gettime returned:
- it_value = 0.1 it_interval = 0.1
-sleeping 1 second ...
-wating timer ...
-got timer ticks (20) after 2.0 s
-O_NONBLOCK test ...
-wating timer (flush the single tick) ...
-got timer ticks (1) after 0.1 s
-success
Deleted: trunk/memcheck/tests/linux-timerfd-syscall.vgtest
===================================================================
--- trunk/memcheck/tests/linux-timerfd-syscall.vgtest 2009-01-19 03:16:59 UTC (rev 8974)
+++ trunk/memcheck/tests/linux-timerfd-syscall.vgtest 2009-01-19 03:44:19 UTC (rev 8975)
@@ -1,2 +0,0 @@
-prereq: [ "$(uname)" = "Linux" ] && awk 'END{exit("'$(uname -r)'" >= "2.6.25" ? 0 : 1)}' </dev/null
-prog: linux-timerfd-syscall
|
|
From: Tom H. <th...@cy...> - 2009-01-19 03:43:27
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-01-19 03:05:04 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 472 tests, 7 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/x86/scalar (stderr) |
|
From: Tom H. <th...@cy...> - 2009-01-19 03:32:12
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-01-19 03:10:05 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 478 tests, 5 stderr failures, 2 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) memcheck/tests/linux-timerfd-syscall (stdout) memcheck/tests/x86/scalar (stderr) none/tests/mremap2 (stdout) |
|
From: <sv...@va...> - 2009-01-19 03:17:15
|
Author: njn Date: 2009-01-19 03:16:59 +0000 (Mon, 19 Jan 2009) New Revision: 8974 Log: Create memcheck/tests/x86-linux/ and move some platform-specific tests (the scalar* ones) into it. Partial merge from DARWIN branch, r8943. Added: trunk/memcheck/tests/x86-linux/ trunk/memcheck/tests/x86-linux/Makefile.am trunk/memcheck/tests/x86-linux/filter_stderr trunk/memcheck/tests/x86-linux/scalar.c trunk/memcheck/tests/x86-linux/scalar.h trunk/memcheck/tests/x86-linux/scalar.stderr.exp trunk/memcheck/tests/x86-linux/scalar.stderr.exp2 trunk/memcheck/tests/x86-linux/scalar.vgtest trunk/memcheck/tests/x86-linux/scalar_exit_group.c trunk/memcheck/tests/x86-linux/scalar_exit_group.stderr.exp trunk/memcheck/tests/x86-linux/scalar_exit_group.stderr.exp2 trunk/memcheck/tests/x86-linux/scalar_exit_group.vgtest trunk/memcheck/tests/x86-linux/scalar_fork.c trunk/memcheck/tests/x86-linux/scalar_fork.stderr.exp trunk/memcheck/tests/x86-linux/scalar_fork.vgtest trunk/memcheck/tests/x86-linux/scalar_supp.c trunk/memcheck/tests/x86-linux/scalar_supp.stderr.exp trunk/memcheck/tests/x86-linux/scalar_supp.stderr.exp2 trunk/memcheck/tests/x86-linux/scalar_supp.supp trunk/memcheck/tests/x86-linux/scalar_supp.vgtest trunk/memcheck/tests/x86-linux/scalar_vfork.c trunk/memcheck/tests/x86-linux/scalar_vfork.stderr.exp trunk/memcheck/tests/x86-linux/scalar_vfork.vgtest Removed: trunk/memcheck/tests/x86/scalar.c trunk/memcheck/tests/x86/scalar.h trunk/memcheck/tests/x86/scalar.stderr.exp trunk/memcheck/tests/x86/scalar.stderr.exp2 trunk/memcheck/tests/x86/scalar.vgtest trunk/memcheck/tests/x86/scalar_exit_group.c trunk/memcheck/tests/x86/scalar_exit_group.stderr.exp trunk/memcheck/tests/x86/scalar_exit_group.stderr.exp2 trunk/memcheck/tests/x86/scalar_exit_group.vgtest trunk/memcheck/tests/x86/scalar_fork.c trunk/memcheck/tests/x86/scalar_fork.stderr.exp trunk/memcheck/tests/x86/scalar_fork.vgtest trunk/memcheck/tests/x86/scalar_supp.c trunk/memcheck/tests/x86/scalar_supp.stderr.exp trunk/memcheck/tests/x86/scalar_supp.stderr.exp2 trunk/memcheck/tests/x86/scalar_supp.supp trunk/memcheck/tests/x86/scalar_supp.vgtest trunk/memcheck/tests/x86/scalar_vfork.c trunk/memcheck/tests/x86/scalar_vfork.stderr.exp trunk/memcheck/tests/x86/scalar_vfork.vgtest Modified: trunk/configure.in trunk/memcheck/tests/Makefile.am trunk/memcheck/tests/x86/Makefile.am [... diff too large to include ...] |
|
From: <sv...@va...> - 2009-01-19 02:51:04
|
Author: njn
Date: 2009-01-19 02:51:00 +0000 (Mon, 19 Jan 2009)
New Revision: 8973
Log:
Merge r8957--8958 (ioctl wrapper fixes) from the trunk.
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-01-19 00:43:34 UTC (rev 8972)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-01-19 02:51:00 UTC (rev 8973)
@@ -3383,10 +3383,9 @@
PRE_MEM_WRITE( "ioctl(SG_GET_RESERVED_SIZE)", ARG3, sizeof(int) );
break;
case VKI_SG_GET_TIMEOUT:
- PRE_MEM_WRITE( "ioctl(SG_GET_TIMEOUT)", ARG3, sizeof(int) );
break;
case VKI_SG_GET_VERSION_NUM:
- PRE_MEM_READ( "ioctl(SG_GET_VERSION_NUM)", ARG3, sizeof(int) );
+ PRE_MEM_WRITE( "ioctl(SG_GET_VERSION_NUM)", ARG3, sizeof(int) );
break;
case VKI_SG_EMULATED_HOST: /* 0x2203 */
PRE_MEM_WRITE( "ioctl(SG_EMULATED_HOST)", ARG3, sizeof(int) );
@@ -4423,9 +4422,9 @@
POST_MEM_WRITE(ARG3, sizeof(int));
break;
case VKI_SG_GET_TIMEOUT:
- POST_MEM_WRITE(ARG3, sizeof(int));
break;
case VKI_SG_GET_VERSION_NUM:
+ POST_MEM_WRITE(ARG3, sizeof(int));
break;
case VKI_SG_EMULATED_HOST:
POST_MEM_WRITE(ARG3, sizeof(int));
|