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
(15) |
2
(15) |
3
(16) |
4
(16) |
5
(19) |
6
(15) |
|
7
(1) |
8
(4) |
9
|
10
(4) |
11
(14) |
12
(5) |
13
|
|
14
(1) |
15
|
16
|
17
(12) |
18
(25) |
19
(18) |
20
(18) |
|
21
(16) |
22
(1) |
23
(18) |
24
(15) |
25
|
26
(3) |
27
(18) |
|
28
(8) |
29
|
30
(4) |
|
|
|
|
|
From: Lionel U. <lio...@gm...> - 2013-04-14 20:27:41
|
Hello,
This patch enables one to have the following output using 'logcat':
04-14 21:26:04.060 22549 22549 D Valgrind: ==22549== Memcheck, a memory error detector
04-14 21:26:04.060 22549 22549 D Valgrind: ==22549== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
04-14 21:26:04.060 22549 22549 D Valgrind: ==22549== Using Valgrind-3.9.0.SVN and LibVEX; rerun with -h for copyright info
04-14 21:26:04.060 22549 22549 D Valgrind: ==22549== Command: /data/log
04-14 21:26:04.060 22549 22549 D Valgrind: ==22549== Parent PID: 20684
04-14 21:26:04.060 22549 22549 D Valgrind: ==22549==
04-14 21:26:04.660 22549 22549 D Test : About to do something stupid ;-)
04-14 21:26:04.660 22549 22549 D Valgrind: ==22549== Conditional jump or move depends on uninitialised value(s)
04-14 21:26:04.660 22549 22549 D Valgrind: ==22549== at 0x8048423: main (in /data/log)
04-14 21:26:04.660 22549 22549 D Valgrind: ==22549==
04-14 21:26:04.660 22549 22549 D Test : Exiting program
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549==
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549== HEAP SUMMARY:
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549== in use at exit: 0 bytes in 0 blocks
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549==
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549== All heap blocks were freed -- no leaks are possible
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549==
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549== For counts of detected and suppressed errors, rerun with: -v
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549== Use --track-origins=yes to see where uninitialised values come from
04-14 21:26:04.670 22549 22549 D Valgrind: ==22549== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
I.e. Valgrind's output and the application debug output are put in the
same logging flow making it much easier to identify the scenario that
triggers the specific error Valgrind is reporting.
This is a first quick draft to get comments on what I did before
continuing further if the general principle is agreed upon (the
'\n' search in the sink code is pretty ugly but I did not see
another way to do so).
If this is something that will be accepted, I will send an updated
patch with some improvements (like the ability to configure the
logging channel / priority) and do more tests (for now I only tested
it on Android/x86).
Note that I seem to have broken the 'standard' stderr output (i.e. with
this patch it seems that only --log-devlog works :-) ).
Lionel
PS: and sorry also if the formatting is all messed up, it's been ages
since I sent 'plain text' mails and I had to look-up how to prevent
automatic line 'reflowing' :-)
Index: coregrind/m_libcprint.c
===================================================================
--- coregrind/m_libcprint.c (revision 13367)
+++ coregrind/m_libcprint.c (working copy)
@@ -52,8 +52,16 @@
After startup, the gdbserver monitor command might temporarily
set the fd of log_output_sink to -2 to indicate that output is
to be given to gdb rather than output to the startup fd */
-OutputSink VG_(log_output_sink) = { 2, False }; /* 2 = stderr */
-OutputSink VG_(xml_output_sink) = { -1, False }; /* disabled */
+OutputSink VG_(log_output_sink) = { 2, False /* 2 = stderr */
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ , False, 0
+#endif
+};
+OutputSink VG_(xml_output_sink) = { -1, False /* disabled */
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ , False, 0
+#endif
+};
/* Do the low-level send of a message to the logging sink. */
static
@@ -67,6 +75,40 @@
sink->fd = 2;
VG_(write)( sink->fd, msg, nbytes );
}
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ } else if (sink->is_devlog) {
+ if (sink->fd >= 0)
+ {
+ struct vg_iovec iov[4];
+ Int iovcnt = 3;
+ HChar prio = 3;
+ Int i;
+
+ iov[0].iov_base = &prio;
+ iov[0].iov_len = 1;
+ iov[1].iov_base = "Valgrind";
+ iov[1].iov_len = VG_(strlen)("Valgrind") + 1;
+ if (sink->buf_cnt) {
+ iovcnt += 1;
+ iov[2].iov_base = sink->buf;
+ iov[2].iov_len = sink->buf_cnt;
+ sink->buf_cnt = 0;
+ }
+ i = nbytes - 1;
+ while (i >= 0) {
+ if ((msg[i] == '\n') || (msg[i] == '\0')) break;
+ i -= 1;
+ }
+ if (i != (nbytes - 1)) {
+ sink->buf_cnt = nbytes - (i + 1);
+ VG_(memcpy)(sink->buf, &msg[i + 1], sink->buf_cnt);
+ }
+ iov[iovcnt-1].iov_base = msg;
+ iov[iovcnt-1].iov_len = i + 1;
+
+ VG_(writev)( sink->fd, iov, iovcnt );
+ }
+#else
} else {
/* sink->fd could have been set to -1 in the various
sys-wrappers for sys_fork, if --child-silent-after-fork=yes
@@ -76,6 +118,7 @@
VG_(write)( sink->fd, msg, nbytes );
else if (sink->fd == -2)
VG_(gdb_printf)("%s", msg);
+#endif
}
}
Index: coregrind/m_main.c
===================================================================
--- coregrind/m_main.c (revision 13367)
+++ coregrind/m_main.c (working copy)
@@ -138,6 +138,12 @@
" --log-fd=<number> log messages to file descriptor [2=stderr]\n"
" --log-file=<file> log messages to <file>\n"
" --log-socket=ipaddr:port log messages to socket ipaddr:port\n"
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+" --log-devlog= log messages to Android logging framework\n"
+" --log-devlog=<prio,tag,device> log messages to Android logging framework\n"
+" with specified priority (V,D,I,W,E) / tag\n"
+" to given device (main,radio,...)\n"
+#endif
"\n"
" user options for Valgrind tools that report errors:\n"
" --xml=yes emit error output in XML (some tools only)\n"
@@ -394,6 +400,7 @@
--log-fd= for a fd to write to (default setting, fd = 2)
--log-file= for a file name to write to
--log-socket= for a socket to write to
+ --log-devlog= for logging to Android's framework
As a result of examining these and doing relevant socket/file
opening, a final fd is established. This is stored in
@@ -425,6 +432,9 @@
VgLogTo_Fd,
VgLogTo_File,
VgLogTo_Socket
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ , VgLogTo_Android
+#endif
} log_to = VgLogTo_Fd, // Where is logging output to be sent?
xml_to = VgLogTo_Fd; // Where is XML output to be sent?
@@ -434,6 +444,10 @@
const HChar* log_fsname_unexpanded = NULL;
const HChar* xml_fsname_unexpanded = NULL;
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ const HChar *log_devlog_parameters = NULL;
+#endif
+
/* Whether the user has explicitly provided --sigill-diagnostics.
If not explicitly given depends on general verbosity setting. */
Bool sigill_diag_set = False;
@@ -676,6 +690,12 @@
xml_to = VgLogTo_Socket;
}
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ else if VG_STR_CLO(arg, "--log-devlog", log_devlog_parameters) {
+ log_to = VgLogTo_Android;
+ }
+#endif
+
else if VG_STR_CLO(arg, "--xml-user-comment",
VG_(clo_xml_user_comment)) {}
@@ -951,6 +971,20 @@
break;
}
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ case VgLogTo_Android: {
+ sres = VG_(open)("/dev/log/main", VKI_O_WRONLY, 0);
+ if (!sr_isError(sres)) {
+ tmp_log_fd = sr_Res(sres);
+ VG_(log_output_sink).is_devlog = True;
+ } else {
+ /* Go back to stderr logging */
+ tmp_log_fd = 2;
+ }
+ break;
+ }
+#endif
+
case VgLogTo_Socket: {
vg_assert(log_fsname_unexpanded != NULL);
vg_assert(VG_(strlen)(log_fsname_unexpanded) <= 900); /* paranoia */
@@ -1063,6 +1097,9 @@
"into safe range, using stderr\n");
VG_(log_output_sink).fd = 2; // stderr
VG_(log_output_sink).is_socket = False;
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ VG_(log_output_sink).is_devlog = False;
+#endif
} else {
VG_(log_output_sink).fd = tmp_log_fd;
VG_(fcntl)(VG_(log_output_sink).fd, VKI_F_SETFD, VKI_FD_CLOEXEC);
Index: coregrind/pub_core_libcprint.h
===================================================================
--- coregrind/pub_core_libcprint.h (revision 13367)
+++ coregrind/pub_core_libcprint.h (working copy)
@@ -41,7 +41,15 @@
/* An output file descriptor wrapped up with a Bool indicating whether
or not the fd is a socket. */
typedef
- struct { Int fd; Bool is_socket; }
+ struct {
+ Int fd;
+ Bool is_socket;
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+ Bool is_devlog;
+ Int buf_cnt;
+ HChar buf[512];
+#endif
+ }
OutputSink;
/* And the destinations for normal and XML output. */
Index: coregrind/m_libcfile.c
===================================================================
--- coregrind/m_libcfile.c (revision 13367)
+++ coregrind/m_libcfile.c (working copy)
@@ -191,6 +191,22 @@
return ret;
}
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+/* Special for Android to write to /dev/log/XXX */
+Int VG_(writev) ( Int fd, const struct vg_iovec* iov, Int iovcnt)
+{
+ Int ret;
+ SysRes res = VG_(do_syscall3)(__NR_writev, fd, (UWord)iov, iovcnt);
+ if (sr_isError(res)) {
+ ret = - (Int)(Word)sr_Err(res);
+ vg_assert(ret < 0);
+ } else {
+ ret = (Int)(Word)sr_Res(res);
+ vg_assert(ret >= 0);
+ }
+ return ret;
+}
+#endif
Int VG_(pipe) ( Int fd[2] )
{
Index: include/pub_tool_libcfile.h
===================================================================
--- include/pub_tool_libcfile.h (revision 13367)
+++ include/pub_tool_libcfile.h (working copy)
@@ -68,6 +68,13 @@
ULong ctime_nsec;
};
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+struct vg_iovec {
+ void *iov_base;
+ Int iov_len;
+};
+#endif
+
extern SysRes VG_(mknod) ( const HChar* pathname, Int mode, UWord dev );
extern SysRes VG_(open) ( const HChar* pathname, Int flags, Int mode );
/* fd_open words like the open(2) system call:
@@ -76,6 +83,9 @@
extern void VG_(close) ( Int fd );
extern Int VG_(read) ( Int fd, void* buf, Int count);
extern Int VG_(write) ( Int fd, const void* buf, Int count);
+#if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android)
+extern Int VG_(writev) ( Int fd, const struct vg_iovec* iov, Int iovcnt);
+#endif
extern Int VG_(pipe) ( Int fd[2] );
extern Off64T VG_(lseek) ( Int fd, Off64T offset, Int whence );
|