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
(8) |
2
(2) |
3
(1) |
4
(2) |
|
5
(1) |
6
(4) |
7
(6) |
8
(5) |
9
(3) |
10
(5) |
11
(1) |
|
12
(6) |
13
(4) |
14
(1) |
15
(4) |
16
(1) |
17
|
18
|
|
19
|
20
|
21
(2) |
22
(28) |
23
(17) |
24
(6) |
25
(4) |
|
26
(2) |
27
(2) |
28
|
29
(5) |
30
(8) |
31
(14) |
|
|
From: Florian K. <fl...@ei...> - 2015-07-30 21:50:59
|
Thanks for the patch. Applied in r15460 with minor modifications.
Florian
On 30.07.2015 22:52, Matthias Schwarzott wrote:
> ---
> coregrind/m_scheduler/scheduler.c | 8 +++++++-
> docs/internals/xml-output-protocol4.txt | 6 ++++++
> memcheck/tests/client-msg-as-xml.stderr.exp | 1 +
> memcheck/tests/threadname.c | 3 ++-
> memcheck/tests/threadname.stderr.exp | 13 +++++++------
> memcheck/tests/threadname_xml.stderr.exp | 7 +++++++
> 6 files changed, 30 insertions(+), 8 deletions(-)
>
> diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c
> index 62906ca..429d745 100644
> --- a/coregrind/m_scheduler/scheduler.c
> +++ b/coregrind/m_scheduler/scheduler.c
> @@ -1814,6 +1814,10 @@ Int print_client_message( ThreadId tid, const HChar *format,
>
> VG_(printf_xml)( "<clientmsg>\n" );
> VG_(printf_xml)( " <tid>%d</tid>\n", tid );
> + ThreadState* tst = VG_(get_ThreadState)(tid);
> + if (tst->thread_name) {
> + VG_(printf_xml)(" <threadname>%s</threadname>\n", tst->thread_name);
> + }
> VG_(printf_xml)( " <text>" );
> count = VG_(vprintf_xml)( xml_format, *vargsp );
> VG_(printf_xml)( " </text>\n" );
> @@ -1825,8 +1829,10 @@ Int print_client_message( ThreadId tid, const HChar *format,
> if (include_backtrace)
> VG_(get_and_pp_StackTrace)( tid, VG_(clo_backtrace_size) );
>
> - if (VG_(clo_xml))
> + if (VG_(clo_xml)) {
> VG_(printf_xml)( "</clientmsg>\n" );
> + VG_(printf_xml)("\n");
> + }
>
> return count;
> }
> diff --git a/docs/internals/xml-output-protocol4.txt b/docs/internals/xml-output-protocol4.txt
> index a147eaa..ccb22b4 100644
> --- a/docs/internals/xml-output-protocol4.txt
> +++ b/docs/internals/xml-output-protocol4.txt
> @@ -719,6 +719,7 @@ Definition:
>
> <clientmsg>
> <tid>INT</tid>
> + <threadname>NAME</threadname> if set
> <text>...</text>
> </clientmsg>
>
> @@ -726,12 +727,17 @@ OR
>
> <clientmsg>
> <tid>INT</tid>
> + <threadname>NAME</threadname> if set
> <text>...</text>
> STACK
> </clientmsg>
>
> * The <tid> tag indicates the Valgrind thread number.
>
> +* The <threadname> tag identifies the name of the thread if it was
> + set by the client application. If no name was set, the tag is
> + omitted.
> +
> * The <text> tag indicates the message as specified in the client request
> (properly translated to XML).
>
> diff --git a/memcheck/tests/client-msg-as-xml.stderr.exp b/memcheck/tests/client-msg-as-xml.stderr.exp
> index af97c61..d7031cf 100644
> --- a/memcheck/tests/client-msg-as-xml.stderr.exp
> +++ b/memcheck/tests/client-msg-as-xml.stderr.exp
> @@ -76,6 +76,7 @@
> </stack>
> </clientmsg>
>
> +
> <status>
> <state>FINISHED</state>
> <time>...</time>
> diff --git a/memcheck/tests/threadname.c b/memcheck/tests/threadname.c
> index c0e0b47..d3f6e44 100644
> --- a/memcheck/tests/threadname.c
> +++ b/memcheck/tests/threadname.c
> @@ -11,7 +11,7 @@
> #include <sys/types.h>
> #include <unistd.h>
> #include <assert.h>
> -
> +#include "valgrind.h"
>
> static pthread_t children[3];
>
> @@ -49,6 +49,7 @@ void* child_fn_1 ( void* arg )
> # endif
>
> bad_things(3);
> + VALGRIND_PRINTF("%s", "I am in child_fn_1\n");
>
> r = pthread_create(&children[2], NULL, child_fn_2, NULL);
> assert(!r);
> diff --git a/memcheck/tests/threadname.stderr.exp b/memcheck/tests/threadname.stderr.exp
> index 3321af7..60903ee 100644
> --- a/memcheck/tests/threadname.stderr.exp
> +++ b/memcheck/tests/threadname.stderr.exp
> @@ -1,20 +1,20 @@
> Invalid write of size 1
> at 0x........: bad_things (threadname.c:21)
> - by 0x........: main (threadname.c:81)
> + by 0x........: main (threadname.c:82)
> Address 0x........ is 0 bytes after a block of size 1 alloc'd
> at 0x........: malloc (vg_replace_malloc.c:...)
> by 0x........: bad_things (threadname.c:20)
> - by 0x........: main (threadname.c:81)
> + by 0x........: main (threadname.c:82)
>
> Thread 2:
> Invalid write of size 1
> at 0x........: bad_things (threadname.c:21)
> - by 0x........: child_fn_0 (threadname.c:66)
> + by 0x........: child_fn_0 (threadname.c:67)
> ...
> Address 0x........ is 0 bytes after a block of size 2 alloc'd
> at 0x........: malloc (vg_replace_malloc.c:...)
> by 0x........: bad_things (threadname.c:20)
> - by 0x........: child_fn_0 (threadname.c:66)
> + by 0x........: child_fn_0 (threadname.c:67)
> ...
>
> Thread 3 try1:
> @@ -28,6 +28,7 @@ Invalid write of size 1
> by 0x........: child_fn_1 (threadname.c:51)
> ...
>
> +I am in child_fn_1
> Thread 4 012345678901234:
> Invalid write of size 1
> at 0x........: bad_things (threadname.c:21)
> @@ -42,9 +43,9 @@ Invalid write of size 1
> Thread 1:
> Invalid write of size 1
> at 0x........: bad_things (threadname.c:21)
> - by 0x........: main (threadname.c:89)
> + by 0x........: main (threadname.c:90)
> Address 0x........ is 0 bytes after a block of size 5 alloc'd
> at 0x........: malloc (vg_replace_malloc.c:...)
> by 0x........: bad_things (threadname.c:20)
> - by 0x........: main (threadname.c:89)
> + by 0x........: main (threadname.c:90)
>
> diff --git a/memcheck/tests/threadname_xml.stderr.exp b/memcheck/tests/threadname_xml.stderr.exp
> index 067b2ff..d6a0a2d 100644
> --- a/memcheck/tests/threadname_xml.stderr.exp
> +++ b/memcheck/tests/threadname_xml.stderr.exp
> @@ -185,6 +185,13 @@
> </stack>
> </error>
>
> +<clientmsg>
> + <tid>...</tid>
> + <threadname>try1</threadname>
> + <text>I am in child_fn_1
> + </text>
> +</clientmsg>
> +
> <error>
> <unique>0x........</unique>
> <tid>...</tid>
>
|
Author: florian
Date: Thu Jul 30 22:49:49 2015
New Revision: 15460
Log:
In VALGRIND_PRINTF write out the thread name to xml.
Patch by Matthias Schwarzott <zz...@ge...>.
Modified:
trunk/NEWS
trunk/coregrind/m_scheduler/scheduler.c
trunk/docs/internals/xml-output-protocol4.txt
trunk/memcheck/tests/threadname.c
trunk/memcheck/tests/threadname.stderr.exp
trunk/memcheck/tests/threadname_xml.stderr.exp
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Thu Jul 30 22:49:49 2015
@@ -277,6 +277,7 @@
n-i-bz Enable rt_sigpending syscall on ppc64 linux.
n-i-bz mremap did not work properly on shared memory
n-i-bz Fix incorrect sizeof expression in syswrap-xen.c reported by Coverity
+n-i-bz In VALGRIND_PRINTF write out thread name, if any, to xml
Release 3.10.1 (25 November 2014)
Modified: trunk/coregrind/m_scheduler/scheduler.c
==============================================================================
--- trunk/coregrind/m_scheduler/scheduler.c (original)
+++ trunk/coregrind/m_scheduler/scheduler.c Thu Jul 30 22:49:49 2015
@@ -1814,6 +1814,9 @@
VG_(printf_xml)( "<clientmsg>\n" );
VG_(printf_xml)( " <tid>%d</tid>\n", tid );
+ const ThreadState *tst = VG_(get_ThreadState)(tid);
+ if (tst->thread_name)
+ VG_(printf_xml)(" <threadname>%s</threadname>\n", tst->thread_name);
VG_(printf_xml)( " <text>" );
count = VG_(vprintf_xml)( xml_format, *vargsp );
VG_(printf_xml)( " </text>\n" );
Modified: trunk/docs/internals/xml-output-protocol4.txt
==============================================================================
--- trunk/docs/internals/xml-output-protocol4.txt (original)
+++ trunk/docs/internals/xml-output-protocol4.txt Thu Jul 30 22:49:49 2015
@@ -719,6 +719,7 @@
<clientmsg>
<tid>INT</tid>
+ <threadname>NAME</threadname> if set
<text>...</text>
</clientmsg>
@@ -726,12 +727,17 @@
<clientmsg>
<tid>INT</tid>
+ <threadname>NAME</threadname> if set
<text>...</text>
STACK
</clientmsg>
* The <tid> tag indicates the Valgrind thread number.
+* The <threadname> tag identifies the name of the thread if it was
+ set by the client application. If no name was set, the tag is
+ omitted.
+
* The <text> tag indicates the message as specified in the client request
(properly translated to XML).
Modified: trunk/memcheck/tests/threadname.c
==============================================================================
--- trunk/memcheck/tests/threadname.c (original)
+++ trunk/memcheck/tests/threadname.c Thu Jul 30 22:49:49 2015
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <assert.h>
-
+#include "valgrind.h"
static pthread_t children[3];
@@ -49,6 +49,7 @@
# endif
bad_things(3);
+ VALGRIND_PRINTF("%s", "I am in child_fn_1\n");
r = pthread_create(&children[2], NULL, child_fn_2, NULL);
assert(!r);
Modified: trunk/memcheck/tests/threadname.stderr.exp
==============================================================================
--- trunk/memcheck/tests/threadname.stderr.exp (original)
+++ trunk/memcheck/tests/threadname.stderr.exp Thu Jul 30 22:49:49 2015
@@ -1,20 +1,20 @@
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
- by 0x........: main (threadname.c:81)
+ by 0x........: main (threadname.c:82)
Address 0x........ is 0 bytes after a block of size 1 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:20)
- by 0x........: main (threadname.c:81)
+ by 0x........: main (threadname.c:82)
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
- by 0x........: child_fn_0 (threadname.c:66)
+ by 0x........: child_fn_0 (threadname.c:67)
...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:20)
- by 0x........: child_fn_0 (threadname.c:66)
+ by 0x........: child_fn_0 (threadname.c:67)
...
Thread 3 try1:
@@ -28,6 +28,7 @@
by 0x........: child_fn_1 (threadname.c:51)
...
+I am in child_fn_1
Thread 4 012345678901234:
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
@@ -42,9 +43,9 @@
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
- by 0x........: main (threadname.c:89)
+ by 0x........: main (threadname.c:90)
Address 0x........ is 0 bytes after a block of size 5 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:20)
- by 0x........: main (threadname.c:89)
+ by 0x........: main (threadname.c:90)
Modified: trunk/memcheck/tests/threadname_xml.stderr.exp
==============================================================================
--- trunk/memcheck/tests/threadname_xml.stderr.exp (original)
+++ trunk/memcheck/tests/threadname_xml.stderr.exp Thu Jul 30 22:49:49 2015
@@ -185,6 +185,12 @@
</stack>
</error>
+<clientmsg>
+ <tid>...</tid>
+ <threadname>try1</threadname>
+ <text>I am in child_fn_1
+ </text>
+</clientmsg>
<error>
<unique>0x........</unique>
<tid>...</tid>
|
|
From: Florian K. <fl...@ei...> - 2015-07-30 21:46:49
|
On 23.07.2015 19:36, Matthias Schwarzott wrote:
> An additional comment to memcheck profiling.
>
> The counter values should be printed unsigned.
How did you find this? There are *many* places in valgrind where an
incorrect format is used to print unsigned values. It would be good to
clean that up. But neither gcc nor clang is of any help here even though
VG_(printf) has a printf-like attribute and we compile with -Wformat and
what not...
Florian
> --- a/memcheck/mc_main.c
> +++ b/memcheck/mc_main.c
> @@ -6363,7 +6363,7 @@ static void done_prof_mem ( void )
> }
> if (MC_(event_ctr)[i] > 0) {
> spaced = False;
> - VG_(printf)( "prof mem event %3d: %9d %s\n",
> + VG_(printf)( "prof mem event %3d: %9u %s\n",
> i, MC_(event_ctr)[i],
> MC_(event_ctr_name)[i]
> ? MC_(event_ctr_name)[i] : "unnamed");
>
|
|
From: Matthias S. <zz...@ge...> - 2015-07-30 20:53:23
|
---
coregrind/m_scheduler/scheduler.c | 8 +++++++-
docs/internals/xml-output-protocol4.txt | 6 ++++++
memcheck/tests/client-msg-as-xml.stderr.exp | 1 +
memcheck/tests/threadname.c | 3 ++-
memcheck/tests/threadname.stderr.exp | 13 +++++++------
memcheck/tests/threadname_xml.stderr.exp | 7 +++++++
6 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c
index 62906ca..429d745 100644
--- a/coregrind/m_scheduler/scheduler.c
+++ b/coregrind/m_scheduler/scheduler.c
@@ -1814,6 +1814,10 @@ Int print_client_message( ThreadId tid, const HChar *format,
VG_(printf_xml)( "<clientmsg>\n" );
VG_(printf_xml)( " <tid>%d</tid>\n", tid );
+ ThreadState* tst = VG_(get_ThreadState)(tid);
+ if (tst->thread_name) {
+ VG_(printf_xml)(" <threadname>%s</threadname>\n", tst->thread_name);
+ }
VG_(printf_xml)( " <text>" );
count = VG_(vprintf_xml)( xml_format, *vargsp );
VG_(printf_xml)( " </text>\n" );
@@ -1825,8 +1829,10 @@ Int print_client_message( ThreadId tid, const HChar *format,
if (include_backtrace)
VG_(get_and_pp_StackTrace)( tid, VG_(clo_backtrace_size) );
- if (VG_(clo_xml))
+ if (VG_(clo_xml)) {
VG_(printf_xml)( "</clientmsg>\n" );
+ VG_(printf_xml)("\n");
+ }
return count;
}
diff --git a/docs/internals/xml-output-protocol4.txt b/docs/internals/xml-output-protocol4.txt
index a147eaa..ccb22b4 100644
--- a/docs/internals/xml-output-protocol4.txt
+++ b/docs/internals/xml-output-protocol4.txt
@@ -719,6 +719,7 @@ Definition:
<clientmsg>
<tid>INT</tid>
+ <threadname>NAME</threadname> if set
<text>...</text>
</clientmsg>
@@ -726,12 +727,17 @@ OR
<clientmsg>
<tid>INT</tid>
+ <threadname>NAME</threadname> if set
<text>...</text>
STACK
</clientmsg>
* The <tid> tag indicates the Valgrind thread number.
+* The <threadname> tag identifies the name of the thread if it was
+ set by the client application. If no name was set, the tag is
+ omitted.
+
* The <text> tag indicates the message as specified in the client request
(properly translated to XML).
diff --git a/memcheck/tests/client-msg-as-xml.stderr.exp b/memcheck/tests/client-msg-as-xml.stderr.exp
index af97c61..d7031cf 100644
--- a/memcheck/tests/client-msg-as-xml.stderr.exp
+++ b/memcheck/tests/client-msg-as-xml.stderr.exp
@@ -76,6 +76,7 @@
</stack>
</clientmsg>
+
<status>
<state>FINISHED</state>
<time>...</time>
diff --git a/memcheck/tests/threadname.c b/memcheck/tests/threadname.c
index c0e0b47..d3f6e44 100644
--- a/memcheck/tests/threadname.c
+++ b/memcheck/tests/threadname.c
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <assert.h>
-
+#include "valgrind.h"
static pthread_t children[3];
@@ -49,6 +49,7 @@ void* child_fn_1 ( void* arg )
# endif
bad_things(3);
+ VALGRIND_PRINTF("%s", "I am in child_fn_1\n");
r = pthread_create(&children[2], NULL, child_fn_2, NULL);
assert(!r);
diff --git a/memcheck/tests/threadname.stderr.exp b/memcheck/tests/threadname.stderr.exp
index 3321af7..60903ee 100644
--- a/memcheck/tests/threadname.stderr.exp
+++ b/memcheck/tests/threadname.stderr.exp
@@ -1,20 +1,20 @@
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
- by 0x........: main (threadname.c:81)
+ by 0x........: main (threadname.c:82)
Address 0x........ is 0 bytes after a block of size 1 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:20)
- by 0x........: main (threadname.c:81)
+ by 0x........: main (threadname.c:82)
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
- by 0x........: child_fn_0 (threadname.c:66)
+ by 0x........: child_fn_0 (threadname.c:67)
...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:20)
- by 0x........: child_fn_0 (threadname.c:66)
+ by 0x........: child_fn_0 (threadname.c:67)
...
Thread 3 try1:
@@ -28,6 +28,7 @@ Invalid write of size 1
by 0x........: child_fn_1 (threadname.c:51)
...
+I am in child_fn_1
Thread 4 012345678901234:
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
@@ -42,9 +43,9 @@ Invalid write of size 1
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:21)
- by 0x........: main (threadname.c:89)
+ by 0x........: main (threadname.c:90)
Address 0x........ is 0 bytes after a block of size 5 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:20)
- by 0x........: main (threadname.c:89)
+ by 0x........: main (threadname.c:90)
diff --git a/memcheck/tests/threadname_xml.stderr.exp b/memcheck/tests/threadname_xml.stderr.exp
index 067b2ff..d6a0a2d 100644
--- a/memcheck/tests/threadname_xml.stderr.exp
+++ b/memcheck/tests/threadname_xml.stderr.exp
@@ -185,6 +185,13 @@
</stack>
</error>
+<clientmsg>
+ <tid>...</tid>
+ <threadname>try1</threadname>
+ <text>I am in child_fn_1
+ </text>
+</clientmsg>
+
<error>
<unique>0x........</unique>
<tid>...</tid>
--
2.5.0
|
|
From: Matthias S. <zz...@ge...> - 2015-07-30 20:49:48
|
Hi! I think the error reporting out of replaced functions is a bit inconsistent. 1. They use different exit-codes in fatal cases: * vg_replace_malloc.c: malloc dies with exitcode of 1. * vg_replace_malloc.c: panic dies with exitcode of 99. * vg_replace_strmem.c: dies with an exitcode of 127. 2. Only VALGRIND_PRINTF_BACKTRACE is used so in xml <clientmsg> will appear instead of <error>. Is it possible to create an <error> via client requests? Regards Matthias |
|
From: <sv...@va...> - 2015-07-30 11:21:33
|
Author: florian
Date: Thu Jul 30 12:21:27 2015
New Revision: 15459
Log:
Change ML_(am_add_segment) such that the segment tree is maximally
merged afterwards.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-segments.c Thu Jul 30 12:21:27 2015
@@ -31,6 +31,19 @@
The GNU General Public License is contained in the file COPYING.
*/
+/* At any point in time the segment tree is "maximally merged". That
+ means: there are no two leaf nodes x and y with adjacent address ranges
+ such that maybe_merge(x, y) is true.
+
+ Instead of adding a segment and having a post-pass to maximally merge
+ them, we do the following:
+ Let S = (m:n) be the segment to be inserted. Locate the segments
+ P = (x:m-1) and N = (n+1:y), i.e. the two segments next to S.
+ If maybe_merge(P,S) == true, set (S).f = x.
+ If maybe_merge(S,N) == true, set (S).t = y.
+ Now insert S. The segment tree will be maximally merged afterwards.
+*/
+
#include "priv_aspacemgr.h"
#ifdef ASPACEMGR_UNIT_TEST
@@ -43,11 +56,13 @@
static Bool norotate = False;
static Bool nopost = False;
+static const Bool merge = False;
#else
#define INTERVAL_FMT "[%lx:%lx]"
#define ADDR_FMT "%lx"
+static const Bool merge = True;
#endif
/* Max number of segments we can track. On Android, virtual address
@@ -1214,9 +1229,34 @@
{
DEBUG("adding segment "INTERVAL_FMT"\n", seg->start, seg->end);
- NSegment *new = insert_node(seg->start, seg->end);
+ NSegment this = *seg;
- aspacem_assert(new->start == seg->start && new->end == seg->end);
+ /* Check whether THIS can be merged with the neighbouring segments.
+ This is disabled in unit test mode. */
+ if (merge) {
+ if (this.start != Addr_MIN) {
+ const NSegment *prev = ML_(am_find_segment)(this.start - 1);
+ NSegment tmp = *prev;
+ if (maybe_merge_segments(&tmp, &this)) {
+ DEBUG("merging "INTERVAL_FMT" "INTERVAL_FMT"\n",
+ prev->start, prev->end, this.start, this.end);
+ this = tmp;
+ }
+ }
+ if (this.end != Addr_MAX) {
+ const NSegment *next = ML_(am_find_segment)(this.end + 1);
+ NSegment tmp = this;
+ if (maybe_merge_segments(&tmp, next))
+ DEBUG("merging "INTERVAL_FMT" "INTERVAL_FMT"\n",
+ this.start, this.end, next->start, next->end);
+ this = tmp;
+ }
+ DEBUG("inserting segment "INTERVAL_FMT"\n", this.start, this.end);
+ }
+
+ NSegment *new = insert_node(this.start, this.end);
+
+ aspacem_assert(new->start == this.start && new->end == this.end);
/* Initialise the new segment with the template segment, but be careful
not to overwrite the left, right, and up links. */
@@ -1224,7 +1264,7 @@
NSegment *right = new->right;
NSegment *up = new->up;
- *new = *seg;
+ *new = this;
new->up = up;
new->left = left;
new->right = right;
|
|
From: <sv...@va...> - 2015-07-30 11:17:54
|
Author: florian
Date: Thu Jul 30 12:17:47 2015
New Revision: 15458
Log:
Do not include tool header file here. Instead include pub_core_....
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/unit-test/tree.h
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/unit-test/tree.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/unit-test/tree.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/unit-test/tree.h Thu Jul 30 12:17:47 2015
@@ -27,7 +27,7 @@
#ifndef TREE_H
#define TREE_H
-#include "pub_tool_aspacemgr.h" // NSegment
+#include "pub_core_aspacemgr.h" // NSegment
NSegment *read_file(const char *file);
void write_dot(const NSegment *, const NSegment *subtree,
|
|
From: Josef W. <Jos...@gm...> - 2015-07-30 07:47:59
|
Am 29.07.2015 um 19:58 schrieb Christopher Kerr: > To get the code running on the Intel Fortran 15.0.1 compiler on an > Intel-Ivy-Bridge processor, the code has to be compiled with the > -msse4.1 option as running with the -xAVX compiled option causes the > code to exit with an ILLEGAL instruction. You might want to put into the > Cachegrind user manual. This may be fixed in SVN. Can you check? > I also have a question, Cachegrind gives the following line-by-line > information: > > | ILmr DLmr DLmw| > 528 0 209,680 Qtens_biharmonic(:,:,k,q,ie) = > elem(ie)%state%Qdp(:,:,k,q,n0_qdp) > > Can I interpret this result as saying that there were NO last-level data > cache read misses (DLmr) and that the data was in the last-level data > cache and all of the memory traffic was the result of the write back > (DLmw) of the data to memory? DLmw means that a write in your program did access a memory block which was not found in the last-level cache. Cachegrind does not count the implicit cache line read needed to be able to modify the line. Otherwise, DLmw > DLmr as above never would be possible. Further, cachegrind does not maintain dirty flags to understand whether evicted lines have to be written back before loading other data. This is not reflected in the reported events anyway: a miss is a miss, independent of whether a evicted line has to be written back or not. Due to that, any performance effects between write-back and write-through caches are not reflected, as they do not matter for the event counts given by cachegrind. In Callgrind you can ask for maintaining dirty flags for last-level cache lines with "--simulate-wb=yes", resulting in further events (misses with clean/dirty eviction). > Typically a write-back operation is NOT expensive as it an be be put > into the write-back buffer and performed at a later stage. This is only true if the write-back is hidden by other computation. Limited write bandwidth can slow down code as much as limited read bandwidth. > Yet the code > is spending a significant amount of time on this statement. Can be both access latency (for cache line reads before modification, which is not shown in cachegrind results as written above) and limited read/write bandwidth. You could check if the hardware prefetcher works or not (again only Callgrind: "--simulate-hwpref=yes", the misses go away if stream prefetching covers them). And of course, try to reduce miss counts by improving data reuse. Josef |