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
(16) |
2
(23) |
3
(15) |
|
4
(19) |
5
(21) |
6
(27) |
7
(18) |
8
(17) |
9
(15) |
10
(11) |
|
11
(9) |
12
(18) |
13
(26) |
14
(28) |
15
(26) |
16
(20) |
17
(27) |
|
18
(16) |
19
(40) |
20
(2) |
21
(11) |
22
(27) |
23
(24) |
24
(16) |
|
25
(10) |
26
(12) |
27
(16) |
28
(7) |
29
(6) |
30
(15) |
31
(5) |
|
From: <sv...@va...> - 2005-12-19 23:44:07
|
Author: njn
Date: 2005-12-19 23:43:58 +0000 (Mon, 19 Dec 2005)
New Revision: 5392
Log:
Minor clean-ups.
Modified:
branches/COMPVBITS/memcheck/mc_main.c
Modified: branches/COMPVBITS/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 23:28:23 UTC (rev 53=
91)
+++ branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 23:43:58 UTC (rev 53=
92)
@@ -53,8 +53,6 @@
#include "mc_include.h"
#include "memcheck.h" /* for client requests */
=20
-// XXX: introduce PM_OFF macro
-
#define EXPECTED_TAKEN(cond) __builtin_expect((cond),1)
#define EXPECTED_NOT_TAKEN(cond) __builtin_expect((cond),0)
=20
@@ -1119,7 +1117,6 @@
}
=20
=20
-// XXX: can surely merge this somehow with make_aligned_word32_writable
static __inline__
void make_aligned_word32_noaccess ( Addr a )
{
@@ -2654,6 +2651,8 @@
sm_off64 =3D SM_OFF_64(a);
vabits64 =3D ((UShort*)(sm->vabits32))[sm_off64];
=20
+ // Handle common case quickly: a is suitably aligned, is mapped, and
+ // addressible.
// Convert V bits from compact memory form to expanded register form.
if (EXPECTED_TAKEN(vabits64 =3D=3D VA_BITS64_READABLE)) {
return V_BITS64_VALID;
@@ -2710,7 +2709,6 @@
/* Handle common case quickly: a is suitably aligned, */
/* is mapped, and is addressible. */
// Convert full V-bits in register to compact 2-bit form.
- // XXX: is it best to check for VALID before INVALID?
if (V_BITS64_VALID =3D=3D vbytes) {
((UShort*)(sm->vabits32))[sm_off64] =3D (UShort)VA_BITS64_READA=
BLE;
} else if (V_BITS64_INVALID =3D=3D vbytes) {
@@ -2761,10 +2759,9 @@
sm_off =3D SM_OFF(a);
vabits32 =3D sm->vabits32[sm_off];
=20
- // XXX: copy this comment to all the LOADV* functions.
- // Handle common case quickly: a is suitably aligned, is mapped, and =
is
- // addressible.
- // Convert V bits from compact memory form to expanded register form
+ // 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 (undefin=
ed).
// Almost certainly not necessary, but be paranoid.
if (EXPECTED_TAKEN(vabits32 =3D=3D VA_BITS32_READABLE)) {
@@ -2852,7 +2849,6 @@
/* Handle common case quickly: a is suitably aligned, */
/* is mapped, and is addressible. */
// Convert full V-bits in register to compact 2-bit form.
- // XXX: is it best to check for VALID before INVALID?
if (V_BITS32_VALID =3D=3D vbytes) {
sm->vabits32[sm_off] =3D VA_BITS32_READABLE;
} else if (V_BITS32_INVALID =3D=3D vbytes) {
@@ -2904,17 +2900,23 @@
sm =3D get_secmap_readable_low(a);
sm_off =3D SM_OFF(a);
vabits32 =3D sm->vabits32[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
- // XXX: checking READABLE before WRITABLE a good idea?
- // XXX: set the high 16/48 bits of retval to 1?
- if (EXPECTED_TAKEN(vabits32 =3D=3D VA_BITS32_READABLE)) {
- return V_BITS16_VALID;
- } else if (EXPECTED_TAKEN(vabits32 =3D=3D VA_BITS32_WRITABLE)) {
- return V_BITS16_INVALID;
- } else {
- /* Slow case: the 4 (yes, 4) bytes are not all-readable or all-wri=
table. */
- PROF_EVENT(242, "mc_LOADV2-slow2");
- return (UWord)mc_LOADVn_slow( a, 2, isBigEndian );
+ // XXX: set the high 16/48 bits of retval to 1 for 64-bit paranoia?
+ if (vabits32 =3D=3D VA_BITS32_READABLE) { return V_BITS16_VALID;=
}
+ else if (vabits32 =3D=3D VA_BITS32_WRITABLE) { return V_BITS16_INVALI=
D; }
+ else {
+ // The 4 (yes, 4) bytes are not all-readable or all-writable, chec=
k
+ // the two sub-bytes.
+ UChar vabits16 =3D extract_vabits16_from_vabits32(a, vabits32);
+ if (vabits16 =3D=3D VA_BITS16_READABLE) { return V_BITS16_VAL=
ID; }
+ else if (vabits16 =3D=3D VA_BITS16_WRITABLE) { return V_BITS16_INV=
ALID; }
+ else {
+ /* Slow case: the two bytes are not all-readable or all-writabl=
e. */
+ PROF_EVENT(242, "mc_LOADV2-slow2");
+ return (UWord)mc_LOADVn_slow( a, 2, isBigEndian );
+ }
}
}
=20
@@ -2959,7 +2961,6 @@
/* Handle common case quickly: a is suitably aligned, */
/* is mapped, and is addressible. */
// Convert full V-bits in register to compact 2-bit form.
- // XXX: is it best to check for VALID before INVALID?
if (V_BITS16_VALID =3D=3D vbytes) {
insert_vabits16_into_vabits32( a, VA_BITS16_READABLE,
&(sm->vabits32[sm_off]) );
@@ -2999,14 +3000,14 @@
UWord sm_off, vabits32;
SecMap* sm;
=20
- PROF_EVENT(260, "helperc_LOADV1");
+ PROF_EVENT(260, "mc_LOADV1");
=20
# if VG_DEBUG_MEMORY >=3D 2
return (UWord)mc_LOADVn_slow( a, 1, False/*irrelevant*/ );
# endif
=20
if (EXPECTED_NOT_TAKEN( UNALIGNED_OR_HIGH(a,1) )) {
- PROF_EVENT(261, "helperc_LOADV1-slow1");
+ PROF_EVENT(261, "mc_LOADV1-slow1");
return (UWord)mc_LOADVn_slow( a, 1, False/*irrelevant*/ );
}
=20
@@ -3014,14 +3015,12 @@
sm_off =3D SM_OFF(a);
vabits32 =3D sm->vabits32[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. */
- // XXX: set the high 24/56 bits of retval to 1?
+ // Handle common case quickly: a is mapped, and the entire
+ // word32 it lives in is addressible.
+ // XXX: set the high 24/56 bits of retval to 1 for 64-bit paranoia?
if (vabits32 =3D=3D VA_BITS32_READABLE) { return V_BITS8_VALID; =
}
else if (vabits32 =3D=3D VA_BITS32_WRITABLE) { return V_BITS8_INVALID=
; }
else {
- // XXX: Could just do the slow but general case if this is uncommo=
n,
- // but removing it slowed perf/bz2 down some...
// The 4 (yes, 4) bytes are not all-readable or all-writable, chec=
k
// the single byte.
UChar vabits8 =3D extract_vabits8_from_vabits32(a, vabits32);
@@ -3029,7 +3028,7 @@
else if (vabits8 =3D=3D VA_BITS8_WRITABLE) { return V_BITS8_INVALI=
D; }
else {
/* Slow case: the byte is not all-readable or all-writable. */
- PROF_EVENT(262, "helperc_LOADV1-slow2");
+ PROF_EVENT(262, "mc_LOADV1-slow2");
return (UWord)mc_LOADVn_slow( a, 1, False/*irrelevant*/ );
}
}
@@ -3042,7 +3041,7 @@
UWord sm_off, vabits32;
SecMap* sm;
=20
- PROF_EVENT(270, "helperc_STOREV1");
+ PROF_EVENT(270, "mc_STOREV1");
=20
# if VG_DEBUG_MEMORY >=3D 2
mc_STOREVn_slow( a, 1, (ULong)vbyte, False/*irrelevant*/ );
@@ -3050,7 +3049,7 @@
# endif
=20
if (EXPECTED_NOT_TAKEN( UNALIGNED_OR_HIGH(a,1) )) {
- PROF_EVENT(271, "helperc_STOREV1-slow1");
+ PROF_EVENT(271, "mc_STOREV1-slow1");
mc_STOREVn_slow( a, 1, (ULong)vbyte, False/*irrelevant*/ );
return;
}
@@ -3065,7 +3064,6 @@
/* 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.
- // XXX: is it best to check for VALID before INVALID?
if (V_BITS8_VALID =3D=3D vbyte) {
insert_vabits8_into_vabits32( a, VA_BITS8_READABLE,
&(sm->vabits32[sm_off]) );
@@ -3074,12 +3072,12 @@
&(sm->vabits32[sm_off]) );
} else {
/* Slow but general case -- writing partially defined bytes. */
- PROF_EVENT(272, "helperc_STOREV1-slow2");
+ PROF_EVENT(272, "mc_STOREV1-slow2");
mc_STOREVn_slow( a, 1, (ULong)vbyte, False/*irrelevant*/ );
}
} else {
/* Slow but general case. */
- PROF_EVENT(273, "helperc_STOREV1-slow3");
+ PROF_EVENT(273, "mc_STOREV1-slow3");
mc_STOREVn_slow( a, 1, (ULong)vbyte, False/*irrelevant*/ );
}
}
|
|
From: <sv...@va...> - 2005-12-19 23:28:27
|
Author: sewardj
Date: 2005-12-19 23:28:23 +0000 (Mon, 19 Dec 2005)
New Revision: 5391
Log:
Make --trace-redir=3Dyes show additional useful info.
Modified:
branches/FNWRAP/coregrind/m_debuginfo/symtab.c
Modified: branches/FNWRAP/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_debuginfo/symtab.c 2005-12-19 23:24:38 UT=
C (rev 5390)
+++ branches/FNWRAP/coregrind/m_debuginfo/symtab.c 2005-12-19 23:28:23 UT=
C (rev 5391)
@@ -1364,7 +1364,7 @@
struct vki_stat stat_buf;
=20
oimage =3D (Addr)NULL;
- if (VG_(clo_verbosity) > 1)
+ if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir))
VG_(message)(Vg_DebugMsg, "Reading syms from %s (%p)",=20
si->filename, si->start );
=20
@@ -1813,9 +1813,9 @@
while (curr) {
if (start =3D=3D curr->start) {
// Found it; remove from list and free it.
- if (VG_(clo_verbosity) > 1)
+ if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir))
VG_(message)(Vg_DebugMsg,=20
- "discard syms at %p-%p in %s due to munmap()",=20
+ "Discarding syms at %p-%p in %s due to munmap()=
",=20
start, start+length,
curr->filename ? curr->filename : (Char *)"???"=
);
vg_assert(*prev_next_ptr =3D=3D curr);
|
|
From: <sv...@va...> - 2005-12-19 23:24:42
|
Author: njn
Date: 2005-12-19 23:24:38 +0000 (Mon, 19 Dec 2005)
New Revision: 5390
Log:
With --undef-value-errors=3Dno, don't report any undefinedness errors, ev=
en
the ones that we can detect with the reduced instrumentation scheme. Thi=
s
is for clarity.
Modified:
branches/COMPVBITS/memcheck/mc_main.c
Modified: branches/COMPVBITS/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 22:51:41 UTC (rev 53=
89)
+++ branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 23:24:38 UTC (rev 53=
90)
@@ -1550,9 +1550,11 @@
vabits8 =3D get_vabits8(a);
if (VA_BITS8_READABLE !=3D vabits8) {
// Error! Nb: Report addressability errors in preference to
- // definedness errors.
+ // definedness errors. And don't report definedeness errors un=
less
+ // --undef-value-errors=3Dyes.
if (bad_addr !=3D NULL) *bad_addr =3D a;
- return ( VA_BITS8_NOACCESS =3D=3D vabits8 ? MC_AddrErr : MC_Val=
ueErr );
+ if ( VA_BITS8_NOACCESS =3D=3D vabits8 ) return MC_AddrErr;=
=20
+ else if ( MC_(clo_undef_value_errors) ) return MC_ValueErr;
}
a++;
}
@@ -1575,9 +1577,11 @@
vabits8 =3D get_vabits8(a);
if (VA_BITS8_READABLE !=3D vabits8) {
// Error! Nb: Report addressability errors in preference to
- // definedness errors.
+ // definedness errors. And don't report definedeness errors un=
less
+ // --undef-value-errors=3Dyes.
if (bad_addr !=3D NULL) *bad_addr =3D a;
- return ( VA_BITS8_NOACCESS =3D=3D vabits8 ? MC_AddrErr : MC_Val=
ueErr );
+ if ( VA_BITS8_NOACCESS =3D=3D vabits8 ) return MC_AddrErr;=
=20
+ else if ( MC_(clo_undef_value_errors) ) return MC_ValueErr;
}
/* Ok, a is safe to read. */
if (* ((UChar*)a) =3D=3D 0) {
@@ -2143,6 +2147,7 @@
{
MC_Error err_extra;
=20
+ tl_assert(MC_(clo_undef_value_errors));
tl_assert(VG_INVALID_THREADID !=3D tid);
if (isUnaddr) tl_assert(!isReg); // unaddressable register is impo=
ssible
mc_clear_MC_Error( &err_extra );
@@ -2222,6 +2227,7 @@
{
MC_Error err_extra;
=20
+ tl_assert(MC_(clo_undef_value_errors));
mc_clear_MC_Error( &err_extra );
err_extra.size =3D size;
err_extra.isUnaddr =3D False;
@@ -4080,7 +4086,8 @@
VG_(track_pre_mem_write) ( mc_check_is_writable );
VG_(track_post_mem_write) ( mc_post_mem_write );
=20
- VG_(track_pre_reg_read) ( mc_pre_reg_read );
+ if (MC_(clo_undef_value_errors))
+ VG_(track_pre_reg_read) ( mc_pre_reg_read );
=20
VG_(track_post_reg_write) ( mc_post_reg_write );
VG_(track_post_reg_write_clientcall_return)( mc_post_reg_write_client=
call );
|
|
From: <sv...@va...> - 2005-12-19 22:51:46
|
Author: njn
Date: 2005-12-19 22:51:41 +0000 (Mon, 19 Dec 2005)
New Revision: 5389
Log:
Merge 5387 from trunk -- removal of remaining profiling gunk from Memchec=
k.
Modified:
branches/COMPVBITS/memcheck/mc_include.h
branches/COMPVBITS/memcheck/mc_leakcheck.c
branches/COMPVBITS/memcheck/mc_main.c
branches/COMPVBITS/memcheck/mc_malloc_wrappers.c
branches/COMPVBITS/memcheck/mc_replace_strmem.c
branches/COMPVBITS/memcheck/mc_translate.c
Modified: branches/COMPVBITS/memcheck/mc_include.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_include.h 2005-12-19 22:48:39 UTC (rev=
5388)
+++ branches/COMPVBITS/memcheck/mc_include.h 2005-12-19 22:51:41 UTC (rev=
5389)
@@ -140,17 +140,9 @@
Bool print_record );
=20
/*------------------------------------------------------------*/
-/*--- Profiling of tools and memory events ---*/
+/*--- Profiling of memory events ---*/
/*------------------------------------------------------------*/
=20
-typedef=20
- enum {=20
- VgpCheckMem =3D VgpFini+1,
- VgpSetMem,
- VgpESPAdj
- }=20
- VgpToolCC;
-
/* Define to collect detailed performance info. */
/* #define MC_PROFILE_MEMORY */
=20
Modified: branches/COMPVBITS/memcheck/mc_leakcheck.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_leakcheck.c 2005-12-19 22:48:39 UTC (r=
ev 5388)
+++ branches/COMPVBITS/memcheck/mc_leakcheck.c 2005-12-19 22:51:41 UTC (r=
ev 5389)
@@ -39,7 +39,6 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h" // For mc_include.h
#include "pub_tool_signals.h"
=20
#include "mc_include.h"
Modified: branches/COMPVBITS/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 22:48:39 UTC (rev 53=
88)
+++ branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 22:51:41 UTC (rev 53=
89)
@@ -46,7 +46,6 @@
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
#include "pub_tool_oset.h"
-#include "pub_tool_profile.h" // For mc_include.h
#include "pub_tool_replacemalloc.h"
#include "pub_tool_tooliface.h"
#include "pub_tool_threadstate.h"
@@ -4086,10 +4085,6 @@
VG_(track_post_reg_write) ( mc_post_reg_write );
VG_(track_post_reg_write_clientcall_return)( mc_post_reg_write_client=
call );
=20
- VG_(register_profile_event) ( VgpSetMem, "set-mem-perms" );
- VG_(register_profile_event) ( VgpCheckMem, "check-mem-perms" );
- VG_(register_profile_event) ( VgpESPAdj, "adjust-ESP" );
-
init_shadow_memory();
MC_(malloc_list) =3D VG_(HT_construct)( 80021 ); // prime, big
MC_(mempool_list) =3D VG_(HT_construct)( 1009 ); // prime, not so =
big
Modified: branches/COMPVBITS/memcheck/mc_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_malloc_wrappers.c 2005-12-19 22:48:39 =
UTC (rev 5388)
+++ branches/COMPVBITS/memcheck/mc_malloc_wrappers.c 2005-12-19 22:51:41 =
UTC (rev 5389)
@@ -38,7 +38,6 @@
#include "pub_tool_libcprint.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h" // For mc_include.h
#include "pub_tool_replacemalloc.h"
#include "pub_tool_threadstate.h"
#include "mc_include.h"
Modified: branches/COMPVBITS/memcheck/mc_replace_strmem.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_replace_strmem.c 2005-12-19 22:48:39 U=
TC (rev 5388)
+++ branches/COMPVBITS/memcheck/mc_replace_strmem.c 2005-12-19 22:51:41 U=
TC (rev 5389)
@@ -32,7 +32,6 @@
=20
#include "pub_tool_basics.h"
#include "pub_tool_hashtable.h"
-#include "pub_tool_profile.h"
#include "pub_tool_redir.h"
#include "pub_tool_tooliface.h"
#include "valgrind.h"
Modified: branches/COMPVBITS/memcheck/mc_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_translate.c 2005-12-19 22:48:39 UTC (r=
ev 5388)
+++ branches/COMPVBITS/memcheck/mc_translate.c 2005-12-19 22:51:41 UTC (r=
ev 5389)
@@ -33,7 +33,6 @@
#include "pub_tool_hashtable.h" // For mc_include.h
#include "pub_tool_libcassert.h"
#include "pub_tool_libcprint.h"
-#include "pub_tool_profile.h"
#include "pub_tool_tooliface.h"
#include "mc_include.h"
=20
|
Author: njn
Date: 2005-12-19 22:48:39 +0000 (Mon, 19 Dec 2005)
New Revision: 5388
Log:
Remove all remaining profiling gunk.
Removed:
trunk/coregrind/m_profile.c
trunk/coregrind/pub_core_profile.h
trunk/include/pub_tool_profile.h
Modified:
trunk/addrcheck/ac_main.c
trunk/cachegrind/cg_main.c
trunk/coregrind/Makefile.am
trunk/coregrind/m_debuginfo/symtab.c
trunk/coregrind/m_demangle/demangle.c
trunk/coregrind/m_execontext.c
trunk/coregrind/m_main.c
trunk/coregrind/m_mallocfree.c
trunk/coregrind/m_options.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_stacktrace.c
trunk/coregrind/m_translate.c
trunk/docs/xml/writing-tools.xml
trunk/helgrind/hg_main.c
trunk/include/Makefile.am
trunk/include/pub_tool_options.h
trunk/massif/ms_main.c
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/addrcheck/ac_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/addrcheck/ac_main.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/addrcheck/ac_main.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -35,7 +35,6 @@
#include "pub_tool_libcbase.h"
#include "pub_tool_libcassert.h"
#include "pub_tool_libcprint.h"
-#include "pub_tool_profile.h" // For mac_shared.h
#include "pub_tool_tooliface.h"
#include "pub_tool_threadstate.h"
=20
@@ -290,8 +289,6 @@
len, example_a_bit );
}
=20
- VGP_PUSHCC(VgpSetMem);
-
/* Requests to change permissions of huge address ranges may
indicate bugs in our machinery. 30,000,000 is arbitrary, but so
far all legitimate requests have fallen beneath that size. */
@@ -329,7 +326,6 @@
} =20
=20
if (len =3D=3D 0) {
- VGP_POPCC(VgpSetMem);
return;
}
tl_assert((a % 8) =3D=3D 0 && len > 0);
@@ -389,8 +385,6 @@
len--;
} =20
# endif
-
- VGP_POPCC(VgpSetMem);
}
=20
/* Set permissions for address ranges ... */
@@ -416,7 +410,6 @@
UInt sm_off;
UChar mask;
=20
- VGP_PUSHCC(VgpESPAdj);
ENSURE_MAPPABLE(a, "make_aligned_word_noaccess");
sm =3D primary_map[PM_IDX(a)];
sm_off =3D SM_OFF(a);
@@ -424,7 +417,6 @@
mask <<=3D (a & 4 /* 100b */); /* a & 4 is either 0 or 4 */
/* mask now contains 1s where we wish to make address bits invalid (1=
s). */
sm->abits[sm_off >> 3] |=3D mask;
- VGP_POPCC(VgpESPAdj);
}
=20
static __inline__
@@ -434,7 +426,6 @@
UInt sm_off;
UChar mask;
=20
- VGP_PUSHCC(VgpESPAdj);
ENSURE_MAPPABLE(a, "make_aligned_word_accessible");
sm =3D primary_map[PM_IDX(a)];
sm_off =3D SM_OFF(a);
@@ -443,7 +434,6 @@
/* mask now contains 1s where we wish to make address bits
invalid (0s). */
sm->abits[sm_off >> 3] &=3D ~mask;
- VGP_POPCC(VgpESPAdj);
}
=20
/* Nb: by "aligned" here we mean 8-byte aligned */
@@ -453,12 +443,10 @@
AcSecMap* sm;
UInt sm_off;
=20
- VGP_PUSHCC(VgpESPAdj);
ENSURE_MAPPABLE(a, "make_aligned_doubleword_accessible");
sm =3D primary_map[PM_IDX(a)];
sm_off =3D SM_OFF(a);
sm->abits[sm_off >> 3] =3D VGM_BYTE_VALID;
- VGP_POPCC(VgpESPAdj);
} =20
=20
static __inline__
@@ -467,12 +455,10 @@
AcSecMap* sm;
UInt sm_off;
=20
- VGP_PUSHCC(VgpESPAdj);
ENSURE_MAPPABLE(a, "make_aligned_doubleword_noaccess");
sm =3D primary_map[PM_IDX(a)];
sm_off =3D SM_OFF(a);
sm->abits[sm_off >> 3] =3D VGM_BYTE_INVALID;
- VGP_POPCC(VgpESPAdj);
} =20
=20
/* The %esp update handling functions */
@@ -578,8 +564,6 @@
Bool ok;
Addr bad_addr =3D 0; // Initialise to shut gcc up
=20
- VGP_PUSHCC(VgpCheckMem);
-
ok =3D ac_check_accessible ( base, size, &bad_addr );
if (!ok) {
switch (part) {
@@ -606,8 +590,6 @@
VG_(tool_panic)("ac_check_is_accessible: unexpected CorePart");
}
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -631,16 +613,12 @@
Bool ok =3D True;
Addr bad_addr =3D 0; // Initialise to shut gcc up
=20
- VGP_PUSHCC(VgpCheckMem);
-
tl_assert(part =3D=3D Vg_CoreSysCall);
ok =3D ac_check_readable_asciiz ( (Addr)str, &bad_addr );
if (!ok) {
MAC_(record_param_error) ( tid, bad_addr, /*IsReg*/False,
/*IsUnaddr*/True, s );
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1427,10 +1405,6 @@
VG_(track_pre_mem_write) ( & ac_check_is_writable );
VG_(track_post_mem_write) ( & ac_post_mem_write );
=20
- VG_(register_profile_event) ( VgpSetMem, "set-mem-perms" );
- VG_(register_profile_event) ( VgpCheckMem, "check-mem-perms" );
- VG_(register_profile_event) ( VgpESPAdj, "adjust-ESP" );
-
init_shadow_memory();
MAC_(common_pre_clo_init)();
#endif
Modified: trunk/cachegrind/cg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg_main.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/cachegrind/cg_main.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -40,7 +40,6 @@
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
#include "pub_tool_oset.h"
-#include "pub_tool_profile.h"
#include "pub_tool_tooliface.h"
#include "pub_tool_clientstate.h"
=20
@@ -59,18 +58,6 @@
#define FN_LEN 256
=20
/*------------------------------------------------------------*/
-/*--- Profiling events ---*/
-/*------------------------------------------------------------*/
-
-typedef=20
- enum {=20
- VgpGetLineCC =3D VgpFini+1,
- VgpCacheSimulate,
- VgpCacheResults
- }=20
- VgpToolCC;
-
-/*------------------------------------------------------------*/
/*--- Types and Data Structures ---*/
/*------------------------------------------------------------*/
=20
@@ -236,8 +223,6 @@
=20
get_debug_info(origAddr, file, fn, &line);
=20
- VGP_PUSHCC(VgpGetLineCC);
-
loc.file =3D file;
loc.fn =3D fn;
loc.line =3D line;
@@ -252,7 +237,6 @@
VG_(OSet_Insert)(CC_table, lineCC);
}
=20
- VGP_POPCC(VgpGetLineCC);
return lineCC;
}
=20
@@ -265,11 +249,9 @@
{
//VG_(printf)("1I_0D : CCaddr=3D0x%010lx, iaddr=3D0x%010lx, isize=3D=
%lu\n",
// n, n->instr_addr, n->instr_len);
- VGP_PUSHCC(VgpCacheSimulate);
cachesim_I1_doref(n->instr_addr, n->instr_len,=20
&n->parent->Ir.m1, &n->parent->Ir.m2);
n->parent->Ir.a++;
- VGP_POPCC(VgpCacheSimulate);
}
=20
static VG_REGPARM(2)
@@ -279,14 +261,12 @@
// " CC2addr=3D0x%010lx, i2addr=3D0x%010lx, i2size=3D=
%lu\n",
// n, n->instr_addr, n->instr_len,
// n2, n2->instr_addr, n2->instr_len);
- VGP_PUSHCC(VgpCacheSimulate);
cachesim_I1_doref(n->instr_addr, n->instr_len,=20
&n->parent->Ir.m1, &n->parent->Ir.m2);
n->parent->Ir.a++;
cachesim_I1_doref(n2->instr_addr, n2->instr_len,=20
&n2->parent->Ir.m1, &n2->parent->Ir.m2);
n2->parent->Ir.a++;
- VGP_POPCC(VgpCacheSimulate);
}
=20
static VG_REGPARM(3)
@@ -298,7 +278,6 @@
// n, n->instr_addr, n->instr_len,
// n2, n2->instr_addr, n2->instr_len,
// n3, n3->instr_addr, n3->instr_len);
- VGP_PUSHCC(VgpCacheSimulate);
cachesim_I1_doref(n->instr_addr, n->instr_len,=20
&n->parent->Ir.m1, &n->parent->Ir.m2);
n->parent->Ir.a++;
@@ -308,7 +287,6 @@
cachesim_I1_doref(n3->instr_addr, n3->instr_len,=20
&n3->parent->Ir.m1, &n3->parent->Ir.m2);
n3->parent->Ir.a++;
- VGP_POPCC(VgpCacheSimulate);
}
=20
static VG_REGPARM(3)
@@ -317,7 +295,6 @@
//VG_(printf)("1I_1Dr: CCaddr=3D0x%010lx, iaddr=3D0x%010lx, isize=3D=
%lu\n"
// " daddr=3D0x%010lx, dsiz=
e=3D%lu\n",
// n, n->instr_addr, n->instr_len, data_addr, data_size);
- VGP_PUSHCC(VgpCacheSimulate);
cachesim_I1_doref(n->instr_addr, n->instr_len,=20
&n->parent->Ir.m1, &n->parent->Ir.m2);
n->parent->Ir.a++;
@@ -325,7 +302,6 @@
cachesim_D1_doref(data_addr, data_size,=20
&n->parent->Dr.m1, &n->parent->Dr.m2);
n->parent->Dr.a++;
- VGP_POPCC(VgpCacheSimulate);
}
=20
static VG_REGPARM(3)
@@ -334,7 +310,6 @@
//VG_(printf)("1I_1Dw: CCaddr=3D0x%010lx, iaddr=3D0x%010lx, isize=3D=
%lu\n"
// " daddr=3D0x%010lx, dsiz=
e=3D%lu\n",
// n, n->instr_addr, n->instr_len, data_addr, data_size);
- VGP_PUSHCC(VgpCacheSimulate);
cachesim_I1_doref(n->instr_addr, n->instr_len,=20
&n->parent->Ir.m1, &n->parent->Ir.m2);
n->parent->Ir.a++;
@@ -342,7 +317,6 @@
cachesim_D1_doref(data_addr, data_size,=20
&n->parent->Dw.m1, &n->parent->Dw.m2);
n->parent->Dw.a++;
- VGP_POPCC(VgpCacheSimulate);
}
=20
static VG_REGPARM(3)
@@ -350,11 +324,9 @@
{
//VG_(printf)("0I_1Dr: CCaddr=3D0x%010lx, daddr=3D0x%010lx, dsize=3D=
%lu\n",
// n, data_addr, data_size);
- VGP_PUSHCC(VgpCacheSimulate);
cachesim_D1_doref(data_addr, data_size,=20
&n->parent->Dr.m1, &n->parent->Dr.m2);
n->parent->Dr.a++;
- VGP_POPCC(VgpCacheSimulate);
}
=20
static VG_REGPARM(3)
@@ -362,11 +334,9 @@
{
//VG_(printf)("0I_1Dw: CCaddr=3D0x%010lx, daddr=3D0x%010lx, dsize=3D=
%lu\n",
// n, data_addr, data_size);
- VGP_PUSHCC(VgpCacheSimulate);
cachesim_D1_doref(data_addr, data_size,=20
&n->parent->Dw.m1, &n->parent->Dw.m2);
n->parent->Dw.a++;
- VGP_POPCC(VgpCacheSimulate);
}
=20
/*------------------------------------------------------------*/
@@ -1013,8 +983,6 @@
Char buf[512], *currFile =3D NULL, *currFn =3D NULL;
LineCC* lineCC;
=20
- VGP_PUSHCC(VgpCacheResults);
-
sres =3D VG_(open)(cachegrind_out_file, VKI_O_CREAT|VKI_O_TRUNC|VKI_O=
_WRONLY,
VKI_S_IRUSR|VKI_S_IWUSR);
if (sres.isError) {
@@ -1245,7 +1213,6 @@
VG_(message)(Vg_DebugMsg, "cachegrind: InstrInfo table size: %u",
VG_(OSet_Size)(instrInfoTable));
}
- VGP_POPCC(VgpCacheResults);
}
=20
/*--------------------------------------------------------------------*/
@@ -1355,10 +1322,6 @@
cachesim_I1_initcache(I1c);
cachesim_D1_initcache(D1c);
cachesim_L2_initcache(L2c);
-
- VG_(register_profile_event)(VgpGetLineCC, "get-lineCC");
- VG_(register_profile_event)(VgpCacheSimulate, "cache-simulate");
- VG_(register_profile_event)(VgpCacheResults, "cache-results");
}
=20
static Char base_dir[VKI_PATH_MAX];
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/Makefile.am 2005-12-19 22:48:39 UTC (rev 5388)
@@ -75,7 +75,6 @@
pub_core_mallocfree.h \
pub_core_options.h \
pub_core_oset.h \
- pub_core_profile.h \
pub_core_pthreadmodel.h \
pub_core_redir.h \
pub_core_replacemalloc.h\
@@ -139,7 +138,6 @@
m_mallocfree.c \
m_options.c \
m_oset.c \
- m_profile.c \
m_pthreadmodel.c \
m_redir.c \
m_signals.c \
Modified: trunk/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/symtab.c 2005-12-19 22:48:06 UTC (rev 538=
7)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-12-19 22:48:39 UTC (rev 538=
8)
@@ -40,7 +40,6 @@
#include "pub_core_machine.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
#include "pub_core_redir.h"
#include "pub_core_tooliface.h" // For VG_(needs).data_syms
=20
@@ -1780,8 +1779,6 @@
{
SegInfo* si =3D alloc_SegInfo(seg_addr, seg_len, seg_offset, seg_file=
name);
=20
- VGP_PUSHCC(VgpReadSyms);
-
if (!read_lib_symbols ( si )) {
// Something went wrong (eg. bad ELF file).
freeSegInfo( si );
@@ -1800,7 +1797,6 @@
/* do redirects */
VG_(resolve_existing_redirs_with_seginfo)( si );
}
- VGP_POPCC(VgpReadSyms);
=20
return si;
}
@@ -1835,7 +1831,6 @@
}
=20
// Not found.
- VGP_POPCC(VgpReadSyms);
}
=20
/*------------------------------------------------------------*/
@@ -1899,21 +1894,17 @@
Int sno;
SegInfo* si;
=20
- VGP_PUSHCC(VgpSearchSyms);
-
for (si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
if (si->start <=3D ptr && ptr < si->start+si->size) {
sno =3D search_one_symtab ( si, ptr, match_anywhere_in_fun );
if (sno =3D=3D -1) goto not_found;
*symno =3D sno;
*psi =3D si;
- VGP_POPCC(VgpSearchSyms);
return;
}
}
not_found:
*psi =3D NULL;
- VGP_POPCC(VgpSearchSyms);
}
=20
=20
@@ -1951,21 +1942,17 @@
Int lno;
SegInfo* si;
=20
- VGP_PUSHCC(VgpSearchSyms);
-
for (si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
if (si->start <=3D ptr && ptr < si->start+si->size) {
lno =3D search_one_loctab ( si, ptr );
if (lno =3D=3D -1) goto not_found;
*locno =3D lno;
*psi =3D si;
- VGP_POPCC(VgpSearchSyms);
return;
}
}
not_found:
*psi =3D NULL;
- VGP_POPCC(VgpSearchSyms);
}
=20
=20
@@ -2004,21 +1991,17 @@
Int scno;
SegInfo* si;
=20
- VGP_PUSHCC(VgpSearchSyms);
-
for (si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
if (si->start <=3D ptr && ptr < si->start+si->size) {
scno =3D search_one_scopetab ( si, ptr );
if (scno =3D=3D -1) goto not_found;
*scopeno =3D scno;
*psi =3D si;
- VGP_POPCC(VgpSearchSyms);
return;
}
}
not_found:
*psi =3D NULL;
- VGP_POPCC(VgpSearchSyms);
}
=20
=20
Modified: trunk/coregrind/m_demangle/demangle.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_demangle/demangle.c 2005-12-19 22:48:06 UTC (rev 53=
87)
+++ trunk/coregrind/m_demangle/demangle.c 2005-12-19 22:48:39 UTC (rev 53=
88)
@@ -33,15 +33,12 @@
#include "pub_core_libcbase.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
#include "demangle.h"
=20
void VG_(demangle) ( Char* orig, Char* result, Int result_size )
{
Char* demangled =3D NULL;
=20
- VGP_PUSHCC(VgpDemangle);
-
if (VG_(clo_demangle))
demangled =3D VG_(cplus_demangle) ( orig, DMGL_ANSI | DMGL_PARAMS =
);
=20
@@ -57,8 +54,6 @@
// very rarely (ie. I've heard of it twice in 3 years), the demangler
// does leak. But, we can't do much about it, and it's not a disaste=
r,
// so we just let it slide without aborting or telling the user.
-
- VGP_POPCC(VgpDemangle);
}
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_execontext.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_execontext.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/m_execontext.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -34,7 +34,6 @@
#include "pub_core_libcprint.h" // For VG_(message)()
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
#include "pub_core_stacktrace.h"
=20
/*------------------------------------------------------------*/
@@ -190,8 +189,6 @@
ExeContext* new_ec;
ExeContext* list;
=20
- VGP_PUSHCC(VgpExeContext);
-
init_ExeContext_storage();
vg_assert(VG_(clo_backtrace_size) >=3D 1=20
&& VG_(clo_backtrace_size) <=3D VG_DEEPEST_BACKTRACE);
@@ -230,7 +227,6 @@
=20
if (list !=3D NULL) {
/* Yay! We found it. */
- VGP_POPCC(VgpExeContext);
return list;
}
=20
@@ -247,7 +243,6 @@
new_ec->next =3D ec_list[hash];
ec_list[hash] =3D new_ec;
=20
- VGP_POPCC(VgpExeContext);
return new_ec;
}
=20
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/m_main.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -46,7 +46,6 @@
#include "pub_core_machine.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
#include "pub_core_debuginfo.h"
#include "pub_core_redir.h"
#include "pub_core_scheduler.h"
@@ -912,7 +911,6 @@
"\n"
" debugging options for all Valgrind tools:\n"
" --sanity-level=3D<number> level of sanity checking to do [1]\n"
-" --profile=3Dno|yes profile? (tool must be built for it) [n=
o]\n"
" --trace-flags=3D<XXXXXXXX> show generated code? (X =3D 0|1) [0000=
0000]\n"
" --profile-flags=3D<XXXXXXXX> ditto, but for profiling (X =3D 0|1) [=
00000000]\n"
" --trace-notbelow=3D<number> only show BBs above <number> [0]\n"
@@ -1100,7 +1098,6 @@
else VG_BOOL_CLO(arg, "--error-limit", VG_(clo_error_limit))
else VG_BOOL_CLO(arg, "--show-emwarns", VG_(clo_show_emwarns))
else VG_NUM_CLO (arg, "--max-stackframe", VG_(clo_max_stackframe=
))
- else VG_BOOL_CLO(arg, "--profile", VG_(clo_profile))
else VG_BOOL_CLO(arg, "--run-libc-freeres", VG_(clo_run_libc_freer=
es))
else VG_BOOL_CLO(arg, "--show-below-main", VG_(clo_show_below_mai=
n))
else VG_BOOL_CLO(arg, "--time-stamp", VG_(clo_time_stamp))
@@ -2506,23 +2503,6 @@
VG_(sigstartup_actions)();
=20
//--------------------------------------------------------------
- // Perhaps we're profiling Valgrind?
- // p: process_cmd_line_options() [for VG_(clo_profile)]
- // p: others?
- //
- // XXX: this seems to be broken? It always says the tool wasn't bui=
lt
- // for profiling; vg_profile.c's functions don't seem to be overridi=
ng
- // vg_dummy_profile.c's?
- //
- // XXX: want this as early as possible. Looking for --profile
- // in get_helprequest_and_toolname() could get it earlier.
- //--------------------------------------------------------------
- if (VG_(clo_profile))
- VG_(init_profiling)();
-
- VGP_PUSHCC(VgpStartup);
-
- //--------------------------------------------------------------
// Read suppression file
// p: process_cmd_line_options() [for VG_(clo_suppressions)]
//--------------------------------------------------------------
@@ -2548,8 +2528,6 @@
//--------------------------------------------------------------
// Run!
//--------------------------------------------------------------
- VGP_POPCC(VgpStartup);
-
if (VG_(clo_xml)) {
HChar buf[50];
VG_(elapsed_wallclock_time)(buf);
@@ -2652,9 +2630,6 @@
if (VG_(clo_verbosity) > 1)
print_all_stats();
=20
- if (VG_(clo_profile))
- VG_(done_profiling)();
-
if (VG_(clo_profile_flags) > 0) {
#define N_MAX 100
BBProfEntry tops[N_MAX];
Modified: trunk/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_mallocfree.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/m_mallocfree.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -37,7 +37,6 @@
#include "pub_core_libcprint.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
#include "pub_core_tooliface.h"
#include "valgrind.h"
=20
@@ -997,8 +996,6 @@
Arena* a;
void* v;
=20
- VGP_PUSHCC(VgpMalloc);
-
ensure_mm_init(aid);
a =3D arenaId_to_ArenaP(aid);
=20
@@ -1070,7 +1067,6 @@
sanity_check_malloc_arena(aid);
# endif
=20
- VGP_POPCC(VgpMalloc);
v =3D get_block_payload(a, b);
vg_assert( (((Addr)v) & (VG_MIN_MALLOC_SZB-1)) =3D=3D 0 );
=20
@@ -1090,13 +1086,10 @@
UInt b_listno;
Arena* a;
=20
- VGP_PUSHCC(VgpMalloc);
-
ensure_mm_init(aid);
a =3D arenaId_to_ArenaP(aid);
=20
if (ptr =3D=3D NULL) {
- VGP_POPCC(VgpMalloc);
return;
}
=20
@@ -1179,8 +1172,6 @@
# endif
=20
//zzVALGRIND_FREELIKE_BLOCK(ptr, 0);
-
- VGP_POPCC(VgpMalloc);
}
=20
=20
@@ -1224,8 +1215,6 @@
SizeT saved_bytes_on_loan;
Arena* a;
=20
- VGP_PUSHCC(VgpMalloc);
-
ensure_mm_init(aid);
a =3D arenaId_to_ArenaP(aid);
=20
@@ -1301,8 +1290,6 @@
sanity_check_malloc_arena(aid);
# endif
=20
- VGP_POPCC(VgpMalloc);
-
vg_assert( (((Addr)align_p) % req_alignB) =3D=3D 0 );
=20
//zzVALGRIND_MALLOCLIKE_BLOCK(align_p, req_pszB, 0, False);
@@ -1337,8 +1324,6 @@
SizeT size;
UChar* p;
=20
- VGP_PUSHCC(VgpMalloc);
-
size =3D nmemb * bytes_per_memb;
vg_assert(size >=3D nmemb && size >=3D bytes_per_memb);// check again=
st overflow
=20
@@ -1348,8 +1333,6 @@
=20
//zzVALGRIND_MALLOCLIKE_BLOCK(p, size, 0, True);
=20
- VGP_POPCC(VgpMalloc);
- =20
return p;
}
=20
@@ -1361,8 +1344,6 @@
UChar *p_new;
Block* b;
=20
- VGP_PUSHCC(VgpMalloc);
-
ensure_mm_init(aid);
a =3D arenaId_to_ArenaP(aid);
=20
@@ -1375,7 +1356,6 @@
old_pszB =3D get_pszB(a, b);
=20
if (req_pszB <=3D old_pszB) {
- VGP_POPCC(VgpMalloc);
return ptr;
}
=20
@@ -1385,7 +1365,6 @@
=20
VG_(arena_free)(aid, ptr);
=20
- VGP_POPCC(VgpMalloc);
return p_new;
}
=20
Modified: trunk/coregrind/m_options.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_options.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/m_options.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -54,7 +54,6 @@
Int VG_(clo_input_fd) =3D 0; /* stdin */
Int VG_(clo_n_suppressions) =3D 0;
Char* VG_(clo_suppressions)[VG_CLO_MAX_SFILES];
-Bool VG_(clo_profile) =3D False;
UChar VG_(clo_trace_flags) =3D 0; // 00000000b
UChar VG_(clo_profile_flags) =3D 0; // 00000000b
Int VG_(clo_trace_notbelow) =3D 0;
Deleted: trunk/coregrind/m_profile.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_profile.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/m_profile.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -1,171 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Profiling machinery. m_profile.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward=20
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#include "pub_core_basics.h"
-#include "pub_core_libcassert.h"
-#include "pub_core_libcprint.h"
-#include "pub_core_profile.h"
-
-/* get rid of these, if possible */
-#include <signal.h>
-#include <sys/time.h>
-
-
-#define VGP_M_STACK 20
-#define VGP_MAX_CCS 50
-
-/* All zeroed initially because they're static */
-static Int vgp_nticks;
-
-static Int vgp_counts [VGP_MAX_CCS];
-static Int vgp_entries[VGP_MAX_CCS];
-static Char* vgp_names [VGP_MAX_CCS];
-
-static Int vgp_sp;
-static UInt vgp_stack[VGP_M_STACK];
-
-/* These definitions override the panicking ones in vg_profile.c */
-
-void VG_(register_profile_event) ( Int n, Char* name )
-{
- /* Adjust for negative values */
- n +=3D VgpUnc;
- if (n >=3D VGP_MAX_CCS) {
- VG_(printf)("\nProfile event #%d higher than VGP_MAX_CCS of %d.\n"
- "If you really need this many profile events, increase=
\n"
- "VGP_MAX_CCS and recompile Valgrind.\n",
- n, VGP_MAX_CCS);
- VG_(tool_panic)("profile event too high");
- }
- if (vgp_names[n] !=3D NULL) {
- VG_(printf)("\nProfile event #%d being registered as '%s'\n"
- "already registered as '%s'.\n"
- "Note that tool and core event numbers must not overla=
p.\n",
- n, name, vgp_names[n]);
- VG_(tool_panic)("profile event already registered");
- }
-
- vgp_names[n] =3D name;
-}
-
-static void tick ( int sigNo )
-{
- Int cc;
- vgp_nticks++;
- cc =3D vgp_stack[vgp_sp];
- tl_assert(cc >=3D 0 && cc < VGP_MAX_CCS);
- vgp_counts[ cc ]++;
-}
-
-void VG_(init_profiling) ( void )
-{
- struct itimerval value;
- Int ret;
-
-#ifndef VG_DO_PROFILING
- VG_(printf)("valgrind: you must compile with VG_DO_PROFILING defined=
\n");
- VG_(printf)(" before using --profile=3Dyes. Aborting.\n");
- VG_(exit)(1);
-#endif
-
- /* Register core events... tricky macro definition causes
- VG_(register_profile_event)() to be called once for each core even=
t
- in VGP_CORE_LIST. */
- tl_assert(VgpUnc =3D=3D 0);
-# define VGP_PAIR(n,name) VG_(register_profile_event)(n,name)
- VGP_CORE_LIST;
-# undef VGP_PAIR
-
- vgp_sp =3D -1;
- VG_(pushcc) ( VgpUnc );
-
- value.it_interval.tv_sec =3D 0;
- value.it_interval.tv_usec =3D 10 * 1000;
- value.it_value =3D value.it_interval;
-
- signal(SIGPROF, tick );
- ret =3D setitimer(ITIMER_PROF, &value, NULL);
- if (ret !=3D 0) VG_(core_panic)("vgp_init_profiling");
-}
-
-void VG_(done_profiling) ( void )
-{
- Int i;
- VG_(printf)("\nProfiling done, %d ticks\n", vgp_nticks);
- for (i =3D 0; i < VGP_MAX_CCS; i++)
- if (NULL !=3D vgp_names[i])
- VG_(printf)(
- "%2d: %4d (%3d %%%%) ticks, %10d entries for %s\n",
- i, vgp_counts[i],=20
- (Int)(1000.0 * (double)vgp_counts[i] / (double)vgp_nticks),
- vgp_entries[i], vgp_names[i] );
-}
-
-void VG_(pushcc) ( UInt cc )
-{
- if (vgp_sp >=3D VGP_M_STACK-1) {=20
- VG_(printf)(
- "\nMaximum profile stack depth (%d) reached for event #%d ('%s'=
).\n"
- "This is probably due to a VG_(pushcc)() without a matching\n"
- "VG_(popcc)(). Make sure they all match.\n"
- "Or if you are nesting profiling events very deeply, increase\n=
"
- "VGP_M_STACK and recompile Valgrind.\n",
- VGP_M_STACK, cc, vgp_names[cc]);
- VG_(core_panic)("Profiling stack overflow");
- }
- vgp_sp++;
- vgp_stack[vgp_sp] =3D cc;
- vgp_entries[ cc ] ++;
-}
-
-void VG_(popcc) ( UInt cc )
-{
- if (vgp_sp <=3D 0) {
- VG_(printf)(
- "\nProfile stack underflow. This is due to a VG_(popcc)() with=
out\n"
- "a matching VG_(pushcc)(). Make sure they all match.\n");
- VG_(core_panic)("Profiling stack underflow");
- }
- if (vgp_stack[vgp_sp] !=3D cc) {
- Int i;
- VG_(printf)("profiling problem:\n");
- VG_(printf)("popping %s, stack looks like:\n", vgp_names[cc]);
- for (i =3D vgp_sp; i >=3D 0; i--)
- VG_(printf)("%2d: %s\n", i, vgp_names[vgp_stack[i]]);
- VG_(exit)(1);
- }
- vgp_sp--;
-}
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
-
-
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2005-12-19 22:48:06 UTC (rev =
5387)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-12-19 22:48:39 UTC (rev =
5388)
@@ -73,7 +73,6 @@
#include "pub_core_machine.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
#include "pub_core_replacemalloc.h"
#include "pub_core_scheduler.h"
#include "pub_core_signals.h"
@@ -398,8 +397,6 @@
vg_assert(sz_spill =3D=3D LibVEX_N_SPILL_BYTES);
vg_assert(a_vex + 2 * sz_vex =3D=3D a_spill);
=20
- VGP_PUSHCC(VgpRun);
-
# if defined(VGA_ppc32)
/* This is necessary due to the hacky way vex models reservations
on ppc. It's really quite incorrect for each thread to have its
@@ -459,7 +456,6 @@
vg_assert(done_this_time >=3D 0);
bbs_done +=3D (ULong)done_this_time;
=20
- VGP_POPCC(VgpRun);
return trc;
}
=20
@@ -658,8 +654,6 @@
if (VG_(clo_trace_sched))
print_sched_event(tid, "entering VG_(scheduler)"); =20
=20
- VGP_PUSHCC(VgpSched);
-
/* set the proper running signal mask */
block_signals(tid);
=20
@@ -863,8 +857,6 @@
=20
vg_assert(VG_(is_exiting)(tid));
=20
- VGP_POPCC(VgpSched);
-
//if (VG_(clo_model_pthreads))
// VG_(tm_thread_exit)(tid);
=20
@@ -1156,8 +1148,6 @@
{
ThreadId tid;
=20
- VGP_PUSHCC(VgpCoreCheapSanity);
-
if (VG_(clo_sanity_level) < 1) return;
=20
/* --- First do all the tests that we can do quickly. ---*/
@@ -1169,9 +1159,7 @@
/* Check that nobody has spuriously claimed that the first or
last 16 pages of memory have become accessible [...] */
if (VG_(needs).sanity_checks) {
- VGP_PUSHCC(VgpToolCheapSanity);
vg_assert(VG_TDICT_CALL(tool_cheap_sanity_check));
- VGP_POPCC(VgpToolCheapSanity);
}
=20
/* --- Now some more expensive checks. ---*/
@@ -1181,13 +1169,10 @@
|| VG_(clo_sanity_level) > 1
|| (VG_(clo_sanity_level) =3D=3D 1 && (sanity_fast_count % 25) =3D=3D=
0)) {
=20
- VGP_PUSHCC(VgpCoreExpensiveSanity);
sanity_slow_count++;
=20
if (VG_(needs).sanity_checks) {
- VGP_PUSHCC(VgpToolExpensiveSanity);
vg_assert(VG_TDICT_CALL(tool_expensive_sanity_check));
- VGP_POPCC(VgpToolExpensiveSanity);
}
=20
/* Look for stack overruns. Visit all threads. */
@@ -1210,20 +1195,15 @@
"of running out of stack!",
tid, remains);
}
-
- VGP_POPCC(VgpCoreExpensiveSanity);
}
=20
if (VG_(clo_sanity_level) > 1) {
- VGP_PUSHCC(VgpCoreExpensiveSanity);
/* Check sanity of the low-level memory manager. Note that bugs
in the client's code can cause this to fail, so we don't do
this check unless specially asked for. And because it's
potentially very expensive. */
VG_(sanity_check_malloc_all)();
- VGP_POPCC(VgpCoreExpensiveSanity);
}
- VGP_POPCC(VgpCoreCheapSanity);
}
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_stacktrace.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_stacktrace.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/m_stacktrace.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -37,7 +37,6 @@
#include "pub_core_libcprint.h"
#include "pub_core_machine.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
#include "pub_core_stacktrace.h"
#include "pub_core_trampoline.h"
=20
@@ -62,8 +61,6 @@
Addr fp_max;
UInt n_found =3D 0;
=20
- VGP_PUSHCC(VgpExeContext);
-
vg_assert(sizeof(Addr) =3D=3D sizeof(UWord));
vg_assert(sizeof(Addr) =3D=3D sizeof(void*));
=20
@@ -93,7 +90,6 @@
don't bomb out either. Needed to make John Regehr's
user-space threads package work. JRS 20021001 */
ips[0] =3D ip;
- VGP_POPCC(VgpExeContext);
return 1;
}=20
=20
@@ -292,7 +288,6 @@
# endif
=20
n_found =3D i;
- VGP_POPCC(VgpExeContext);
return n_found;
}
=20
Modified: trunk/coregrind/m_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_translate.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/m_translate.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -38,7 +38,6 @@
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
#include "pub_core_options.h"
-#include "pub_core_profile.h"
=20
#include "pub_core_debuginfo.h" // Needed for pub_core_redir :(
#include "pub_core_redir.h" // For VG_(code_redirect)()
@@ -586,9 +585,6 @@
vex_init_done =3D True;
}
=20
- /* profiling ... */
- VGP_PUSHCC(VgpTranslate);
-
/* Look in the code redirect table to see if we should
translate an alternative address for orig_addr. */
redir =3D VG_(code_redirect)(orig_addr);
@@ -681,8 +677,6 @@
verbosity =3D VG_(clo_trace_flags);
}
=20
- VGP_PUSHCC(VgpVexTime);
- =20
/* ------ Actually do the translation. ------ */
tl_assert2(VG_(tdict).tool_instrument,
"you forgot to set VgToolInterface function 'tool_instrume=
nt'");
@@ -732,8 +726,6 @@
vg_assert(tmpbuf_used <=3D N_TMPBUF);
vg_assert(tmpbuf_used > 0);
=20
- VGP_POPCC(VgpVexTime);
-
/* Tell aspacem of all segments that have had translations taken
from them. Optimisation: don't re-look up vge.base[0] since seg
should already point to it. */
@@ -763,8 +755,6 @@
do_self_check );
}
=20
- VGP_POPCC(VgpTranslate);
-
return True;
}
=20
Deleted: trunk/coregrind/pub_core_profile.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_profile.h 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/coregrind/pub_core_profile.h 2005-12-19 22:48:39 UTC (rev 5388)
@@ -1,50 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- The built-in profiler. pub_core_profile.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#ifndef __PUB_CORE_PROFILE_H
-#define __PUB_CORE_PROFILE_H
-
-//--------------------------------------------------------------------
-// PURPOSE: This module implements Valgrind's internal tick-and-stack-ba=
sed
-// profiler. To use it, define VG_DO_PROFILING and use --profile=3Dyes.
-// Unfortunately, it's currently broken (and has been for some time)
-// because it doesn't interact well with signal handling.
-//--------------------------------------------------------------------
-
-#include "pub_tool_profile.h"
-
-extern void VG_(init_profiling) ( void );
-extern void VG_(done_profiling) ( void );
-
-#endif // __PUB_CORE_PROFILE_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/docs/xml/writing-tools.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/xml/writing-tools.xml 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/docs/xml/writing-tools.xml 2005-12-19 22:48:39 UTC (rev 5388)
@@ -880,8 +880,8 @@
<sect2 id=3D"writing-tools.profiling" xreflabel=3D"Profiling">
<title>Profiling</title>
=20
-<para>Nb: as of 25-Mar-2005, the profiling is broken, and has been for a
-long time...</para>
+<para>To profile a tool, use Cachegrind on it. Read README_DEVELOPERS f=
or
+details on running Valgrind under Valgrind.</para>
=20
<para>To do simple tick-based profiling of a tool, include the
line:</para>
Modified: trunk/helgrind/hg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/helgrind/hg_main.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/helgrind/hg_main.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -51,7 +51,6 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h"
#include "pub_tool_replacemalloc.h"
#include "pub_tool_tooliface.h"
=20
@@ -1630,8 +1629,6 @@
"Warning: set address range state: large range %d",
len);
=20
- //VGP_PUSHCC(VgpSARP);
-
/* Remove mutexes in recycled memory range from hash */
find_mutex_range(a, a+len, cleanmx);
=20
@@ -1677,8 +1674,6 @@
VG_(printf)("init_status =3D %u\n", status);
VG_(tool_panic)("Unexpected Vge_InitStatus");
}
- =20
- //VGP_POPCC(VgpSARP);
}
=20
=20
Modified: trunk/include/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/Makefile.am 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/include/Makefile.am 2005-12-19 22:48:39 UTC (rev 5388)
@@ -21,7 +21,6 @@
pub_tool_mallocfree.h \
pub_tool_options.h \
pub_tool_oset.h \
- pub_tool_profile.h \
pub_tool_redir.h \
pub_tool_replacemalloc.h \
pub_tool_signals.h \
Modified: trunk/include/pub_tool_options.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_options.h 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/include/pub_tool_options.h 2005-12-19 22:48:39 UTC (rev 5388)
@@ -66,9 +66,6 @@
/* Verbosity level: 0 =3D silent, 1 (default), > 1 =3D more verbose. */
extern Int VG_(clo_verbosity);
=20
-/* Profile? default: NO */
-extern Bool VG_(clo_profile);
-
/* Emit all messages as XML? default: NO */
/* If clo_xml is set, various other options are set in a non-default
way. See vg_main.c and mc_main.c. */
Deleted: trunk/include/pub_tool_profile.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_profile.h 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/include/pub_tool_profile.h 2005-12-19 22:48:39 UTC (rev 5388)
@@ -1,91 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- The built-in profiler. pub_tool_profile.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#ifndef __PUB_TOOL_PROFILE_H
-#define __PUB_TOOL_PROFILE_H
-
-// Define this to turn on profiling. (But it's currently not working...=
)
-//#define VG_DO_PROFILING 1
-
-#ifdef VG_DO_PROFILING
-# define VGP_PUSHCC(x) if (VG_(clo_profile)) VG_(pushcc)(x)
-# define VGP_POPCC(x) if (VG_(clo_profile)) VG_(popcc)(x)
-#else
-# define VGP_PUSHCC(x)
-# define VGP_POPCC(x)
-#endif
-
-/* Nb: VG_(register_profile_event)() relies on VgpUnc being the first on=
e */
-#define VGP_CORE_LIST \
- /* These ones depend on the core */ \
- VGP_PAIR(VgpUnc, "unclassified"), \
- VGP_PAIR(VgpStartup, "startup"), \
- VGP_PAIR(VgpRun, "running"), \
- VGP_PAIR(VgpSched, "scheduler"), \
- VGP_PAIR(VgpMalloc, "low-lev malloc/free"), \
- VGP_PAIR(VgpCliMalloc, "client malloc/free"), \
- VGP_PAIR(VgpTranslate, "translate-main"), \
- VGP_PAIR(VgpVexTime, "Vex-time"), \
- VGP_PAIR(VgpImprove, "improve"), \
- VGP_PAIR(VgpESPUpdate, "ESP-update"), \
- VGP_PAIR(VgpSlowFindT, "slow-search-transtab"), \
- VGP_PAIR(VgpExeContext, "exe-context"), \
- VGP_PAIR(VgpReadSyms, "read-syms"), \
- VGP_PAIR(VgpSearchSyms, "search-syms"), \
- VGP_PAIR(VgpAddToT, "add-to-transtab"), \
- VGP_PAIR(VgpCoreSysWrap, "core-syscall-wrapper"), \
- VGP_PAIR(VgpDemangle, "demangle"), \
- VGP_PAIR(VgpCoreCheapSanity, "core-cheap-sanity"), \
- VGP_PAIR(VgpCoreExpensiveSanity, "core-expensive-sanity"), \
- /* These ones depend on the tool */ \
- VGP_PAIR(VgpPreCloInit, "pre-clo-init"), \
- VGP_PAIR(VgpPostCloInit, "post-clo-init"), \
- VGP_PAIR(VgpInstrument, "instrument"), \
- VGP_PAIR(VgpToolSysWrap, "tool-syscall-wrapper"), \
- VGP_PAIR(VgpToolCheapSanity, "tool-cheap-sanity"), \
- VGP_PAIR(VgpToolExpensiveSanity, "tool-expensive-sanity"), \
- VGP_PAIR(VgpFini, "fini")
-
-#define VGP_PAIR(n,name) n
-typedef enum { VGP_CORE_LIST } VgpCoreCC;
-#undef VGP_PAIR
-
-/* When registering tool profiling events, ensure that the 'n' value is =
in
- * the range (VgpFini+1..) */
-extern void VG_(register_profile_event) ( Int n, Char* name );
-
-extern void VG_(pushcc) ( UInt cc );
-extern void VG_(popcc) ( UInt cc );
-
-#endif // __PUB_TOOL_PROFILE_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/massif/ms_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/massif/ms_main.c 2005-12-19 22:48:06 UTC (rev 5387)
+++ trunk/massif/ms_main.c 2005-12-19 22:48:39 UTC (rev 5388)
@@ -46,7 +46,6 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h"
#include "pub_tool_replacemalloc.h"
#include "pub_tool_stacktrace.h"
#include "pub_tool_tooliface.h"
@@ -199,25 +198,6 @@
HP_Chunk;
=20
/*------------------------------------------------------------*/
-/*--- Profiling events ---*/
-/*------------------------------------------------------------*/
-
-typedef=20
- enum {
- VgpGetXPt =3D VgpFini+1,
- VgpGetXPtSearch,
- VgpCensus,
- VgpCensusHeap,
- VgpCensusSnapshot,
- VgpCensusTreeSize,
- VgpUpdateXCon,
- VgpCalcSpacetime2,
- VgpPrintHp,
- VgpPrintXPts,
- }
- VgpToolCC;
-
-/*------------------------------------------------------------*/
/*--- Statistics ---*/
/*------------------------------------------------------------*/
=20
@@ -442,8 +422,6 @@
UInt overestimate;
Bool reached_bottom;
=20
- VGP_PUSHCC(VgpGetXPt);
-
// Want at least clo_depth non-alloc-fn entries in the snapshot.
// However, because we have 1 or more (an unknown number, at this poi=
nt)
// alloc-fns ignored, we overestimate the size needed for the stack
@@ -490,7 +468,6 @@
// XXX: linear search, ugh -- about 10% of time for konqueror star=
tup
// XXX: tried cacheing last result, only hit about 4% for konquero=
r
// Nb: this search hits about 98% of the time for konqueror
- VGP_PUSHCC(VgpGetXPtSearch);
=20
// If we've searched/added deep enough, or run out of EIPs, this i=
s
// the bottom XPt.
@@ -518,12 +495,10 @@
if (ips[L] =3D=3D xpt->children[nC]->ip) break; // found the =
IP
nC++; // keep looking
}
- VGP_POPCC(VgpGetXPtSearch);
=20
// Return found/built bottom-XPt.
if (reached_bottom) {
tl_assert(0 =3D=3D xpt->children[nC]->n_children); // Must be=
bottom-XPt
- VGP_POPCC(VgpGetXPt);
return xpt->children[nC];
}
=20
@@ -536,8 +511,6 @@
// Update 'curr_space' of every XPt in the XCon, by percolating upwards.
static void update_XCon(XPt* xpt, Int space_delta)
{
- VGP_PUSHCC(VgpUpdateXCon);
-
tl_assert(True =3D=3D clo_heap);
tl_assert(0 !=3D space_delta);
tl_assert(NULL !=3D xpt);
@@ -550,8 +523,6 @@
}=20
if (space_delta < 0) tl_assert(alloc_xpt->curr_space >=3D -space_delt=
a);
alloc_xpt->curr_space +=3D space_delta;
-
- VGP_POPCC(VgpUpdateXCon);
}
=20
// Actually want a reverse sort, biggest to smallest
@@ -668,8 +639,6 @@
Bool custom_alloc =3D (NULL =3D=3D p);
if (size < 0) return NULL;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
// Update statistics
n_allocs++;
if (0 =3D=3D size) n_zero_allocs++;
@@ -678,7 +647,6 @@
if (!p) {
p =3D VG_(cli_malloc)( align, size );
if (!p) {
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
if (is_zeroed) VG_(memset)(p, 0, size);
@@ -700,7 +668,6 @@
// do a census!
hp_census(); =20
=20
- VGP_POPCC(VgpCliMalloc);
return p;
}
=20
@@ -709,8 +676,6 @@
{
HP_Chunk* hc;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
// Update statistics
n_frees++;
=20
@@ -732,8 +697,6 @@
=20
// do a census!
hp_census();
-
- VGP_POPCC(VgpCliMalloc);
}
=20
=20
@@ -784,12 +747,9 @@
SizeT old_size;
XPt *old_where, *new_where;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
// Remove the old block
hc =3D VG_(HT_remove)(malloc_list, (UWord)p_old);
if (hc =3D=3D NULL) {
- VGP_POPCC(VgpCliMalloc);
return NULL; // must have been a bogus realloc()
}
=20
@@ -831,7 +791,6 @@
// than growing it, and this way simplifies the growing case.
VG_(HT_add_node)(malloc_list, hc);
=20
- VGP_POPCC(VgpCliMalloc);
return p_new;
}
=20
@@ -974,14 +933,11 @@
Int ms_time, ms_time_since_prev;
Census* census;
=20
- VGP_PUSHCC(VgpCensus);
-
// Only do a census if it's time
ms_time =3D VG_(read_millisecond_timer)();
ms_time_since_prev =3D ms_time - ms_prev_census;
if (ms_time < ms_next_census) {
n_fake_censi++;
- VGP_POPCC(VgpCensus);
return;
}
n_real_censi++;
@@ -1007,8 +963,6 @@
VG_(ssort)(alloc_xpt->children, alloc_xpt->n_children, sizeof(XPt*=
),
XPt_cmp_approx_ST);
=20
- VGP_PUSHCC(VgpCensusHeap);
-
// For each significant top-level XPt, record space info about its
// entire XTree, in a single census entry.
// Nb: the xtree_size count/snapshot buffer allocation, and the ac=
tual
@@ -1018,9 +972,7 @@
UInt xtree_size, xtree_size2;
// VG_(printf)("%7u ", alloc_xpt->children[i]->approx_ST);
// Count how many XPts are in the XTree
- VGP_PUSHCC(VgpCensusTreeSize);
xtree_size =3D get_xtree_size( alloc_xpt->children[i], 0 );
- VGP_POPCC(VgpCensusTreeSize);
=20
// If no XPts counted (ie. alloc_xpt.curr_space=3D=3D0 or XTree
// insignificant) then don't take any more snapshots.
@@ -1039,18 +991,14 @@
// (Except for ones with curr_space=3D=3D0, which wouldn't cont=
ribute
// to the final exact_ST_dbld calculation anyway; excluding th=
em
// saves a lot of memory and up to 40% time with big --depth va=
lus.
- VGP_PUSHCC(VgpCensusSnapshot);
xtree_size2 =3D do_space_snapshot(alloc_xpt->children[i],
census->xtree_snapshots[i], 0);
tl_assert(xtree_size =3D=3D xtree_size2);
- VGP_POPCC(VgpCensusSnapshot);
}
// VG_(printf)("\n\n");
// Zero-terminate 'xtree_snapshot' array
census->xtree_snapshots[i] =3D NULL;
=20
- VGP_POPCC(VgpCensusHeap);
-
//VG_(printf)("printed %d censi\n", K);
=20
// Lump the rest into a single "others" entry.
@@ -1097,8 +1045,6 @@
//ms_next_census +=3D ms_interval;
=20
//VG_(printf)("Next: %d ms\n", ms_next_census);
-
- VGP_POPCC(VgpCensus);
}=20
=20
/*------------------------------------------------------------*/
@@ -1227,8 +1173,6 @@
{
UInt i, N =3D curr_census;
=20
- VGP_PUSHCC(VgpCalcSpacetime2);
-
*heap2 =3D 0;
*heap_admin2 =3D 0;
*stack2 =3D 0;
@@ -1250,8 +1194,6 @@
*heap2 /=3D 2;
*heap_admin2 /=3D 2;
*stack2 /=3D 2;
-
- VGP_POPCC(VgpCalcSpacetime2);
}
=20
/*------------------------------------------------------------*/
@@ -1333,8 +1275,6 @@
Char* cmdbuf;
Int cmdlen;
=20
- VGP_PUSHCC(VgpPrintHp);
- =20
// Open file
hp_file =3D make_filename( base_dir, ".hp" );
ps_file =3D make_filename( base_dir, ".ps" );
@@ -1343,7 +1283,6 @@
VKI_S_IRUSR|VKI_S_IWUSR);
if (sres.isError) {
file_err( hp_file );
- VGP_POPCC(VgpPrintHp);
return;
} else {
fd =3D sres.val;
@@ -1426,8 +1365,6 @@
VG_(free)(hp_file);
VG_(free)(ps_file);
VG_(free)(aux_file);
-
- VGP_POPCC(VgpPrintHp);
}
=20
/*------------------------------------------------------------*/
@@ -1651,8 +1588,6 @@
Char* text_file;
Char* maybe_p =3D ( XHTML =3D=3D clo_format ? "<p>" : "" );
=20
- VGP_PUSHCC(VgpPrintXPts);
-
// Open file
text_file =3D make_filename( base_dir,=20
( XText =3D=3D clo_format ? ".txt" : ".htm=
l" ) );
@@ -1661,7 +1596,6 @@
VKI_S_IRUSR|VKI_S_IWUSR);
if (sres.isError) {
file_err( text_file );
- VGP_POPCC(VgpPrintXPts);
return;
} else {
fd =3D sres.val;
@@ -1693,8 +1627,6 @@
=20
tl_assert(fd >=3D 0);
VG_(close)(fd);
-
- VGP_POPCC(VgpPrintXPts);
}
=20
/*------------------------------------------------------------*/
@@ -1813,18 +1745,6 @@
VG_(track_new_mem_stack_signal)( new_mem_stack_signal );
VG_(track_die_mem_stack_signal)( die_mem_stack_signal );
=20
- // Profiling events
- VG_(register_profile_event)(VgpGetXPt, "get-XPt");
- VG_(register_profile_event)(VgpGetXPtSearch, "get-XPt-search");
- VG_(register_profile_event)(VgpCensus, "census");
- VG_(register_profile_event)(VgpCensusHeap, "census-heap");
- VG_(register_profile_event)(VgpCensusSnapshot, "census-snapshot");
- VG_(register_profile_event)(VgpCensusTreeSize, "census-treesize");
- VG_(register_profile_event)(VgpUpdateXCon, "update-XCon");
- VG_(register_profile_event)(VgpCalcSpacetime2, "calc-exact_ST_dbld");
- VG_(register_profile_event)(VgpPrintHp, "print-hp");
- VG_(register_profile_event)(VgpPrintXPts, "print-XPts");
-
// HP_Chunks
malloc_list =3D VG_(HT_construct)( 80021 ); // prime, big
=20
Modified: trunk/none/tests/cmdline2.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/cmdline2.stdout.exp 2005-12-19 22:48:06 UTC (rev 538=
7)
+++ trunk/none/tests/cmdline2.stdout.exp 2005-12-19 22:48:39 UTC (rev 538=
8)
@@ -46,7 +46,6 @@
=20
debugging options for all Valgrind tools:
--sanity-level=3D<number> level of sanity checking to do [1]
- --profile=3Dno|yes profile? (tool must be built for it) [no=
]
--trace-flags=3D<XXXXXXXX> show generated code? (X =3D 0|1) [00000=
000]
--profile-flags=3D<XXXXXXXX> ditto, but for profiling (X =3D 0|1) [0=
0000000]
--trace-notbelow=3D<number> only show BBs above <number> [0]
|
|
From: <sv...@va...> - 2005-12-19 22:48:12
|
Author: njn
Date: 2005-12-19 22:48:06 +0000 (Mon, 19 Dec 2005)
New Revision: 5387
Log:
Remove remaining profiling gunk from Memcheck.
Modified:
trunk/memcheck/mac_leakcheck.c
trunk/memcheck/mac_malloc_wrappers.c
trunk/memcheck/mac_replace_strmem.c
trunk/memcheck/mac_shared.c
trunk/memcheck/mac_shared.h
trunk/memcheck/mc_main.c
trunk/memcheck/mc_translate.c
Modified: trunk/memcheck/mac_leakcheck.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_leakcheck.c 2005-12-19 22:28:58 UTC (rev 5386)
+++ trunk/memcheck/mac_leakcheck.c 2005-12-19 22:48:06 UTC (rev 5387)
@@ -42,7 +42,6 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h" // For mac_shared.h
#include "pub_tool_signals.h"
=20
#include "mac_shared.h"
Modified: trunk/memcheck/mac_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_malloc_wrappers.c 2005-12-19 22:28:58 UTC (rev 538=
6)
+++ trunk/memcheck/mac_malloc_wrappers.c 2005-12-19 22:48:06 UTC (rev 538=
7)
@@ -39,7 +39,6 @@
#include "pub_tool_libcprint.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h" // For mac_shared.h
#include "pub_tool_replacemalloc.h"
#include "pub_tool_threadstate.h"
#include "mac_shared.h"
Modified: trunk/memcheck/mac_replace_strmem.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_replace_strmem.c 2005-12-19 22:28:58 UTC (rev 5386=
)
+++ trunk/memcheck/mac_replace_strmem.c 2005-12-19 22:48:06 UTC (rev 5387=
)
@@ -32,7 +32,6 @@
=20
#include "pub_tool_basics.h"
#include "pub_tool_hashtable.h"
-#include "pub_tool_profile.h"
#include "pub_tool_redir.h"
#include "pub_tool_tooliface.h"
#include "valgrind.h"
Modified: trunk/memcheck/mac_shared.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_shared.c 2005-12-19 22:28:58 UTC (rev 5386)
+++ trunk/memcheck/mac_shared.c 2005-12-19 22:48:06 UTC (rev 5387)
@@ -40,7 +40,6 @@
#include "pub_tool_mallocfree.h"
#include "pub_tool_machine.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h" // For mac_shared.h
#include "pub_tool_replacemalloc.h"
#include "pub_tool_threadstate.h"
#include "mac_shared.h"
Modified: trunk/memcheck/mac_shared.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_shared.h 2005-12-19 22:28:58 UTC (rev 5386)
+++ trunk/memcheck/mac_shared.h 2005-12-19 22:48:06 UTC (rev 5387)
@@ -157,17 +157,9 @@
=20
=20
/*------------------------------------------------------------*/
-/*--- Profiling of tools and memory events ---*/
+/*--- Profiling of memory events ---*/
/*------------------------------------------------------------*/
=20
-typedef=20
- enum {=20
- VgpCheckMem =3D VgpFini+1,
- VgpSetMem,
- VgpESPAdj
- }=20
- VgpToolCC;
-
/* Define to collect detailed performance info. */
/* #define MAC_PROFILE_MEMORY */
=20
Modified: trunk/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_main.c 2005-12-19 22:28:58 UTC (rev 5386)
+++ trunk/memcheck/mc_main.c 2005-12-19 22:48:06 UTC (rev 5387)
@@ -47,7 +47,6 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_profile.h" // For mac_shared.h
#include "pub_tool_replacemalloc.h"
#include "pub_tool_tooliface.h"
#include "pub_tool_threadstate.h"
@@ -2671,10 +2670,6 @@
VG_(track_post_reg_write) ( & mc_post_reg_write );
VG_(track_post_reg_write_clientcall_return)( & mc_post_reg_write_clie=
ntcall );
=20
- VG_(register_profile_event) ( VgpSetMem, "set-mem-perms" );
- VG_(register_profile_event) ( VgpCheckMem, "check-mem-perms" );
- VG_(register_profile_event) ( VgpESPAdj, "adjust-ESP" );
-
/* Additional block description for VG_(describe_addr)() */
MAC_(describe_addr_supp) =3D client_perm_maybe_describe;
=20
Modified: trunk/memcheck/mc_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_translate.c 2005-12-19 22:28:58 UTC (rev 5386)
+++ trunk/memcheck/mc_translate.c 2005-12-19 22:48:06 UTC (rev 5387)
@@ -33,7 +33,6 @@
#include "pub_tool_hashtable.h" // For mac_shared.h
#include "pub_tool_libcassert.h"
#include "pub_tool_libcprint.h"
-#include "pub_tool_profile.h"
#include "pub_tool_tooliface.h"
#include "mc_include.h"
=20
|
|
From: <sv...@va...> - 2005-12-19 22:29:06
|
Author: njn
Date: 2005-12-19 22:28:58 +0000 (Mon, 19 Dec 2005)
New Revision: 5386
Log:
Merge 5385 from trunk -- remove VGP profiling gunk from Memcheck.
Modified:
branches/COMPVBITS/memcheck/mc_main.c
branches/COMPVBITS/memcheck/mc_malloc_wrappers.c
Modified: branches/COMPVBITS/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 22:23:35 UTC (rev 53=
85)
+++ branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 22:28:58 UTC (rev 53=
86)
@@ -1600,8 +1600,6 @@
Bool ok;
Addr bad_addr;
=20
- VGP_PUSHCC(VgpCheckMem);
-
/* VG_(message)(Vg_DebugMsg,"check is writable: %x .. %x",
base,base+size-1); */
ok =3D mc_check_writable ( base, size, &bad_addr );
@@ -1621,8 +1619,6 @@
VG_(tool_panic)("mc_check_is_writable: unexpected CorePart");
}
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1632,8 +1628,6 @@
Addr bad_addr;
MC_ReadResult res;
=20
- VGP_PUSHCC(VgpCheckMem);
- =20
res =3D mc_check_readable ( base, size, &bad_addr );
=20
if (0)
@@ -1663,7 +1657,6 @@
VG_(tool_panic)("mc_check_is_readable: unexpected CorePart");
}
}
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1674,16 +1667,12 @@
Addr bad_addr =3D 0; // shut GCC up
/* VG_(message)(Vg_DebugMsg,"check is readable asciiz: 0x%x",str); */
=20
- VGP_PUSHCC(VgpCheckMem);
-
tl_assert(part =3D=3D Vg_CoreSysCall);
res =3D mc_check_readable_asciiz ( (Addr)str, &bad_addr );
if (MC_Ok !=3D res) {
Bool isUnaddr =3D ( MC_AddrErr =3D=3D res ? True : False );
mc_record_param_error ( tid, bad_addr, /*isReg*/False, isUnaddr, s=
);
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
Modified: branches/COMPVBITS/memcheck/mc_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_malloc_wrappers.c 2005-12-19 22:23:35 =
UTC (rev 5385)
+++ branches/COMPVBITS/memcheck/mc_malloc_wrappers.c 2005-12-19 22:28:58 =
UTC (rev 5386)
@@ -180,7 +180,6 @@
Addr p, SizeT size, SizeT align, UInt rzB,
Bool is_zeroed, MC_AllocKind kind, VgHashTable t=
able)
{
- VGP_PUSHCC(VgpCliMalloc);
cmalloc_n_mallocs ++;
=20
// Allocate and zero if necessary
@@ -190,7 +189,6 @@
tl_assert(MC_AllocCustom !=3D kind);
p =3D (Addr)VG_(cli_malloc)( align, size );
if (!p) {
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
if (is_zeroed) VG_(memset)((void*)p, 0, size);
@@ -205,8 +203,6 @@
MC_(new_mem_heap)( p, size, is_zeroed );
MC_(ban_mem_heap)( p+size, rzB );
=20
- VGP_POPCC(VgpCliMalloc);
-
return (void*)p;
}
=20
@@ -289,8 +285,6 @@
{
MC_Chunk* mc;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees++;
=20
mc =3D VG_(HT_remove) ( MC_(malloc_list), (UWord)p );
@@ -303,8 +297,6 @@
}
die_and_free_mem ( tid, mc, rzB );
}
-
- VGP_POPCC(VgpCliMalloc);
}
=20
void MC_(free) ( ThreadId tid, void* p )
@@ -331,8 +323,6 @@
void* p_new;
SizeT old_size;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees ++;
cmalloc_n_mallocs ++;
cmalloc_bs_mallocd +=3D new_size;
@@ -345,7 +335,6 @@
if (mc =3D=3D NULL) {
MC_(record_free_error) ( tid, (Addr)p_old );
/* We return to the program regardless. */
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
=20
@@ -405,7 +394,6 @@
// than growing it, and this way simplifies the growing case.
VG_(HT_add_node)( MC_(malloc_list), mc );
=20
- VGP_POPCC(VgpCliMalloc);
return p_new;
}
=20
|
|
From: <sv...@va...> - 2005-12-19 22:23:39
|
Author: njn
Date: 2005-12-19 22:23:35 +0000 (Mon, 19 Dec 2005)
New Revision: 5385
Log:
Remove the old profiling stuff from Memcheck.
Modified:
trunk/memcheck/mac_malloc_wrappers.c
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mac_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_malloc_wrappers.c 2005-12-19 21:27:58 UTC (rev 538=
4)
+++ trunk/memcheck/mac_malloc_wrappers.c 2005-12-19 22:23:35 UTC (rev 538=
5)
@@ -181,7 +181,6 @@
Addr p, SizeT size, SizeT align, UInt rzB,
Bool is_zeroed, MAC_AllocKind kind, VgHashTable =
table)
{
- VGP_PUSHCC(VgpCliMalloc);
cmalloc_n_mallocs ++;
=20
// Allocate and zero if necessary
@@ -191,7 +190,6 @@
tl_assert(MAC_AllocCustom !=3D kind);
p =3D (Addr)VG_(cli_malloc)( align, size );
if (!p) {
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
if (is_zeroed) VG_(memset)((void*)p, 0, size);
@@ -206,8 +204,6 @@
MAC_(new_mem_heap)( p, size, is_zeroed );
MAC_(ban_mem_heap)( p+size, rzB );
=20
- VGP_POPCC(VgpCliMalloc);
-
return (void*)p;
}
=20
@@ -290,8 +286,6 @@
{
MAC_Chunk* mc;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees++;
=20
mc =3D VG_(HT_remove) ( MAC_(malloc_list), (UWord)p );
@@ -304,8 +298,6 @@
}
die_and_free_mem ( tid, mc, rzB );
}
-
- VGP_POPCC(VgpCliMalloc);
}
=20
void MAC_(free) ( ThreadId tid, void* p )
@@ -332,8 +324,6 @@
void* p_new;
SizeT old_size;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees ++;
cmalloc_n_mallocs ++;
cmalloc_bs_mallocd +=3D new_size;
@@ -346,7 +336,6 @@
if (mc =3D=3D NULL) {
MAC_(record_free_error) ( tid, (Addr)p_old );
/* We return to the program regardless. */
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
=20
@@ -406,7 +395,6 @@
// than growing it, and this way simplifies the growing case.
VG_(HT_add_node)( MAC_(malloc_list), mc );
=20
- VGP_POPCC(VgpCliMalloc);
return p_new;
}
=20
Modified: trunk/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_main.c 2005-12-19 21:27:58 UTC (rev 5384)
+++ trunk/memcheck/mc_main.c 2005-12-19 22:23:35 UTC (rev 5385)
@@ -1184,8 +1184,6 @@
Bool ok;
Addr bad_addr;
=20
- VGP_PUSHCC(VgpCheckMem);
-
/* VG_(message)(Vg_DebugMsg,"check is writable: %x .. %x",
base,base+size-1); */
ok =3D mc_check_writable ( base, size, &bad_addr );
@@ -1205,8 +1203,6 @@
VG_(tool_panic)("mc_check_is_writable: unexpected CorePart");
}
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1216,8 +1212,6 @@
Addr bad_addr;
MC_ReadResult res;
=20
- VGP_PUSHCC(VgpCheckMem);
- =20
res =3D mc_check_readable ( base, size, &bad_addr );
=20
if (0)
@@ -1247,7 +1241,6 @@
VG_(tool_panic)("mc_check_is_readable: unexpected CorePart");
}
}
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1258,16 +1251,12 @@
Addr bad_addr =3D 0; // shut GCC up
/* VG_(message)(Vg_DebugMsg,"check is readable asciiz: 0x%x",str); */
=20
- VGP_PUSHCC(VgpCheckMem);
-
tl_assert(part =3D=3D Vg_CoreSysCall);
res =3D mc_check_readable_asciiz ( (Addr)str, &bad_addr );
if (MC_Ok !=3D res) {
Bool isUnaddr =3D ( MC_AddrErr =3D=3D res ? True : False );
MAC_(record_param_error) ( tid, bad_addr, /*isReg*/False, isUnaddr=
, s );
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
|
|
From: <sv...@va...> - 2005-12-19 21:28:04
|
Author: njn
Date: 2005-12-19 21:27:58 +0000 (Mon, 19 Dec 2005)
New Revision: 5384
Log:
Fix for bug #117096.
Modified:
trunk/coregrind/m_main.c
trunk/docs/internals/3_1_BUGSTATUS.txt
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-12-19 19:40:58 UTC (rev 5383)
+++ trunk/coregrind/m_main.c 2005-12-19 21:27:58 UTC (rev 5384)
@@ -1027,8 +1027,11 @@
=20
static Bool process_cmd_line_options( UInt* client_auxv, const char* too=
lname )
{
+ // VG_(clo_log_fd) is used by all the messaging. It starts as 2 (std=
err)
+ // and we cannot change it until we know what we are changing it to i=
s
+ // ok. So we have tmp_log_fd to hold the tmp fd prior to that point.
SysRes sres;
- Int i, eventually_log_fd;
+ Int i, tmp_log_fd;
Int toolname_len =3D VG_(strlen)(toolname);
enum {
VgLogTo_Fd,
@@ -1038,7 +1041,7 @@
} log_to =3D VgLogTo_Fd; // Where is logging output to be sent?
=20
/* log to stderr by default, but usage message goes to stdout */
- eventually_log_fd =3D 2;=20
+ tmp_log_fd =3D 2;=20
=20
/* Check for sane path in ./configure --prefix=3D... */
if (VG_LIBDIR[0] !=3D '/')=20
@@ -1147,7 +1150,7 @@
else if (VG_CLO_STREQN(9, arg, "--log-fd=3D")) {
log_to =3D VgLogTo_Fd;
VG_(clo_log_name) =3D NULL;
- eventually_log_fd =3D (Int)VG_(atoll)(&arg[9]);
+ tmp_log_fd =3D (Int)VG_(atoll)(&arg[9]);
}
=20
else if (VG_CLO_STREQN(11, arg, "--log-file=3D")) {
@@ -1322,7 +1325,6 @@
=20
case VgLogTo_Fd:=20
vg_assert(VG_(clo_log_name) =3D=3D NULL);
- VG_(clo_log_fd) =3D eventually_log_fd;
break;
=20
case VgLogTo_File: {
@@ -1361,13 +1363,11 @@
seqtxt );
=20
// EXCL: it will fail with EEXIST if the file already exists=
.
- sres
- =3D VG_(open)(logfilename,=20
- VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_TRUNC,=20
- VKI_S_IRUSR|VKI_S_IWUSR);
+ sres =3D VG_(open)(logfilename,=20
+ VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_T=
RUNC,=20
+ VKI_S_IRUSR|VKI_S_IWUSR);
if (!sres.isError) {
- eventually_log_fd =3D sres.val;
- VG_(clo_log_fd) =3D VG_(safe_fd)(eventually_log_fd);
+ tmp_log_fd =3D sres.val;
break; /* for (;;) */
} else {
// If the file already existed, we try the next name. If=
it
@@ -1389,13 +1389,11 @@
vg_assert(VG_(clo_log_name) !=3D NULL);
vg_assert(VG_(strlen)(VG_(clo_log_name)) <=3D 900); /* paranoia=
*/
=20
- sres
- =3D VG_(open)(VG_(clo_log_name),
- VKI_O_CREAT|VKI_O_WRONLY|VKI_O_TRUNC,=20
- VKI_S_IRUSR|VKI_S_IWUSR);
+ sres =3D VG_(open)(VG_(clo_log_name),
+ VKI_O_CREAT|VKI_O_WRONLY|VKI_O_TRUNC,=20
+ VKI_S_IRUSR|VKI_S_IWUSR);
if (!sres.isError) {
- eventually_log_fd =3D sres.val;
- VG_(clo_log_fd) =3D VG_(safe_fd)(eventually_log_fd);
+ tmp_log_fd =3D sres.val;
} else {
VG_(message)(Vg_UserMsg,=20
"Can't create/open log file '%s'; giving up!",=20
@@ -1410,8 +1408,8 @@
case VgLogTo_Socket: {
vg_assert(VG_(clo_log_name) !=3D NULL);
vg_assert(VG_(strlen)(VG_(clo_log_name)) <=3D 900); /* paranoia=
*/
- eventually_log_fd =3D VG_(connect_via_socket)( VG_(clo_log_name=
) );
- if (eventually_log_fd =3D=3D -1) {
+ tmp_log_fd =3D VG_(connect_via_socket)( VG_(clo_log_name) );
+ if (tmp_log_fd =3D=3D -1) {
VG_(message)(Vg_UserMsg,=20
"Invalid --log-socket=3Dipaddr or --log-socket=3Dipaddr:p=
ort spec");=20
VG_(message)(Vg_UserMsg,=20
@@ -1420,7 +1418,7 @@
"--log-socket=3D");
/*NOTREACHED*/
}
- if (eventually_log_fd =3D=3D -2) {
+ if (tmp_log_fd =3D=3D -2) {
VG_(message)(Vg_UserMsg,=20
"valgrind: failed to connect to logging server '%s'.",
VG_(clo_log_name) );=20
@@ -1430,9 +1428,9 @@
"" );
/* We don't change anything here. */
vg_assert(VG_(clo_log_fd) =3D=3D 2);
+ tmp_log_fd =3D 2;
} else {
- vg_assert(eventually_log_fd > 0);
- VG_(clo_log_fd) =3D eventually_log_fd;
+ vg_assert(tmp_log_fd > 0);
VG_(logging_to_socket) =3D True;
}
break;
@@ -1450,17 +1448,20 @@
/*NOTREACHED*/
}
=20
- // Move log_fd into the safe range, so it doesn't conflict with any a=
pp fds.
- // XXX: this is more or less duplicating the behaviour of the calls t=
o
- // VG_(safe_fd)() above, although this does not close the original fd=
.
- // Perhaps the VG_(safe_fd)() calls above should be removed, and this
- // code should be replaced with a call to VG_(safe_fd)(). --njn
- eventually_log_fd =3D VG_(fcntl)(VG_(clo_log_fd), VKI_F_DUPFD, VG_(fd=
_hard_limit));
- if (eventually_log_fd < 0)
- VG_(message)(Vg_UserMsg, "valgrind: failed to move logfile fd into=
safe range");
- else {
- VG_(clo_log_fd) =3D eventually_log_fd;
- VG_(fcntl)(VG_(clo_log_fd), VKI_F_SETFD, VKI_FD_CLOEXEC);
+ if (tmp_log_fd >=3D 0) {
+ // Move log_fd into the safe range, so it doesn't conflict with an=
y app fds.
+ tmp_log_fd =3D VG_(fcntl)(tmp_log_fd, VKI_F_DUPFD, VG_(fd_hard_lim=
it));
+ if (tmp_log_fd < 0) {
+ VG_(message)(Vg_UserMsg, "valgrind: failed to move logfile fd i=
nto safe range, using stderr");
+ VG_(clo_log_fd) =3D 2; // stderr
+ } else {
+ VG_(clo_log_fd) =3D tmp_log_fd;
+ VG_(fcntl)(VG_(clo_log_fd), VKI_F_SETFD, VKI_FD_CLOEXEC);
+ }
+ } else {
+ // If they said --log-fd=3D-1, don't print anything. Plausible fo=
r use in
+ // regression testing suites that use client requests to count err=
ors.
+ VG_(clo_log_fd) =3D tmp_log_fd;
}
=20
if (VG_(clo_n_suppressions) < VG_CLO_MAX_SFILES-1 &&
Modified: trunk/docs/internals/3_1_BUGSTATUS.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/internals/3_1_BUGSTATUS.txt 2005-12-19 19:40:58 UTC (rev 5=
383)
+++ trunk/docs/internals/3_1_BUGSTATUS.txt 2005-12-19 21:27:58 UTC (rev 5=
384)
@@ -29,3 +29,4 @@
v5368 pending n-i-bz More space for debugger cmd line (Dan Thale=
r)
v5378/80 v5379/81 n-i-bz Clarified leak checker output message
v5382 pending n-i-bz AshleyP's --gen-suppressions output fix
+v5384 wontfix 117096 Weird errors when --log-fd=3D has invalid v=
alue
|
|
From: Nicholas N. <nj...@cs...> - 2005-12-19 19:57:33
|
On Tue, 6 Dec 2005, Julian Seward wrote: > I ran it for 3 cpu minutes (set update interval to 0.3s, let it > grind away) and it did slowly edge up through 42M Virtual. > I'd guess this is the freed blocks queue slowly filling up, > particularly as top is evidently turning over memory at a > modest rate: > > ==29838== malloc/free: in use at exit: 66,287 bytes in 119 blocks. > ==29838== malloc/free: 1,763 allocs, 1,644 frees, 1,257,443 bytes allocated. > > If the same thing happens with --freelist-vol=0 then it maybe > really is a leak. With --freelist-vol=0 it doesn't grow at all. So definitely a false alarm. Nick |
|
From: <sv...@va...> - 2005-12-19 19:41:01
|
Author: njn Date: 2005-12-19 19:40:58 +0000 (Mon, 19 Dec 2005) New Revision: 5383 Log: Bugfix update Modified: trunk/docs/internals/3_1_BUGSTATUS.txt Modified: trunk/docs/internals/3_1_BUGSTATUS.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/3_1_BUGSTATUS.txt 2005-12-19 19:40:12 UTC (rev 5= 382) +++ trunk/docs/internals/3_1_BUGSTATUS.txt 2005-12-19 19:40:58 UTC (rev 5= 383) @@ -27,3 +27,5 @@ v5366/67/70 pending n-i-bz AshleyP's custom-allocator assertion vx1501 pending n-i-bz Dirk strict-aliasing stuff v5368 pending n-i-bz More space for debugger cmd line (Dan Thale= r) +v5378/80 v5379/81 n-i-bz Clarified leak checker output message +v5382 pending n-i-bz AshleyP's --gen-suppressions output fix |
|
From: Nicholas N. <nj...@cs...> - 2005-12-19 19:40:38
|
On Tue, 13 Dec 2005, as...@qu... wrote:
> I've attached a patch to fix up a small error in the valgrind output
> when using --gen-suppressions=all. It removes the spurious "{ <insert
> a suppression name here>" lines shown below.
Committed, thanks.
Nick
|
|
From: <sv...@va...> - 2005-12-19 19:40:16
|
Author: njn
Date: 2005-12-19 19:40:12 +0000 (Mon, 19 Dec 2005)
New Revision: 5382
Log:
Fix a minor --gen-suppressions output bug.
Modified:
trunk/coregrind/m_errormgr.c
Modified: trunk/coregrind/m_errormgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_errormgr.c 2005-12-19 19:38:43 UTC (rev 5381)
+++ trunk/coregrind/m_errormgr.c 2005-12-19 19:40:12 UTC (rev 5382)
@@ -404,19 +404,21 @@
if (stop_at > VG_MAX_SUPP_CALLERS) stop_at =3D VG_MAX_SUPP_CALLERS;
vg_assert(stop_at > 0);
=20
- VG_(printf)("{\n");
- VG_(printf)(" <insert a suppression name here>\n");
-
if (ThreadErr =3D=3D err->ekind || MutexErr =3D=3D err->ekind) {
+ VG_(printf)("{\n");
+ VG_(printf)(" <insert a suppression name here>\n");
VG_(printf)(" core:PThread\n");
=20
} else {
Char* name =3D VG_TDICT_CALL(tool_get_error_name, err);
if (NULL =3D=3D name) {
VG_(message)(Vg_UserMsg,=20
- "(tool does not allow error to be suppressed)");
+ "(%s does not allow error to be suppressed)",
+ VG_(details).name);
return;
}
+ VG_(printf)("{\n");
+ VG_(printf)(" <insert a suppression name here>\n");
VG_(printf)(" %s:%s\n", VG_(details).name, name);
VG_TDICT_CALL(tool_print_extra_suppression_info, err);
}
|
|
From: <sv...@va...> - 2005-12-19 19:38:52
|
Author: njn Date: 2005-12-19 19:38:43 +0000 (Mon, 19 Dec 2005) New Revision: 5381 Log: update (r5380 from trunk) Modified: branches/VALGRIND_3_1_BRANCH/docs/xml/FAQ.xml Modified: branches/VALGRIND_3_1_BRANCH/docs/xml/FAQ.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/VALGRIND_3_1_BRANCH/docs/xml/FAQ.xml 2005-12-19 19:38:02 UTC= (rev 5380) +++ branches/VALGRIND_3_1_BRANCH/docs/xml/FAQ.xml 2005-12-19 19:38:43 UTC= (rev 5381) @@ -410,7 +410,7 @@ functions, such as malloc(), with their own versions. A key indicator= of this is if Memcheck says: <programlisting> -No malloc'd blocks -- no leaks are possible +All heap blocks were freed -- no leaks are possible </programlisting> when you know your program calls malloc(). The workaround is to avoid statically linking your program.</para> |
|
From: <sv...@va...> - 2005-12-19 19:38:05
|
Author: njn
Date: 2005-12-19 19:38:02 +0000 (Mon, 19 Dec 2005)
New Revision: 5380
Log:
update
Modified:
trunk/docs/xml/FAQ.xml
Modified: trunk/docs/xml/FAQ.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/xml/FAQ.xml 2005-12-19 19:35:13 UTC (rev 5379)
+++ trunk/docs/xml/FAQ.xml 2005-12-19 19:38:02 UTC (rev 5380)
@@ -409,7 +409,7 @@
certain functions, such as malloc(), with their own versions. A key
indicator of this is if Memcheck says:
<programlisting>
-No malloc'd blocks -- no leaks are possible
+All heap blocks were freed -- no leaks are possible
</programlisting>
when you know your program calls malloc(). The workaround is to
avoid statically linking your program.</para>
|
|
From: <sv...@va...> - 2005-12-19 19:35:21
|
Author: njn
Date: 2005-12-19 19:35:13 +0000 (Mon, 19 Dec 2005)
New Revision: 5379
Log:
Merge r5378 (leak checker output change) from trunk.
Modified:
branches/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.c
Modified: branches/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.c 2005-12-19 19:3=
3:36 UTC (rev 5378)
+++ branches/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.c 2005-12-19 19:3=
5:13 UTC (rev 5379)
@@ -709,7 +709,7 @@
tl_assert(lc_shadows =3D=3D NULL);
if (VG_(clo_verbosity) >=3D 1 && !VG_(clo_xml)) {
VG_(message)(Vg_UserMsg,=20
- "No malloc'd blocks -- no leaks are possible.");
+ "All heap blocks were freed -- no leaks are possib=
le.");
}
return;
}
|
|
From: <sv...@va...> - 2005-12-19 19:33:48
|
Author: njn
Date: 2005-12-19 19:33:36 +0000 (Mon, 19 Dec 2005)
New Revision: 5378
Log:
Clarify leak checker output.
Modified:
trunk/memcheck/mac_leakcheck.c
Modified: trunk/memcheck/mac_leakcheck.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_leakcheck.c 2005-12-19 19:26:40 UTC (rev 5377)
+++ trunk/memcheck/mac_leakcheck.c 2005-12-19 19:33:36 UTC (rev 5378)
@@ -719,7 +719,7 @@
tl_assert(lc_shadows =3D=3D NULL);
if (VG_(clo_verbosity) >=3D 1 && !VG_(clo_xml)) {
VG_(message)(Vg_UserMsg,=20
- "No malloc'd blocks -- no leaks are possible.");
+ "All heap blocks were freed -- no leaks are possib=
le.");
}
return;
}
|
|
From: <sv...@va...> - 2005-12-19 19:26:46
|
Author: njn
Date: 2005-12-19 19:26:40 +0000 (Mon, 19 Dec 2005)
New Revision: 5377
Log:
Merge in r5366/6377/5370 from trunk, which fix minor leak checker bugs.
Modified:
branches/COMPVBITS/memcheck/mc_leakcheck.c
Modified: branches/COMPVBITS/memcheck/mc_leakcheck.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_leakcheck.c 2005-12-19 19:15:04 UTC (r=
ev 5376)
+++ branches/COMPVBITS/memcheck/mc_leakcheck.c 2005-12-19 19:26:40 UTC (r=
ev 5377)
@@ -116,10 +116,10 @@
*/
typedef=20
enum {=20
- Unreached,=20
- IndirectLeak,
- Interior,=20
- Proper
+ Unreached =3D0,=20
+ IndirectLeak =3D1,
+ Interior =3D2,=20
+ Proper =3D3
}
Reachedness;
=20
@@ -533,7 +533,17 @@
lc_do_leakcheck(i);
=20
tl_assert(lc_markstack_top =3D=3D -1);
- tl_assert(lc_markstack[i].state =3D=3D IndirectLeak);
+ tl_assert(lc_markstack[i].state =3D=3D IndirectLeak
+ /* jrs 20051218: Ashley Pittman supplied a
+ custom-allocator test program which causes the =3D=3D
+ IndirectLeak condition to fail - it causes .state
+ to be Unreached. Since I have no idea how this
+ clique stuff works and no time to figure it out,
+ just allow that condition too. This could well be
+ a completely bogus fix. It doesn't seem unsafe
+ given that in any case the .state field is
+ immediately overwritten by the next statement. */
+ || lc_markstack[i].state =3D=3D Unreached);
=20
lc_markstack[i].state =3D Unreached; /* Return to unreached state,
to indicate its a clique
@@ -694,14 +704,14 @@
/* Sanity check -- make sure they don't overlap */
for (i =3D 0; i < lc_n_shadows-1; i++) {
tl_assert( lc_shadows[i]->data + lc_shadows[i]->size
- < lc_shadows[i+1]->data );
+ <=3D lc_shadows[i+1]->data );
}
=20
if (lc_n_shadows =3D=3D 0) {
tl_assert(lc_shadows =3D=3D NULL);
if (VG_(clo_verbosity) >=3D 1 && !VG_(clo_xml)) {
VG_(message)(Vg_UserMsg,=20
- "No malloc'd blocks -- no leaks are possible.");
+ "All heap blocks were freed -- no leaks are possib=
le.");
}
return;
}
|
|
From: <sv...@va...> - 2005-12-19 19:15:10
|
Author: njn
Date: 2005-12-19 19:15:04 +0000 (Mon, 19 Dec 2005)
New Revision: 5376
Log:
Merge r5365 (superblock list improvement) from the trunk.
Modified:
branches/COMPVBITS/coregrind/m_mallocfree.c
Modified: branches/COMPVBITS/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/coregrind/m_mallocfree.c 2005-12-19 19:12:13 UTC (=
rev 5375)
+++ branches/COMPVBITS/coregrind/m_mallocfree.c 2005-12-19 19:15:04 UTC (=
rev 5376)
@@ -588,13 +588,48 @@
Superblock* findSb ( Arena* a, Block* b )
{
Superblock* sb;
- for (sb =3D a->sblocks; sb; sb =3D sb->next)
- if ((Block*)&sb->payload_bytes[0] <=3D b
+ static UInt n_search =3D 0;
+ for (sb =3D a->sblocks; sb; sb =3D sb->next) {
+ if ((Block*)&sb->payload_bytes[0] <=3D b=20
&& b < (Block*)&sb->payload_bytes[sb->n_payload_bytes])
- return sb;
- VG_(printf)("findSb: can't find pointer %p in arena '%s'\n", b, a->na=
me );
- VG_(core_panic)("findSb: VG_(arena_free)() in wrong arena?");
- return NULL; /*NOTREACHED*/
+ break;
+ }
+ if (!sb) {
+ VG_(printf)("findSb: can't find pointer %p in arena '%s'\n",=20
+ b, a->name );
+ VG_(core_panic)("findSb: VG_(arena_free)() in wrong arena?");
+ return NULL; /*NOTREACHED*/
+ }
+
+ /* Start of performance-enhancing hack: once every 128 (chosen
+ hackily after profiling) successful searches, move the found
+ Superblock one step closer to the start of the list. This makes
+ future searches cheaper. */
+ if ((n_search & 0x7F) =3D=3D 0) {
+ /* Move sb one step closer to the start of the list. */
+ Superblock* sb0 =3D a->sblocks;
+ Superblock* sb1 =3D NULL;
+ Superblock* sb2 =3D NULL;
+ Superblock* tmp;
+ while (True) {
+ if (sb0 =3D=3D NULL) break;
+ if (sb0 =3D=3D sb) break;
+ sb2 =3D sb1;
+ sb1 =3D sb0;
+ sb0 =3D sb0->next;
+ }
+ if (sb0 =3D=3D sb && sb0 !=3D NULL && sb1 !=3D NULL && sb2 !=3D NU=
LL) {
+ /* sb0 points to sb, sb1 to its predecessor, and sb2 to sb1's
+ predecessor. Swap sb0 and sb1, that is, move sb0 one step
+ closer to the start of the list. */
+ tmp =3D sb0->next;
+ sb2->next =3D sb0;
+ sb0->next =3D sb1;
+ sb1->next =3D tmp;
+ }
+ }
+ /* End of performance-enhancing hack. */
+ return sb;
}
=20
=20
|
|
From: <sv...@va...> - 2005-12-19 19:12:18
|
Author: njn Date: 2005-12-19 19:12:13 +0000 (Mon, 19 Dec 2005) New Revision: 5375 Log: update Modified: trunk/docs/internals/performance.txt Modified: trunk/docs/internals/performance.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/performance.txt 2005-12-19 17:01:14 UTC (rev 537= 4) +++ trunk/docs/internals/performance.txt 2005-12-19 19:12:13 UTC (rev 537= 5) @@ -20,6 +20,9 @@ removed from the despatch loop unless --profile-flags is being used. Improved Nulgrind performance typically by 10--20%, and Memcheck performance typically by 2--20%. +- Julian changed findSb to slowly move superblocks to the front of the l= ist + as they were accessed. This sped up perf/heap by 25--50%, and some bi= g + programs (eg. ktuberling) programs by a couple of percent. =20 COMPVBITS branch: - Nick converted to compress V bits, initial version saved 0--5% on most |
|
From: Julian S. <js...@ac...> - 2005-12-19 17:44:05
|
On Monday 19 December 2005 17:25, Nicholas Nethercote wrote: > On Sat, 17 Dec 2005, Julian Seward wrote: > >>>> P4 Northwood (suse10, x86): > >>>> heap trunk : 0.4s nl: 5.7s (12.9x, -----) mc:85.8s (195.0x, > >>>> -----) > >> > >> I did the same yesterday and saw similar things. The counts in swizzle > >> just don't add up to the function totals. > > > > Nevertheless, as usual cachegrind does a great job of pointing out the > > smoking gun. Run time of this program is literally halved following > > r5365. > > I get a 25% speedup. I tried a couple of real programs (konqueror, vim) > but don't see any effect on them. Still, it can't have hurt. I'm getting the impression that the cache-related performance problems we've identified recently exist on all platforms, but are most pronounced on older P4s, due to the high clock rate, small D1 (8k) and small L2 (256k). There was also a small change in starting a real program (ktuberling), 95 to 93 seconds. On a Mac Mini, which has more generous cache arrangements, I saw a change from a 47x slowdown to 33x, IIRC. I suspect that's more typical. J |
|
From: Nicholas N. <nj...@cs...> - 2005-12-19 17:25:23
|
On Sat, 17 Dec 2005, Julian Seward wrote: >>>> P4 Northwood (suse10, x86): >>>> heap trunk : 0.4s nl: 5.7s (12.9x, -----) mc:85.8s (195.0x, >>>> -----) > >> I did the same yesterday and saw similar things. The counts in swizzle >> just don't add up to the function totals. > > Nevertheless, as usual cachegrind does a great job of pointing out the > smoking gun. Run time of this program is literally halved following > r5365. I get a 25% speedup. I tried a couple of real programs (konqueror, vim) but don't see any effect on them. Still, it can't have hurt. Nick |
|
From: Nicholas N. <nj...@cs...> - 2005-12-19 17:08:26
|
On Sat, 17 Dec 2005, Jeroen N. Witmond wrote: > The result below was generated on a Pentium III (Katmai). vanilla is rev > 5314, VEX rev 1486; trunk is rev 5360, VEX rev 1499; COMPVBITS is rev > 5361, VEX rev 1499. 3.1.RC1-inner and COMPVBITS are configured with > --enable-inner. Generally very encouraging for COMPVBITS, good to see. Thanks. Nick > > Jeroen. > > -- Running tests in perf ---------------------------------------------- > -- bigcode1 -- > bigcode1 3.1.RC1-inner: 2.4s nl:52.4s (21.6x, -----) mc:77.2s (31.8x, -----) > bigcode1 3.1.RC1-outer: 2.4s nl:51.3s (21.1x, 2.1%) mc:76.7s (31.6x, 0.7%) > bigcode1 vanilla: 2.4s nl:50.1s (20.6x, 4.4%) mc:71.9s (29.6x, 7.0%) > bigcode1 trunk: 2.4s nl:45.1s (18.5x, 14.0%) mc:67.1s (27.6x, 13.2%) > bigcode1 COMPVBITS: 2.4s nl:45.0s (18.5x, 14.2%) mc:66.0s (27.1x, 14.6%) > -- bigcode2 -- > bigcode2 3.1.RC1-inner: 2.5s nl:92.6s (37.6x, -----) mc:155.4s (63.2x, > -----) > bigcode2 3.1.RC1-outer: 2.5s nl:91.2s (37.1x, 1.5%) mc:154.7s (62.9x, > 0.4%) > bigcode2 vanilla: 2.5s nl:83.2s (33.8x, 10.1%) mc:133.9s (54.5x, 13.8%) > bigcode2 trunk: 2.5s nl:78.9s (32.1x, 14.8%) mc:130.1s (52.9x, 16.3%) > bigcode2 COMPVBITS: 2.5s nl:78.8s (32.0x, 15.0%) mc:129.2s (52.5x, 16.9%) > -- bz2 -- > bz2 3.1.RC1-inner: 6.5s nl:43.8s ( 6.8x, -----) mc:147.4s (22.8x, > -----) > bz2 3.1.RC1-outer: 6.5s nl:43.2s ( 6.7x, 1.5%) mc:146.6s (22.6x, > 0.6%) > bz2 vanilla: 6.5s nl:43.9s ( 6.8x, -0.2%) mc:146.8s (22.7x, 0.4%) > bz2 trunk: 6.5s nl:37.9s ( 5.8x, 13.6%) mc:139.5s (21.5x, 5.4%) > bz2 COMPVBITS: 6.5s nl:37.7s ( 5.8x, 14.0%) mc:137.2s (21.2x, 6.9%) > -- fbench -- > fbench 3.1.RC1-inner: 4.2s nl:18.1s ( 4.3x, -----) mc:82.7s (19.6x, -----) > fbench 3.1.RC1-outer: 4.2s nl:17.9s ( 4.2x, 1.1%) mc:83.2s (19.7x, -0.6%) > fbench vanilla: 4.2s nl:17.4s ( 4.1x, 3.5%) mc:81.4s (19.3x, 1.6%) > fbench trunk: 4.2s nl:16.5s ( 3.9x, 8.7%) mc:66.0s (15.6x, 20.2%) > fbench COMPVBITS: 4.2s nl:16.4s ( 3.9x, 9.3%) mc:60.8s (14.4x, 26.5%) > -- ffbench -- > ffbench 3.1.RC1-inner: 6.7s nl:17.4s ( 2.6x, -----) mc:51.2s ( 7.7x, -----) > ffbench 3.1.RC1-outer: 6.7s nl:17.4s ( 2.6x, -0.2%) mc:51.4s ( 7.7x, -0.3%) > ffbench vanilla: 6.7s nl:17.4s ( 2.6x, 0.0%) mc:51.1s ( 7.7x, 0.1%) > ffbench trunk: 6.7s nl:17.0s ( 2.5x, 2.5%) mc:51.0s ( 7.6x, 0.4%) > ffbench COMPVBITS: 6.7s nl:17.5s ( 2.6x, -0.3%) mc:47.4s ( 7.1x, 7.5%) > -- sarp -- > sarp 3.1.RC1-inner: 0.3s nl: 3.3s (10.7x, -----) mc:67.2s (216.7x, > -----) > sarp 3.1.RC1-outer: 0.3s nl: 3.3s (10.6x, 0.3%) mc:67.0s (216.1x, > 0.3%) > sarp vanilla: 0.3s nl: 3.2s (10.4x, 3.0%) mc:66.5s (214.4x, 1.1%) > sarp trunk: 0.3s nl: 3.0s ( 9.7x, 9.1%) mc:65.9s (212.5x, 1.9%) > sarp COMPVBITS: 0.3s nl: 3.0s ( 9.7x, 9.1%) mc:33.9s (109.3x, 49.6%) > -- Finished tests in perf ---------------------------------------------- > > == 6 programs, 60 timings ================= > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: Nicholas N. <nj...@cs...> - 2005-12-19 17:07:05
|
On Sat, 17 Dec 2005, James Begley wrote: > OK, I SVN updated to r5363 (vex r1500) re-ran the performance tests to > compare V 3.1.0, current SVN and the current COMPVBITS branch. The > results are below (again, slightly snipped to avoid line wrapping) > > -- Running tests in perf ----------------------------------------- > -- bigcode1 -- > bigcode1 valgrind-3.1.0: 0.5s nl:17.9s (35.8x) mc:25.3s (50.6x) > bigcode1 valgrind : 0.5s nl:16.5s (33.0x, 7.8%) mc:23.0s (46.0x, 9.0%) > bigcode1 compvbits : 0.5s nl:16.6s (33.2x, 7.5%) mc:22.8s (45.5x, 10.0%) > -- bigcode2 -- > bigcode2 valgrind-3.1.0: 0.5s nl:28.1s (55.1x) mc:46.1s (90.4x) > bigcode2 valgrind : 0.5s nl:26.7s (52.3x, 5.1%) mc:42.8s (83.9x, 7.2%) > bigcode2 compvbits : 0.5s nl:26.7s (52.4x, 5.0%) mc:42.8s (83.9x, 7.2%) > -- bz2 -- > bz2 valgrind-3.1.0: 2.5s nl:16.8s ( 6.8x) mc:58.4s (23.5x) > bz2 valgrind : 2.5s nl:15.0s ( 6.0x,11.1%) mc:55.9s (22.5x, 4.3%) > bz2 compvbits : 2.5s nl:14.9s ( 6.0x,11.2%) mc:60.9s (24.4x,-4.2%) > -- fbench -- > fbench valgrind-3.1.0: 1.8s nl: 6.0s ( 3.4x) mc:35.7s (20.2x) > fbench valgrind : 1.8s nl: 5.7s ( 3.2x, 5.8%) mc:26.5s (15.0x, 25.8%) > fbench compvbits : 1.8s nl: 5.7s ( 3.2x, 5.8%) mc:23.9s (13.5x, 33.1%) > -- ffbench -- > ffbench valgrind-3.1.0: 4.3s nl: 9.1s ( 2.1x) mc:25.2s ( 5.9x) > ffbench valgrind : 4.3s nl: 8.6s ( 2.0x, 4.5%) mc:24.9s ( 5.8x, 1.5%) > ffbench compvbits : 4.3s nl: 8.6s ( 2.0x, 4.8%) mc:23.5s ( 5.5x, 7.1%) > -- heap -- > heap valgrind-3.1.0: 0.6s nl: 8.0s (13.6x) mc:52.6s (89.2x) > heap valgrind : 0.6s nl: 6.3s (10.7x,21.1%) mc:52.0s (88.1x, 1.3%) > heap compvbits : 0.6s nl: 6.3s (10.6x,21.6%) mc:44.7s (75.7x, 15.1%) > -- sarp -- > sarp valgrind-3.1.0: 0.1s nl: 1.3s (10.5x) mc:30.3s (252.2x) > sarp valgrind : 0.1s nl: 1.2s ( 9.8x, 7.1%) mc:30.1s (251.1x, 0.4%) > sarp compvbits : 0.1s nl: 1.2s ( 9.8x, 7.1%) mc:13.8s (114.8x,54.5%) > -- Finished tests in perf ----------------------------------------- Thanks for the data. The bz2 compvbits regression is puzzling, but generally the picture is good. Nick |
|
From: Nicholas N. <nj...@cs...> - 2005-12-19 17:03:00
|
On Mon, 19 Dec 2005, Dirk Mueller wrote: >> people want the absolute max performance right now, they can try out >> the svn trunk. > > Whats the release schedule of trunk? :) From docs/internals/roadmap.txt: ----------------------------------------------------------------------------- 3.2.0 ----------------------------------------------------------------------------- Scheduled for end-Mar 06 (3.1.0 + 4 months) ? In order of increasing speculativeness -------------------------------------- * Add ppc64-linux support. * Fold in the V bit compression stuff if it works well (early signs are promising) and get rid of Addrcheck. * Get function wrapping working again. Reinstate basic thread checks. Reinstate Helgrind. * Performance tuning: - faster register allocation in vex - improve stack-update pass - assess effect of branch misprediction in dispatchers * Try to accelerate development for Darwin ? Smaller things -------------- * Consider using the following defaults: --leak-check=yes --num-callers=20 * Expose some of m_redir's functionality to tools so that Memcheck can replace strlen/strcmp on PPC32 (remove the 3.1.0 hack for this which checked in m_redir.c if the current tool was Memcheck). |