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
(10) |
2
(3) |
3
(25) |
4
(8) |
|
5
(13) |
6
(8) |
7
(9) |
8
(10) |
9
(8) |
10
(13) |
11
(12) |
|
12
|
13
(7) |
14
(8) |
15
(11) |
16
(13) |
17
(13) |
18
(11) |
|
19
(13) |
20
(7) |
21
(1) |
22
(1) |
23
(1) |
24
(8) |
25
(15) |
|
26
(16) |
27
(20) |
28
(17) |
29
(10) |
30
(2) |
|
|
|
From: Дмитрий Д. <di...@gm...> - 2011-06-07 18:52:19
|
Fedora 15 after last update (2011-jun-07) has glibc-2.14. configure.in has no support for glibc-2.14 and FAIL Bug filed: https://bugs.kde.org/show_bug.cgi?id=275148 Patch is trivial and similar to rev.11534 (add glibc-2.13 support)\ With this patch i can configure and build V. Dmitry $ svn diff Index: configure.in =================================================================== --- configure.in (revision 11797) +++ configure.in (working copy) @@ -779,6 +779,13 @@ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ;; + 2.14) + AC_MSG_RESULT(2.14 family) + AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x]) + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; aix5) AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3) AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3]) @@ -792,7 +799,7 @@ *) AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) - AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.13]) + AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.14]) AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION]) AC_MSG_ERROR([or Darwin libc]) ;; |
|
From: Julian S. <js...@ac...> - 2011-06-06 12:44:14
|
On Saturday, June 04, 2011, Tom Hughes wrote:
> On 03/06/11 22:53, Julian Seward wrote:
> > Of course this leads to the obvious question of how to figure out
> > the magic number we need to add to addresses added to debuginfo
> > symbols to get them to match those in the main object. I guess
> > that must be stashed in the main object somewhere, since it's
> > that that the prelinking affects?
>
> Is it not just the difference between the virtual addresses for the
> relevant section in the section table of the two files?
Well, yes. So assuming that the bias computed for the section in the
main file is correct, then the bias for the section in the debuginfo
file should be findable by adding the value you described. Sound
plausible?
The patch below does just that. It works for me.
J
Index: coregrind/m_debuginfo/readelf.c
===================================================================
--- coregrind/m_debuginfo/readelf.c (revision 11797)
+++ coregrind/m_debuginfo/readelf.c (working copy)
@@ -2179,8 +2179,12 @@
shdr_strtab_dimg + shdr->sh_name))
{ \
vg_assert(di->sec##_size == shdr->sh_size); \
vg_assert(di->sec##_avma + shdr->sh_addr +
seg##_dbias); \
+ /* use the main object's bias as the starting point */ \
+ /* for computing the debuginfo's bias. */ \
di->sec##_debug_svma = shdr->sh_addr; \
- di->sec##_debug_bias = seg##_dbias; \
+ di->sec##_debug_bias \
+ = di->sec##_bias + \
+ di->sec##_svma - di->sec##_debug_svma; \
TRACE_SYMTAB("acquiring ." #sec " debug svma = %#lx ..
%#lx\n", \
di->sec##_debug_svma, \
di->sec##_debug_svma + di->sec##_size - 1);
\
|
|
From: <sv...@va...> - 2011-06-06 10:22:37
|
Author: sewardj
Date: 2011-06-06 11:17:46 +0100 (Mon, 06 Jun 2011)
New Revision: 2157
Log:
Add some more spec rules, for performance purposes:
* S and NS after LOGICL
* BE after SUBB
* B after SUBL
Modified:
trunk/priv/guest_amd64_helpers.c
Modified: trunk/priv/guest_amd64_helpers.c
===================================================================
--- trunk/priv/guest_amd64_helpers.c 2011-06-05 17:56:03 UTC (rev 2156)
+++ trunk/priv/guest_amd64_helpers.c 2011-06-06 10:17:46 UTC (rev 2157)
@@ -1030,6 +1030,15 @@
mkU32(0)));
}
+ if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondB)) {
+ /* long sub/cmp, then B (unsigned less than)
+ --> test dst <u src */
+ return unop(Iop_1Uto64,
+ binop(Iop_CmpLT32U,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)));
+ }
+
/*---------------- SUBW ----------------*/
if (isU64(cc_op, AMD64G_CC_OP_SUBW) && isU64(cond, AMD64CondZ)) {
@@ -1074,6 +1083,15 @@
unop(Iop_64to8,cc_dep2)));
}
+ if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondBE)) {
+ /* byte sub/cmp, then BE (unsigned less than or equal)
+ --> test dst <=u src */
+ return unop(Iop_1Uto64,
+ binop(Iop_CmpLE64U,
+ binop(Iop_And64, cc_dep1, mkU64(0xFF)),
+ binop(Iop_And64, cc_dep2, mkU64(0xFF))));
+ }
+
if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondS)
&& isU64(cc_dep2, 0)) {
/* byte sub/cmp of zero, then S --> test (dst-0 <s 0)
@@ -1131,7 +1149,6 @@
unop(Iop_64to32, cc_dep1),
mkU32(0)));
}
-
if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondNZ)) {
/* long and/or/xor, then NZ --> test dst!=0 */
return unop(Iop_1Uto64,
@@ -1153,6 +1170,21 @@
mkU32(0)));
}
+ if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondS)) {
+ /* long and/or/xor, then S --> (ULong)result[31] */
+ return binop(Iop_And64,
+ binop(Iop_Shr64, cc_dep1, mkU8(31)),
+ mkU64(1));
+ }
+ if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondNS)) {
+ /* long and/or/xor, then S --> (ULong) ~ result[31] */
+ return binop(Iop_Xor64,
+ binop(Iop_And64,
+ binop(Iop_Shr64, cc_dep1, mkU8(31)),
+ mkU64(1)),
+ mkU64(1));
+ }
+
/*---------------- LOGICB ----------------*/
if (isU64(cc_op, AMD64G_CC_OP_LOGICB) && isU64(cond, AMD64CondZ)) {
|
|
From: Bart V. A. <bva...@ac...> - 2011-06-06 08:35:14
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2011-06-06 02:53:55 EDT Ended at 2011-06-06 04:34:58 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 460 tests, 19 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/addressable (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/deep_templates (stdout) memcheck/tests/describe-block (stderr) memcheck/tests/mempool (stderr) memcheck/tests/mempool2 (stderr) memcheck/tests/origin1-yes (stderr) memcheck/tests/origin3-no (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) callgrind/tests/simwork-both (stdout) callgrind/tests/simwork-both (stderr) callgrind/tests/simwork-branch (stdout) callgrind/tests/simwork-branch (stderr) none/tests/empty-exe (stderr) none/tests/faultstatus (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Rich C. <rc...@wi...> - 2011-06-06 05:44:39
|
Nightly build on ppc32 ( Linux 2.6.27.45-0.1-default ppc )
Started at 2011-06-05 23:26:01 CDT
Ended at 2011-06-06 00:44:25 CDT
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 460 tests, 15 stderr failures, 5 stdout failures, 2 stderrB failures, 0 stdoutB failures, 2 post failures ==
gdbserver_tests/mcinfcallWSRU (stderrB)
gdbserver_tests/mcvabits (stderrB)
memcheck/tests/badjump (stderr)
memcheck/tests/badjump2 (stderr)
memcheck/tests/linux/stack_changes (stderr)
memcheck/tests/origin5-bz2 (stderr)
memcheck/tests/supp_unknown (stderr)
memcheck/tests/varinfo6 (stderr)
massif/tests/deep-D (post)
massif/tests/overloaded-new (post)
none/tests/linux/mremap (stderr)
none/tests/ppc32/jm-fp (stdout)
none/tests/ppc32/jm-fp (stderr)
none/tests/ppc32/power5+_round (stdout)
none/tests/ppc32/power5+_round (stderr)
none/tests/ppc32/round (stdout)
none/tests/ppc32/round (stderr)
none/tests/ppc32/test_fx (stdout)
none/tests/ppc32/test_fx (stderr)
none/tests/ppc32/test_gx (stdout)
helgrind/tests/hg05_race2 (stderr)
helgrind/tests/tc06_two_races_xml (stderr)
helgrind/tests/tc23_bogus_condwait (stderr)
drd/tests/tc23_bogus_condwait (stderr)
=================================================
./valgrind-new/drd/tests/tc23_bogus_condwait.stderr.diff-darwin-amd64
=================================================
--- tc23_bogus_condwait.stderr.exp-darwin-amd64 2011-06-06 00:05:35.000000000 -0500
+++ tc23_bogus_condwait.stderr.out 2011-06-06 00:44:04.000000000 -0500
@@ -3,67 +3,11 @@
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
-Mutex not locked: mutex 0x........, recursion count 0, owner 0.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:72)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:51)
-
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:20)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:51)
-
-Thread 1:
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:75)
-rwlock 0x........ was first observed at:
- at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:57)
-
-Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 2.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:78)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
-
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:24)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
-
-The impossible happened: mutex 0x........ is locked simultaneously by two threads (recursion count 1, owners 2 and 1) !
-Thread 2:
-Mutex not locked by calling thread: mutex 0x........, recursion count 2, owner 1.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: grab_the_lock (tc23_bogus_condwait.c:42)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
-
-Assertion failed: (!r), function main, file tc23_bogus_condwait.c, line 86.
-Process terminating with default action of signal 6 (SIGABRT)
- at 0x........: __kill (in /...libc...)
- by 0x........: __assert_rtn (in /...libc...)
- by 0x........: main (tc23_bogus_condwait.c:86)
+Process terminating with default action of signal 7 (SIGBUS)
+ Invalid address alignment at address 0x........
+ at 0x........: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:?)
+ by 0x........: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.c:?)
+ by 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
-ERROR SUMMARY: 9 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc23_bogus_condwait.stderr.diff-darwin-x86
=================================================
--- tc23_bogus_condwait.stderr.exp-darwin-x86 2011-06-06 00:05:35.000000000 -0500
+++ tc23_bogus_condwait.stderr.out 2011-06-06 00:44:04.000000000 -0500
@@ -3,61 +3,11 @@
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
-Mutex not locked: mutex 0x........, recursion count 0, owner 0.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:72)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:51)
-
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:20)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:51)
-
-Thread 1:
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:75)
-rwlock 0x........ was first observed at:
- at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:57)
-
-Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 2.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:78)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
-
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:24)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
-
-The impossible happened: mutex 0x........ is locked simultaneously by two threads (recursion count 1, owners 2 and 1) !
-Thread 2:
-Mutex not locked by calling thread: mutex 0x........, recursion count 2, owner 1.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: grab_the_lock (tc23_bogus_condwait.c:42)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
+Process terminating with default action of signal 7 (SIGBUS)
+ Invalid address alignment at address 0x........
+ at 0x........: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:?)
+ by 0x........: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.c:?)
+ by 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
-ERROR SUMMARY: 9 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc23_bogus_condwait.stderr.diff-linux-ppc
=================================================
--- tc23_bogus_condwait.stderr.exp-linux-ppc 2011-06-06 00:05:35.000000000 -0500
+++ tc23_bogus_condwait.stderr.out 2011-06-06 00:44:04.000000000 -0500
@@ -6,8 +6,8 @@
Process terminating with default action of signal 7 (SIGBUS)
Invalid address alignment at address 0x........
- at 0x........: (within libpthread-?.?.so)
- by 0x........: pthread_cond_wait@@GLIBC_2.3.2(within libpthread-?.?.so)
+ at 0x........: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:?)
+ by 0x........: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.c:?)
by 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc23_bogus_condwait.stderr.diff-linux-x86
=================================================
--- tc23_bogus_condwait.stderr.exp-linux-x86 2011-06-06 00:05:35.000000000 -0500
+++ tc23_bogus_condwait.stderr.out 2011-06-06 00:44:04.000000000 -0500
@@ -3,84 +3,11 @@
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:20)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-
-Thread 1:
-Mutex not locked: mutex 0x........, recursion count 0, owner 0.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:72)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:51)
-
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:24)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:51)
-
-Thread 1:
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:75)
-rwlock 0x........ was first observed at:
- at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:57)
-
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:28)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-rwlock 0x........ was first observed at:
- at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:57)
-
-Thread 1:
-Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 2.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:78)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
-
-Thread 3:
-Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
- at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:32)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-cond 0x........ was first observed at:
- at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:56)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
-
-The impossible happened: mutex 0x........ is locked simultaneously by two threads (recursion count 1, owners 2 and 1) !
-Thread 2:
-Mutex not locked by calling thread: mutex 0x........, recursion count 2, owner 1.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: grab_the_lock (tc23_bogus_condwait.c:42)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:53)
+Process terminating with default action of signal 7 (SIGBUS)
+ Invalid address alignment at address 0x........
+ at 0x........: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:?)
+ by 0x........: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.c:?)
+ by 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
-ERROR SUMMARY: 11 errors from 9 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/gdbserver_tests/mcinfcallWSRU.stderrB.diff
=================================================
--- mcinfcallWSRU.stderrB.exp 2011-06-06 00:05:16.000000000 -0500
+++ mcinfcallWSRU.stderrB.out 2011-06-06 00:21:19.000000000 -0500
@@ -26,30 +26,27 @@
$1 = void
[Switching to thread 2 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
[Switching to thread 3 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
[Switching to thread 4 (Thread ....)]
#0 0x........ in syscall ...
-Could not write register "xxx"; remote failure reply 'E.
+Remote failure reply: E.
ERROR changing register xxx regno y
gdb commands changing registers (pc, sp, ...) (e.g. 'jump',
set pc, calling from gdb a function in the debugged process, ...)
can only be accepted if the thread is VgTs_Runnable or VgTs_Yielding state
Thread status is VgTs_WaitSys
-'
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-new/gdbserver_tests/mcvabits.stderrB.diff
=================================================
--- mcvabits.stderrB.exp 2011-06-06 00:05:16.000000000 -0500
+++ mcvabits.stderrB.out 2011-06-06 00:21:43.000000000 -0500
@@ -1,55 +1,32 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 defined
- Address 0x........ is 0 bytes inside data symbol "undefined"
-00000000 00000000 0000
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00ff00 ff00ff00 ff00
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff000000 0000ff00 ff00
-Address 0x........ len 10 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00ffff ffffff00 ff00
-Address 0x........ len 2 addressable
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 2 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-ff00
-Address 0x........ len 2 not addressable:
-bad address 0x........
- Address 0x........ is 2 bytes inside data symbol "undefined"
-Address 0x........ len 2 not addressable:
-bad address 0x........
- Address 0x........ is 2 bytes inside data symbol "undefined"
-____
-Address 0x........ len 2 has 2 bytes unaddressable
-Address 0x........ len 6 addressable
- Address 0x........ is 4 bytes inside data symbol "undefined"
-Address 0x........ len 6 not defined:
-Uninitialised value at 0x........
- Address 0x........ is 4 bytes inside data symbol "undefined"
-ffffff00 ff00
-Address 0x........ len 10 not addressable:
-bad address 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-Address 0x........ len 10 not addressable:
-bad address 0x........
- Address 0x........ is 0 bytes inside data symbol "undefined"
-0000____ 00000000 0000
-Address 0x........ len 10 has 2 bytes unaddressable
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
+Undefined command: "eval". Try "help".
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-new/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2011-06-06 00:05:14.000000000 -0500
+++ hg05_race2.stderr.out 2011-06-06 00:33:51.000000000 -0500
@@ -17,8 +17,6 @@
at 0x........: th (hg05_race2.c:17)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
Possible data race during write of size 4 at 0x........ by thread #x
at 0x........: th (hg05_race2.c:17)
@@ -28,8 +26,6 @@
at 0x........: th (hg05_race2.c:17)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2011-06-06 00:05:14.000000000 -0500
+++ tc06_two_races_xml.stderr.out 2011-06-06 00:34:36.000000000 -0500
@@ -45,11 +45,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>do_clone</fn>
+ <dir>...</dir>
+ <file>createthread.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>pthread_create@@GLIBC_2.2.5</fn>
+ <fn>pthread_create@@GLIBC_2.1</fn>
+ <dir>...</dir>
+ <file>createthread.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
@@ -121,6 +127,9 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
@@ -175,6 +184,9 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
@@ -229,6 +241,9 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
@@ -283,6 +298,9 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
=================================================
./valgrind-new/helgrind/tests/tc23_bogus_condwait.stderr.diff
=================================================
--- tc23_bogus_condwait.stderr.exp 2011-06-06 00:05:14.000000000 -0500
+++ tc23_bogus_condwait.stderr.out 2011-06-06 00:35:41.000000000 -0500
@@ -2,39 +2,24 @@
Thread #x is the program's root thread
Thread #x: pthread_cond_{timed}wait called with invalid mutex
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:69)
-Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:72)
-
-Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:72)
-
-Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t*
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:75)
-
-Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:75)
-Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+Process terminating with default action of signal 7 (SIGBUS)
+ Invalid address alignment at address 0x........
+ at 0x........: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:64)
+ by 0x........: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.c:108)
by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:78)
+ by 0x........: main (tc23_bogus_condwait.c:69)
+Thread #x was created
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:61)
-Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
- by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc23_bogus_condwait.c:78)
+Thread #x: Exiting thread still holds 1 lock
+ ...
+ ...
-ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/massif/tests/deep-D.post.diff
=================================================
--- deep-D.post.exp 2011-06-06 00:05:22.000000000 -0500
+++ deep-D.post.out 2011-06-06 00:30:11.000000000 -0500
@@ -46,8 +46,9 @@
8 3,264 3,264 3,200 64 0
9 3,672 3,672 3,600 72 0
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
-->98.04% (3,600B) 0x........: (below main)
-
+->98.04% (3,600B) 0x........: ??? (in /...libc...)
+ ->98.04% (3,600B) 0x........: (below main)
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
=================================================
./valgrind-new/massif/tests/overloaded-new.post.diff
=================================================
--- overloaded-new.post.exp 2011-06-06 00:05:22.000000000 -0500
+++ overloaded-new.post.out 2011-06-06 00:30:22.000000000 -0500
@@ -42,14 +42,18 @@
4 12,032 12,032 12,000 32 0
5 12,032 12,032 12,000 32 0
99.73% (12,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
-->33.24% (4,000B) 0x........: main (overloaded-new.cpp:49)
-|
-->33.24% (4,000B) 0x........: main (overloaded-new.cpp:50)
-|
-->16.62% (2,000B) 0x........: main (overloaded-new.cpp:51)
-|
-->16.62% (2,000B) 0x........: main (overloaded-new.cpp:52)
-
+->33.24% (4,000B) 0x........: operator new(unsigned int) (overloaded-new.cpp:19)
+| ->33.24% (4,000B) 0x........: main (overloaded-new.cpp:49)
+|
+->33.24% (4,000B) 0x........: operator new(unsigned int, std::nothrow_t const&) (overloaded-new.cpp:24)
+| ->33.24% (4,000B) 0x........: main (overloaded-new.cpp:50)
+|
+->16.62% (2,000B) 0x........: operator new[](unsigned int) (overloaded-new.cpp:29)
+| ->16.62% (2,000B) 0x........: main (overloaded-new.cpp:51)
+|
+->16.62% (2,000B) 0x........: operator new[](unsigned int, std::nothrow_t const&) (overloaded-new.cpp:34)
+ ->16.62% (2,000B) 0x........: main (overloaded-new.cpp:52)
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
=================================================
./valgrind-new/memcheck/tests/badjump.stderr.diff
=================================================
--- badjump.stderr.exp 2011-06-06 00:05:20.000000000 -0500
+++ badjump.stderr.out 2011-06-06 00:23:08.000000000 -0500
@@ -1,6 +1,7 @@
Jump to the invalid address stated on the next line
at 0x........: ???
+ by 0x........: ??? (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
@@ -8,6 +9,7 @@
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
at 0x........: ???
+ by 0x........: ??? (in /...libc...)
by 0x........: (below main)
If you believe this happened as a result of a stack
overflow in your program's main thread (unlikely but
=================================================
./valgrind-new/memcheck/tests/badjump.stderr.diff-s390x
=================================================
--- badjump.stderr.exp-s390x 2011-06-06 00:05:20.000000000 -0500
+++ badjump.stderr.out 2011-06-06 00:23:08.000000000 -0500
@@ -1,14 +1,16 @@
Jump to the invalid address stated on the next line
at 0x........: ???
- by 0x........: main (badjump.c:17)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
at 0x........: ???
- by 0x........: main (badjump.c:17)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
If you believe this happened as a result of a stack
overflow in your program's main thread (unlikely but
possible), you can try to increase the size of the
=================================================
./valgrind-new/memcheck/tests/badjump2.stderr.diff
=================================================
--- badjump2.stderr.exp 2011-06-06 00:05:20.000000000 -0500
+++ badjump2.stderr.out 2011-06-06 00:23:09.000000000 -0500
@@ -1,5 +1,6 @@
Jump to the invalid address stated on the next line
at 0x........: ???
+ by 0x........: ??? (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
=================================================
./valgrind-new/memcheck/tests/badjump2.stderr.diff-s390x
=================================================
--- badjump2.stderr.exp-s390x 2011-06-06 00:05:20.000000000 -0500
+++ badjump2.stderr.out 2011-06-06 00:23:09.000000000 -0500
@@ -1,6 +1,7 @@
Jump to the invalid address stated on the next line
at 0x........: ???
- by 0x........: main (badjump2.c:46)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Signal caught, as expected
=================================================
./valgrind-new/memcheck/tests/linux/stack_changes.stderr.diff
=================================================
--- stack_changes.stderr.exp 2011-06-06 00:05:19.000000000 -0500
+++ stack_changes.stderr.out 2011-06-06 00:24:34.000000000 -0500
@@ -0,0 +1,5 @@
+WARNING: unhandled syscall: 249
+You may be able to write your own handler.
+Read the file README_MISSING_SYSCALL_OR_IOCTL.
+Nevertheless we consider this a bug. Please report
+it at http://valgrind.org/support/bug_reports.html.
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2011-06-06 00:05:20.000000000 -0500
+++ origin5-bz2.stderr.out 2011-06-06 00:25:57.000000000 -0500
@@ -11,7 +11,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -19,7 +19,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -27,7 +27,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -38,7 +38,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -49,7 +49,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -60,7 +60,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -71,18 +71,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -93,7 +82,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -104,7 +93,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -115,7 +104,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2011-06-06 00:05:20.000000000 -0500
+++ origin5-bz2.stderr.out 2011-06-06 00:25:57.000000000 -0500
@@ -11,7 +11,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -19,7 +19,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -27,7 +27,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -38,7 +38,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -49,7 +49,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -60,7 +60,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -71,7 +71,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -82,7 +82,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -93,7 +93,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -104,7 +104,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2011-06-06 00:05:20.000000000 -0500
+++ origin5-bz2.stderr.out 2011-06-06 00:25:57.000000000 -0500
@@ -28,7 +28,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -38,7 +39,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -48,7 +50,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2855)
+ at 0x........: mainSort (origin5-bz2.c:2854)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -58,7 +61,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2859)
+ at 0x........: mainSort (origin5-bz2.c:2858)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -68,7 +72,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -78,7 +83,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2964)
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2011-06-06 00:05:20.000000000 -0500
+++ origin5-bz2.stderr.out 2011-06-06 00:25:57.000000000 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: handle_compress (origin5-bz2.c:4686)
@@ -9,25 +9,25 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -36,9 +36,9 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -47,9 +47,9 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -58,9 +58,9 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -69,9 +69,9 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -80,9 +80,9 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/supp_unknown.stderr.diff
=================================================
--- supp_unknown.stderr.exp 2011-06-06 00:05:20.000000000 -0500
+++ supp_unknown.stderr.out 2011-06-06 00:27:47.000000000 -0500
@@ -1,7 +1,14 @@
+Jump to the invalid address stated on the next line
+ at 0x........: ???
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
at 0x........: ???
+ by 0x........: ??? (in /...libc...)
by 0x........: (below main)
If you believe this happened as a result of a stack
overflow in your program's main thread (unlikely but
=================================================
./valgrind-new/memcheck/tests/supp_unknown.stderr.diff-s390x
=================================================
--- supp_unknown.stderr.exp-s390x 2011-06-06 00:05:20.000000000 -0500
+++ supp_unknown.stderr.out 2011-06-06 00:27:47.000000000 -0500
@@ -1,8 +1,15 @@
+Jump to the invalid address stated on the next line
+ at 0x........: ???
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
at 0x........: ???
- by 0x........: main (badjump.c:17)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
If you believe this happened as a result of a stack
overflow in your program's main thread (unlikely but
possible), you can try to increase the size of the
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2011-06-06 00:05:20.000000000 -0500
+++ varinfo6.stderr.out 2011-06-06 00:28:30.000000000 -0500
@@ -7,8 +7,7 @@
by 0x........: BZ2_bzCompress (varinfo6.c:4860)
by 0x........: BZ2_bzBuffToBuffCompress (varinfo6.c:5667)
by 0x........: main (varinfo6.c:6517)
- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo6.c:34)
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff-ppc64
=================================================
--- varinfo6.stderr.exp-ppc64 2011-06-06 00:05:20.000000000 -0500
+++ varinfo6.stderr.out 2011-06-06 00:28:30.000000000 -0500
@@ -1,5 +1,5 @@
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: mainSort (varinfo6.c:2999)
by 0x........: BZ2_blockSort (varinfo6.c:3143)
by 0x........: BZ2_compressBlock (varinfo6.c:4072)
@@ -10,7 +10,7 @@
Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: BZ2_decompress (varinfo6.c:1699)
by 0x........: BZ2_bzDecompress (varinfo6.c:5230)
by 0x........: BZ2_bzBuffToBuffDecompress (varinfo6.c:5715)
=================================================
./valgrind-new/none/tests/linux/mremap.stderr.diff
=================================================
--- mremap.stderr.exp 2011-06-06 00:05:29.000000000 -0500
+++ mremap.stderr.out 2011-06-06 00:31:21.000000000 -0500
@@ -1,3 +1,12 @@
-mremap(grow, nomove, constrained): Cannot allocate memory
+mremap(shrink, fixed): Invalid argument
+shrink, nomove: p=0x........ np=0x........: shrink moved?!
+mremap(shrink, maymove): Invalid argument
+shrink, maymove: p=0x........ np=0x........: shrink moved?!
+mremap(grow, fixed): Invalid argument
+grow, nomove: p=0x........ np=0x........: shrink moved?!
+mremap(grow, maymove): Invalid argument
+grow, maymove: p=0x........ np=0x........: shrink moved?!
+mremap(grow, nomove, constrained): Invalid argument
+mremap(grow, maymove, constrained): Invalid argument
=================================================
./valgrind-new/none/tests/linux/mremap.stderr.diff-glibc27
=================================================
--- mremap.stderr.exp-glibc27 2011-06-06 00:05:29.000000000 -0500
+++ mremap.stderr.out 2011-06-06 00:31:21.000000000 -0500
@@ -1,6 +1,12 @@
-mremap(grow, fixed): Cannot allocate memory
+mremap(shrink, fixed): Invalid argument
+shrink, nomove: p=0x........ np=0x........: shrink moved?!
+mremap(shrink, maymove): Invalid argument
+shrink, maymove: p=0x........ np=0x........: shrink moved?!
+mremap(grow, fixed): Invalid argument
grow, nomove: p=0x........ np=0x........: shrink moved?!
+mremap(grow, maymove): Invalid argument
grow, maymove: p=0x........ np=0x........: shrink moved?!
-mremap(grow, nomove, constrained): Cannot allocate memory
+mremap(grow, nomove, constrained): Invalid argument
+mremap(grow, maymove, constrained): Invalid argument
=================================================
./valgrind-new/none/tests/ppc32/jm-fp.stderr.diff
=================================================
--- jm-fp.stderr.exp 2011-06-06 00:05:28.000000000 -0500
+++ jm-fp.stderr.out 2011-06-06 00:31:55.000000000 -0500
@@ -1,2 +1,27 @@
+disInstr(ppc): declined to decode a GeneralPurpose-Optional insn.
+disInstr(ppc): unhandled instruction: 0x........
+ primary 63(0x........), secondary 44(0x........)
+valgrind: Unrecognised instruction at address 0x.........
+ at 0x........: test_fsqrt (jm-insns.c:1986)
+ by 0x........: test_float_one_arg (jm-insns.c:5738)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
+Your program just tried to execute an instruction that Valgrind
+did not recognise. There are two possible reasons for this.
+1. Your program has a bug and erroneously jumped to a non-code
+ location. If you are running Memcheck and you just saw a
+ warning about a bad jump, it's probably your program's fault.
+2. The instruction is legitimate but Valgrind doesn't handle it,
+ i.e. it's Valgrind's fault. If you think this is the case or
+ you are not sure, please let us know and we'll try to fix it.
+Either way, Valgrind will now raise a SIGILL signal which will
+probably kill your program.
+
+Process terminating with default action of signal 4 (SIGILL)
+ Illegal opcode at address 0x........
+ at 0x........: test_fsqrt (jm-insns.c:1986)
+ by 0x........: test_float_one_arg (jm-insns.c:5738)
+ by 0x........: ??? (in /...libc...)
+ by 0x........: (below main)
=================================================
./valgrind-new/none/tests/ppc32/jm-fp.stdout.diff
=================================================
--- jm-fp.stdout.exp 2011-06-06 00:05:28.000000000 -0500
+++ jm-fp.stdout.out 2011-06-06 00:31:55.000000000 -0500
@@ -794,570 +794,4 @@
fnabs 0010000000000001 => 8010000000000001
fnabs 00100094e0000359 => 80100094e0000359
- fnabs 3fe0000000000001 => bfe0000000000001
- fnabs 3fe00094e0000359 => bfe00094e0000359
- fnabs 8010000000000001 => 8010000000000001
- fnabs 80100094e0000359 => 80100094e0000359
- fnabs bfe0000000000001 => bfe0000000000001
- fnabs bfe00094e0000359 => bfe00094e0000359
- fnabs 0000000000000000 => 8000000000000000
- fnabs 8000000000000000 => 8000000000000000
- fnabs 7ff0000000000000 => fff0000000000000
- fnabs fff0000000000000 => fff0000000000000
- fnabs 7ff7ffffffffffff => fff7ffffffffffff
- fnabs fff7ffffffffffff => fff7ffffffffffff
- fnabs 7ff8000000000000 => fff8000000000000
- fnabs fff8000000000000 => fff8000000000000
-
- fsqrt 0010000000000001 => 2000000000000000
- fsqrt 00100094e0000359 => 2000004a6f52dd4a
- fsqrt 3fe0000000000001 => 3fe6a09e667f3bcd
- fsqrt 3fe00094e0000359 => 3fe6a107aacb50df
- fsqrt 8010000000000001 => 7ff8000000000000
- fsqrt 80100094e0000359 => 7ff8000000000000
- fsqrt bfe0000000000001 => 7ff8000000000000
- fsqrt bfe00094e0000359 => 7ff8000000000000
- fsqrt 0000000000000000 => 0000000000000000
- fsqrt 8000000000000000 => 8000000000000000
- fsqrt 7ff0000000000000 => 7ff0000000000000
- fsqrt fff0000000000000 => 7ff8000000000000
- fsqrt 7ff7ffffffffffff => 7fffffffffffffff
- fsqrt fff7ffffffffffff => ffffffffffffffff
- fsqrt 7ff8000000000000 => 7ff8000000000000
- fsqrt fff8000000000000 => fff8000000000000
-
-PPC floating point arith insns
- with one arg with flags update:
- frsp. 0010000000000001 => 0000000000000000
- frsp. 00100094e0000359 => 0000000000000000
- frsp. 3fe0000000000001 => 3fe0000000000000
- frsp. 3fe00094e0000359 => 3fe00094e0000000
- frsp. 8010000000000001 => 8000000000000000
- frsp. 80100094e0000359 => 8000000000000000
- frsp. bfe0000000000001 => bfe0000000000000
- frsp. bfe00094e0000359 => bfe00094e0000000
- frsp. 0000000000000000 => 0000000000000000
- frsp. 8000000000000000 => 8000000000000000
- frsp. 7ff0000000000000 => 7ff0000000000000
- frsp. fff0000000000000 => fff0000000000000
- frsp. 7ff7ffffffffffff => 7fffffffe0000000
- frsp. fff7ffffffffffff => ffffffffe0000000
- frsp. 7ff8000000000000 => 7ff8000000000000
- frsp. fff8000000000000 => fff8000000000000
-
- fctiw. 0010000000000001 => 0000000000000000
- fctiw. 00100094e0000359 => 0000000000000000
- fctiw. 3fe0000000000001 => 0000000000000001
- fctiw. 3fe00094e0000359 => 0000000000000001
- fctiw. 8010000000000001 => 0000000000000000
- fctiw. 80100094e0000359 => 0000000000000000
- fctiw. bfe0000000000001 => 00000000ffffffff
- fctiw. bfe00094e0000359 => 00000000ffffffff
- fctiw. 0000000000000000 => 0000000000000000
- fctiw. 8000000000000000 => 0000000000000000
- fctiw. 7ff0000000000000 => 000000007fffffff
- fctiw. fff0000000000000 => 0000000080000000
- fctiw. 7ff7ffffffffffff => 0000000080000000
- fctiw. fff7ffffffffffff => 0000000080000000
- fctiw. 7ff8000000000000 => 0000000080000000
- fctiw. fff8000000000000 => 0000000080000000
-
- fctiwz. 0010000000000001 => 0000000000000000
- fctiwz. 00100094e0000359 => 0000000000000000
- fctiwz. 3fe0000000000001 => 0000000000000000
- fctiwz. 3fe00094e0000359 => 0000000000000000
- fctiwz. 8010000000000001 => 0000000000000000
- fctiwz. 80100094e0000359 => 0000000000000000
- fctiwz. bfe0000000000001 => 0000000000000000
- fctiwz. bfe00094e0000359 => 0000000000000000
- fctiwz. 0000000000000000 => 0000000000000000
- fctiwz. 8000000000000000 => 0000000000000000
- fctiwz. 7ff0000000000000 => 000000007fffffff
- fctiwz. fff0000000000000 => 0000000080000000
- fctiwz. 7ff7ffffffffffff => 0000000080000000
- fctiwz. fff7ffffffffffff => 0000000080000000
- fctiwz. 7ff8000000000000 => 0000000080000000
- fctiwz. fff8000000000000 => 0000000080000000
-
- fmr. 0010000000000001 => 0010000000000001
- fmr. 00100094e0000359 => 00100094e0000359
- fmr. 3fe0000000000001 => 3fe0000000000001
- fmr. 3fe00094e0000359 => 3fe00094e0000359
- fmr. 8010000000000001 => 8010000000000001
- fmr. 80100094e0000359 => 80100094e0000359
- fmr. bfe0000000000001 => bfe0000000000001
- fmr. bfe00094e0000359 => bfe00094e0000359
- fmr. 0000000000000000 => 0000000000000000
<truncated beyond 100 lines>
=================================================
./valgrind-new/none/tests/ppc32/power5+_round.stderr.diff
=================================================
--- power5+_round.stderr.exp 2011-06-06 00:05:29.000000000 -0500
+++ power5+_round.stderr.out 2011-06-06 00:32:02.000000000 -0500
@@ -1,2 +1,20 @@
+disInstr(ppc): unhandled instruction: 0x........
+ primary 63(0x........), secondary 784(0x........)
+valgrind: Unrecognised instruction at address 0x.........
+ at 0x........: main (power5+_round.c:124)
+Your program just tried to execute an instruction that Valgrind
+did not recognise. There are two possible reasons for this.
...
[truncated message content] |
|
From: Rich C. <rc...@wi...> - 2011-06-06 02:54:13
|
Nightly build on ultra ( gcc 4.5.1 Linux 2.6.37.1-1.2-desktop x86_64 )
Started at 2011-06-05 21:30:02 CDT
Ended at 2011-06-05 21:54:00 CDT
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 566 tests, 76 stderr failures, 56 stdout failures, 1 stderrB failure, 0 stdoutB failures, 3 post failures ==
gdbserver_tests/mssnapshot (stderrB)
memcheck/tests/linux/stack_switch (stderr)
memcheck/tests/origin5-bz2 (stderr)
memcheck/tests/x86/bug152022 (stderr)
memcheck/tests/x86/espindola2 (stderr)
memcheck/tests/x86/fpeflags (stderr)
memcheck/tests/x86/fprem (stdout)
memcheck/tests/x86/fprem (stderr)
memcheck/tests/x86/fxsave (stdout)
memcheck/tests/x86/fxsave (stderr)
memcheck/tests/x86/insn_basic (stdout)
memcheck/tests/x86/insn_basic (stderr)
memcheck/tests/x86/insn_cmov (stdout)
memcheck/tests/x86/insn_cmov (stderr)
memcheck/tests/x86/insn_fpu (stdout)
memcheck/tests/x86/insn_fpu (stderr)
memcheck/tests/x86/insn_mmx (stdout)
memcheck/tests/x86/insn_mmx (stderr)
memcheck/tests/x86/insn_sse (stdout)
memcheck/tests/x86/insn_sse (stderr)
memcheck/tests/x86/insn_sse2 (stdout)
memcheck/tests/x86/insn_sse2 (stderr)
memcheck/tests/x86/more_x86_fp (stdout)
memcheck/tests/x86/more_x86_fp (stderr)
memcheck/tests/x86/pushfpopf (stdout)
memcheck/tests/x86/pushfpopf (stderr)
memcheck/tests/x86/pushfw_x86 (stdout)
memcheck/tests/x86/pushfw_x86 (stderr)
memcheck/tests/x86/pushpopmem (stdout)
memcheck/tests/x86/pushpopmem (stderr)
memcheck/tests/x86/sse1_memory (stdout)
memcheck/tests/x86/sse1_memory (stderr)
memcheck/tests/x86/sse2_memory (stdout)
memcheck/tests/x86/sse2_memory (stderr)
memcheck/tests/x86/tronical (stderr)
memcheck/tests/x86/xor-undef-x86 (stdout)
memcheck/tests/x86/xor-undef-x86 (stderr)
memcheck/tests/x86-linux/bug133694 (stdout)
memcheck/tests/x86-linux/bug133694 (stderr)
memcheck/tests/x86-linux/int3-x86 (stdout)
memcheck/tests/x86-linux/int3-x86 (stderr)
memcheck/tests/x86-linux/scalar (stderr)
memcheck/tests/x86-linux/scalar_exit_group (stderr)
memcheck/tests/x86-linux/scalar_fork (stderr)
memcheck/tests/x86-linux/scalar_supp (stderr)
memcheck/tests/x86-linux/scalar_vfork (stderr)
cachegrind/tests/x86/fpu-28-108 (stderr)
none/tests/x86/aad_aam (stdout)
none/tests/x86/aad_aam (stderr)
none/tests/x86/badseg (stdout)
none/tests/x86/badseg (stderr)
none/tests/x86/bt_everything (stdout)
none/tests/x86/bt_everything (stderr)
none/tests/x86/bt_literal (stdout)
none/tests/x86/bt_literal (stderr)
none/tests/x86/bug125959-x86 (stdout)
none/tests/x86/bug125959-x86 (stderr)
none/tests/x86/bug126147-x86 (stdout)
none/tests/x86/bug126147-x86 (stderr)
none/tests/x86/bug132813-x86 (stdout)
none/tests/x86/bug132813-x86 (stderr)
none/tests/x86/bug135421-x86 (stdout)
none/tests/x86/bug135421-x86 (stderr)
none/tests/x86/bug137714-x86 (stdout)
none/tests/x86/bug137714-x86 (stderr)
none/tests/x86/bug152818-x86 (stdout)
none/tests/x86/bug152818-x86 (stderr)
none/tests/x86/cmpxchg8b (stdout)
none/tests/x86/cmpxchg8b (stderr)
none/tests/x86/cpuid (stdout)
none/tests/x86/cpuid (stderr)
none/tests/x86/cse_fail (stdout)
none/tests/x86/cse_fail (stderr)
none/tests/x86/fcmovnu (stdout)
none/tests/x86/fcmovnu (stderr)
none/tests/x86/fpu_lazy_eflags (stdout)
none/tests/x86/fpu_lazy_eflags (stderr)
none/tests/x86/fxtract (stdout)
none/tests/x86/fxtract (stderr)
none/tests/x86/getseg (stdout)
none/tests/x86/getseg (stderr)
none/tests/x86/incdec_alt (stdout)
none/tests/x86/incdec_alt (stderr)
none/tests/x86/insn_basic (stdout)
none/tests/x86/insn_basic (stderr)
none/tests/x86/insn_cmov (stdout)
none/tests/x86/insn_cmov (stderr)
none/tests/x86/insn_fpu (stdout)
none/tests/x86/insn_fpu (stderr)
none/tests/x86/insn_mmx (stdout)
none/tests/x86/insn_mmx (stderr)
none/tests/x86/insn_sse (stdout)
none/tests/x86/insn_sse (stderr)
none/tests/x86/insn_sse2 (stdout)
none/tests/x86/insn_sse2 (stderr)
none/tests/x86/insn_sse3 (stdout)
none/tests/x86/insn_sse3 (stderr)
none/tests/x86/insn_ssse3 (stdout)
none/tests/x86/insn_ssse3 (stderr)
none/tests/x86/jcxz (stdout)
none/tests/x86/jcxz (stderr)
none/tests/x86/lahf (stdout)
none/tests/x86/lahf (stderr)
none/tests/x86/looper (stdout)
none/tests/x86/looper (stderr)
none/tests/x86/movx (stdout)
none/tests/x86/movx (stderr)
none/tests/x86/pushpopseg (stdout)
none/tests/x86/pushpopseg (stderr)
none/tests/x86/sbbmisc (stdout)
none/tests/x86/sbbmisc (stderr)
none/tests/x86/shift_ndep (stdout)
none/tests/x86/shift_ndep (stderr)
none/tests/x86/smc1 (stdout)
none/tests/x86/smc1 (stderr)
none/tests/x86/ssse3_misaligned (stderr)
none/tests/x86/x86locked (stdout)
none/tests/x86/x86locked (stderr)
none/tests/x86/xadd (stdout)
none/tests/x86/xadd (stderr)
none/tests/x86-linux/seg_override (stdout)
none/tests/x86-linux/seg_override (stderr)
none/tests/x86-linux/sigcontext (stdout)
none/tests/x86-linux/sigcontext (stderr)
helgrind/tests/tc06_two_races_xml (stderr)
exp-sgcheck/tests/bad_percentify (stderr)
exp-bbv/tests/x86/complex_rep (stderr)
exp-bbv/tests/x86/fldcw_check (stderr)
exp-bbv/tests/x86/million (stderr)
exp-bbv/tests/x86/rep_prefix (stderr)
exp-bbv/tests/x86-linux/clone_test (stderr)
exp-bbv/tests/x86-linux/clone_test (post)
exp-bbv/tests/x86-linux/ll (stdout)
exp-bbv/tests/x86-linux/ll (stderr)
=================================================
./valgrind-new/cachegrind/tests/x86/fpu-28-108.stderr.diff
=================================================
--- fpu-28-108.stderr.exp 2011-06-05 21:42:47.765667560 -0500
+++ fpu-28-108.stderr.out 2011-06-05 21:49:27.622185777 -0500
@@ -1,17 +1 @@
-
-
-I refs:
-I1 misses:
-LLi misses:
-I1 miss rate:
-LLi miss rate:
-
-D refs:
-D1 misses:
-LLd misses:
-D1 miss rate:
-LLd miss rate:
-
-LL refs:
-LL misses:
-LL miss rate:
+valgrind: ./fpu-28-108: No such file or directory
=================================================
./valgrind-new/exp-bbv/tests/x86-linux/clone_test.post.diff
=================================================
--- clone_test.post.exp 2011-06-05 21:42:10.782041448 -0500
+++ clone_test.post.out 2011-06-05 21:54:00.068324265 -0500
@@ -1,58 +0,0 @@
-T 4 996 5 2 3 98991
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 1001 2 3 98994
-T 100000
-T 100000
-T 100000
-T 100000
-
-
-# Thread 1
-# Total intervals: 15 (Interval Size 100000)
-# Total instructions: 1501007
-# Total reps: 0
-# Unique reps: 0
-# Total fldcw instructions: 0
-
-T 2 3 99996
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 100000
-T 99996 4
-T 100000
-T 100000
-T 100000
-T 100000
-T 99998 2
-
-
-# Thread 2
-# Total intervals: 25 (Interval Size 100000)
-# Total instructions: 2500001
-# Total reps: 0
-# Unique reps: 0
-# Total fldcw instructions: 0
-
=================================================
./valgrind-new/exp-bbv/tests/x86-linux/clone_test.stderr.diff
=================================================
--- clone_test.stderr.exp 2011-06-05 21:42:10.782041448 -0500
+++ clone_test.stderr.out 2011-06-05 21:54:00.052325725 -0500
@@ -1,12 +0,0 @@
-# Thread 1
-# Total intervals: 15 (Interval Size 100000)
-# Total instructions: 1501007
-# Total reps: 0
-# Unique reps: 0
-# Total fldcw instructions: 0
-# Thread 2
-# Total intervals: 25 (Interval Size 100000)
-# Total instructions: 2500001
-# Total reps: 0
-# Unique reps: 0
-# Total fldcw instructions: 0
=================================================
./valgrind-new/exp-bbv/tests/x86-linux/ll.stderr.diff
=================================================
--- ll.stderr.exp 2011-06-05 21:42:10.781041540 -0500
+++ ll.stderr.out 2011-06-05 21:54:00.090322257 -0500
@@ -1,6 +0,0 @@
-# Thread 1
-# Total intervals: 39 (Interval Size 1000)
-# Total instructions: 39439
-# Total reps: 0
-# Unique reps: 0
-# Total fldcw instructions: 0
=================================================
./valgrind-new/exp-bbv/tests/x86-linux/ll.stdout.diff
=================================================
--- ll.stdout.exp 2011-06-05 21:42:10.781041540 -0500
+++ ll.stdout.out 2011-06-05 21:54:00.085322714 -0500
@@ -1,17 +0,0 @@
-[0;1;37;47m#################################################################[0;30;47m#####[1;37m#########[1;37;40m
-[0;1;37;47m################################################################[0;30;47m#######[1;37m########[1;37;40m
-[0;1;37;47m###################[31m#[37m############################################[0;30;47m##[1;37mO[0;30;47m#[1;37mO[0;30;47m##[1;37m########[1;37;40m
-[0;1;37;47m##[0;30;47m######[1;37m##########[31m##[0;30;47m#[1;37m###########################################[0;30;47m#[1;33m#####[0;30;47m#[1;37m########[1;37;40m
-[0;1;37;47m####[0;30;47m##[1;37m#############[0;30;47m#[1;37m##########################################[0;30;47m##[1;37m##[33m###[37m##[0;30;47m##[1;37m######[1;37;40m
-[0;1;37;47m####[0;30;47m##[1;37m#########[31m###[37m###[0;30;47m###[1;37m#[0;30;47m####[1;37m###[0;30;47m###[1;37m####[0;30;47m###[1;37m##[0;30;47m#####[1;37m#[0;30;47m######[1;37m#####[0;30;47m#[1;37m##########[0;30;47m##[1;37m#####[1;37;40m
-[0;1;37;47m####[0;30;47m##[1;37m########[31m#[37m##[31m#[0;30;47m#[1;37m###[0;30;47m###[1;37m####[0;30;47m##[1;37m##[0;30;47m##[1;37m#####[0;30;47m##[1;37m####[0;30;47m##[1;37m###[0;30;47m##[1;37m#######[0;30;47m#[1;37m############[0;30;47m##[1;37m####[1;37;40m
-[0;1;37;47m####[0;30;47m##[1;37m#######[31m#[37m###[31m#[0;30;47m#[1;37m###[0;30;47m##[1;37m#####[0;30;47m##[1;37m##[0;30;47m##[1;37m#####[0;30;47m##[1;37m######[0;30;47m###[1;37m#########[0;30;47m#[1;37m############[0;30;47m###[1;37m###[1;37;40m
-[0;1;37;47m####[0;30;47m##[1;37m##########[31m##[0;30;47m#[1;37m###[0;30;47m##[1;37m#####[0;30;47m##[1;37m##[0;30;47m##[1;37m#####[0;30;47m##[1;37m######[0;30;47m###[1;37m########[33m##[0;30;47m#[1;37m###########[0;30;47m##[1;33m#[37m###[1;37;40m
-[0;1;37;47m####[0;30;47m##[1;37m#######[0;30;47m#[1;37m#[31m##[0;30;47m#[1;37m####[0;30;47m##[1;37m#####[0;30;47m##[1;37m##[0;30;47m##[1;37m#####[0;30;47m##[1;37m#####[0;30;47m##[1;37m#[0;30;47m##[1;37m#####[33m######[0;30;47m#[1;37m#######[30m#[33m######[37m#[1;37;40m
-[0;1;37;47m####[0;30;47m##[1;37m######[0;30;47m##[1;37m#[31m##[0;30;47m#[1;37m#[0;30;47m#[1;37m##[0;30;47m##[1;37m#####[0;30;47m##[1;37m##[0;30;47m###[1;37m###[0;30;47m###[1;37m####[0;30;47m##[1;37m###[0;30;47m##[1;37m####[33m#######[0;30;47m#[1;37m#####[0;30;47m#[1;33m#######[37m#[1;37;40m
-[0;1;37;47m##[0;30;47m############[1;37m##[0;30;47m###[1;37m##[0;30;47m####[1;37m###[0;30;47m####[1;37m###[0;30;47m####[1;37m#[0;30;47m###[1;37m#[0;30;47m#####[1;37m#[0;30;47m######[1;37m###[33m#####[30m#[0;30;47m#####[1m#[33m#####[37m###[1;37;40m
-
-[7CLinux Version 2.6.29, Compiled #1 SMP Mon May 4 09:51:54 EDT 2009
-[5COne 1665MHz AMD Athlon(tm) Processor, 512M RAM, 3330.53 Bogomips Total
-[37Ctobler[0m
-
=================================================
./valgrind-new/exp-bbv/tests/x86/complex_rep.stderr.diff
=================================================
--- complex_rep.stderr.exp 2011-06-05 21:42:11.141008696 -0500
+++ complex_rep.stderr.out 2011-06-05 21:53:59.951334940 -0500
@@ -1,6 +0,0 @@
-# Thread 1
-# Total intervals: 0 (Interval Size 100000)
-# Total instructions: 8206
-# Total reps: 2100228
-# Unique reps: 2052
-# Total fldcw instructions: 0
=================================================
./valgrind-new/exp-bbv/tests/x86/fldcw_check.stderr.diff
=================================================
--- fldcw_check.stderr.exp 2011-06-05 21:42:11.141008696 -0500
+++ fldcw_check.stderr.out 2011-06-05 21:53:59.975332750 -0500
@@ -1,6 +0,0 @@
-# Thread 1
-# Total intervals: 0 (Interval Size 10000)
-# Total instructions: 9261
-# Total reps: 0
-# Unique reps: 0
-# Total fldcw instructions: 2061
=================================================
./valgrind-new/exp-bbv/tests/x86/million.stderr.diff
=================================================
--- million.stderr.exp 2011-06-05 21:42:11.139008881 -0500
+++ million.stderr.out 2011-06-05 21:54:00.000330469 -0500
@@ -1,6 +0,0 @@
-# Thread 1
-# Total intervals: 10 (Interval Size 100000)
-# Total instructions: 1000000
-# Total reps: 0
-# Unique reps: 0
-# Total fldcw instructions: 0
=================================================
./valgrind-new/exp-bbv/tests/x86/rep_prefix.stderr.diff
=================================================
--- rep_prefix.stderr.exp 2011-06-05 21:42:11.139008881 -0500
+++ rep_prefix.stderr.out 2011-06-05 21:54:00.024328279 -0500
@@ -1,6 +0,0 @@
-# Thread 1
-# Total intervals: 0 (Interval Size 100000)
-# Total instructions: 124
-# Total reps: 229402
-# Unique reps: 26
-# Total fldcw instructions: 0
=================================================
./valgrind-new/exp-sgcheck/tests/bad_percentify.stderr.diff-glibc28-amd64
=================================================
--- bad_percentify.stderr.exp-glibc28-amd64 2011-06-05 21:43:22.902462094 -0500
+++ bad_percentify.stderr.out 2011-06-05 21:53:51.168136485 -0500
@@ -16,7 +16,7 @@
by 0x........: myvprintf_str (bad_percentify.c:187)
by 0x........: VG_debugLog_vprintf (bad_percentify.c:479)
by 0x........: vprintf_to_buf (bad_percentify.c:89)
- by 0x........: vprintf_WRK (bad_percentify.c:102)
+ by 0x........: vprintf_WRK (bad_percentify.c:101)
by 0x........: VG_vprintf (bad_percentify.c:115)
by 0x........: VG_printf (bad_percentify.c:124)
by 0x........: VG_print_translation_stats (bad_percentify.c:622)
=================================================
./valgrind-new/gdbserver_tests/mssnapshot.stderrB.diff
=================================================
--- mssnapshot.stderrB.exp 2011-06-05 21:42:12.960842680 -0500
+++ mssnapshot.stderrB.out 2011-06-05 21:47:48.427236765 -0500
@@ -1,5 +1,11 @@
relaying data between gdb and process ....
+Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
+Try: zypper install -C "debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c"
vgdb-error value changed from 0 to 999999
+Missing separate debuginfo for /lib64/libpthread.so.0
+Try: zypper install -C "debuginfo(build-id)=e23cbc772e670af00bea9874f925e2e61afda713"
+Missing separate debuginfo for /lib64/libc.so.6
+Try: zypper install -C "debuginfo(build-id)=1493bf69b1d671cbad9be1d1b0284fbd9138444b"
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
vg.wait [<ms>] : sleep <ms> (default 0) then continue
=================================================
./valgrind-new/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2011-06-05 21:42:04.955572963 -0500
+++ tc06_two_races_xml.stderr.out 2011-06-05 21:51:20.315902548 -0500
@@ -44,7 +44,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>do_clone</fn>
+ <fn>do_clone.clone.0</fn>
</frame>
<frame>
<ip>0x........</ip>
@@ -122,11 +122,6 @@
<obj>...</obj>
<fn>start_thread</fn>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
- </frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
<xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>...</line> </xauxwhat>
@@ -176,11 +171,6 @@
<obj>...</obj>
<fn>start_thread</fn>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
- </frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
<xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>...</line> </xauxwhat>
@@ -230,11 +220,6 @@
<obj>...</obj>
<fn>start_thread</fn>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
- </frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
<xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>...</line> </xauxwhat>
@@ -284,11 +269,6 @@
<obj>...</obj>
<fn>start_thread</fn>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
- </frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
<xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>...</line> </xauxwhat>
=================================================
./valgrind-new/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2011-06-05 21:42:34.989833050 -0500
+++ stack_switch.stderr.out 2011-06-05 21:48:27.527669124 -0500
@@ -0,0 +1,3 @@
+Syscall param clone(child_tidptr) contains uninitialised byte(s)
+ ...
+
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2011-06-05 21:42:37.894568070 -0500
+++ origin5-bz2.stderr.out 2011-06-05 21:48:47.624835369 -0500
@@ -72,17 +72,6 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -128,6 +117,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2011-06-05 21:42:37.850572082 -0500
+++ origin5-bz2.stderr.out 2011-06-05 21:48:47.624835369 -0500
@@ -117,6 +117,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2011-06-05 21:42:37.906566976 -0500
+++ origin5-bz2.stderr.out 2011-06-05 21:48:47.624835369 -0500
@@ -11,7 +11,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -19,7 +19,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -27,8 +27,9 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -37,8 +38,9 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -47,8 +49,9 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2855)
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2854)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -57,8 +60,9 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2859)
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2858)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -67,8 +71,9 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -77,8 +82,9 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2964)
+Use of uninitialised value of size 8
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -87,7 +93,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2011-06-05 21:42:37.847572357 -0500
+++ origin5-bz2.stderr.out 2011-06-05 21:48:47.624835369 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: handle_compress (origin5-bz2.c:4686)
@@ -9,7 +9,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: handle_compress (origin5-bz2.c:4686)
@@ -17,7 +17,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: handle_compress (origin5-bz2.c:4686)
@@ -25,7 +25,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
@@ -36,7 +36,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
@@ -47,7 +47,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
@@ -58,7 +58,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
@@ -69,7 +69,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
@@ -80,7 +80,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
@@ -91,7 +91,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
@@ -102,7 +102,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86-linux/bug133694.stderr.diff
=================================================
--- bug133694.stderr.exp 2011-06-05 21:42:22.912934791 -0500
+++ bug133694.stderr.out 2011-06-05 21:49:25.956337780 -0500
@@ -0,0 +1 @@
+valgrind: ./bug133694: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86-linux/bug133694.stdout.diff
=================================================
--- bug133694.stdout.exp 2011-06-05 21:42:22.904935528 -0500
+++ bug133694.stdout.out 2011-06-05 21:49:25.933339879 -0500
@@ -1 +0,0 @@
-success
=================================================
./valgrind-new/memcheck/tests/x86-linux/int3-x86.stderr.diff
=================================================
--- int3-x86.stderr.exp 2011-06-05 21:42:22.908935151 -0500
+++ int3-x86.stderr.out 2011-06-05 21:49:25.985335135 -0500
@@ -0,0 +1 @@
+valgrind: ./int3-x86: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86-linux/int3-x86.stdout.diff
=================================================
--- int3-x86.stdout.exp 2011-06-05 21:42:22.913934700 -0500
+++ int3-x86.stdout.out 2011-06-05 21:49:25.962337232 -0500
@@ -1,3 +0,0 @@
-main
-in int_handler, EIP is ...
-PASS
=================================================
./valgrind-new/memcheck/tests/x86-linux/scalar.stderr.diff
=================================================
--- scalar.stderr.exp 2011-06-05 21:42:22.911934882 -0500
+++ scalar.stderr.out 2011-06-05 21:49:26.013332579 -0500
@@ -1,3275 +1 @@
------------------------------------------------------
- 0:__NR_restart_syscall n/a
------------------------------------------------------
------------------------------------------------------
- 1: __NR_exit below
------------------------------------------------------
------------------------------------------------------
- 2: __NR_fork other
------------------------------------------------------
------------------------------------------------------
- 3: __NR_read 1+3s 1m
------------------------------------------------------
-Syscall param (syscallno) contains uninitialised byte(s)
- ...
-
-Syscall param read(fd) contains uninitialised byte(s)
- ...
-
-Syscall param read(buf) contains uninitialised byte(s)
- ...
-
-Syscall param read(count) contains uninitialised byte(s)
- ...
-
-Syscall param read(buf) points to unaddressable byte(s)
- ...
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
------------------------------------------------------
- 4: __NR_write 3s 1m
------------------------------------------------------
-Syscall param write(fd) contains uninitialised byte(s)
- ...
-
-Syscall param write(buf) contains uninitialised byte(s)
- ...
-
-Syscall param write(count) contains uninitialised byte(s)
- ...
-
-Syscall param write(buf) points to unaddressable byte(s)
- ...
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
------------------------------------------------------
- 5: __NR_open (2-args) 2s 1m
------------------------------------------------------
-Syscall param open(filename) contains uninitialised byte(s)
- ...
-
-Syscall param open(flags) contains uninitialised byte(s)
- ...
-
-Syscall param open(filename) points to unaddressable byte(s)
- ...
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
------------------------------------------------------
- 5: __NR_open (3-args) 1s 0m
------------------------------------------------------
-Syscall param open(mode) contains uninitialised byte(s)
- ...
-
------------------------------------------------------
- 6: __NR_close 1s 0m
------------------------------------------------------
-Syscall param close(fd) contains uninitialised byte(s)
- ...
-
------------------------------------------------------
- 7: __NR_waitpid 3s 1m
------------------------------------------------------
-Syscall param waitpid(pid) contains uninitialised byte(s)
- ...
-
-Syscall param waitpid(status) contains uninitialised byte(s)
- ...
-
-Syscall param waitpid(options) contains uninitialised byte(s)
- ...
-
-Syscall param waitpid(status) points to unaddressable byte(s)
- ...
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
------------------------------------------------------
- 8: __NR_creat 2s 1m
------------------------------------------------------
-Syscall param creat(pathname) contains uninitialised byte(s)
- ...
-
-Syscall param creat(mode) contains uninitialised byte(s)
- ...
-
-Syscall param creat(pathname) points to unaddressable byte(s)
- ...
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86-linux/scalar_exit_group.stderr.diff
=================================================
--- scalar_exit_group.stderr.exp 2011-06-05 21:42:22.912934791 -0500
+++ scalar_exit_group.stderr.out 2011-06-05 21:49:26.041330025 -0500
@@ -1,6 +1 @@
------------------------------------------------------
-252: __NR_exit_group 1s 0m
------------------------------------------------------
-Syscall param exit_group(status) contains uninitialised byte(s)
- ...
-
+valgrind: ./scalar_exit_group: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86-linux/scalar_fork.stderr.diff
=================================================
--- scalar_fork.stderr.exp 2011-06-05 21:42:22.905935432 -0500
+++ scalar_fork.stderr.out 2011-06-05 21:49:26.067327653 -0500
@@ -1,3 +1 @@
------------------------------------------------------
- 2: __NR_fork 0e
------------------------------------------------------
+valgrind: ./scalar_fork: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86-linux/scalar_supp.stderr.diff
=================================================
--- scalar_supp.stderr.exp 2011-06-05 21:42:22.913934700 -0500
+++ scalar_supp.stderr.out 2011-06-05 21:49:26.093325281 -0500
@@ -1,9 +1 @@
-Syscall param (syscallno) contains uninitialised byte(s)
- ...
-
-Syscall param write(fd) contains uninitialised byte(s)
- ...
-
-Syscall param write(count) contains uninitialised byte(s)
- ...
-
+valgrind: ./scalar_supp: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86-linux/scalar_vfork.stderr.diff
=================================================
--- scalar_vfork.stderr.exp 2011-06-05 21:42:22.913934700 -0500
+++ scalar_vfork.stderr.out 2011-06-05 21:49:26.125322361 -0500
@@ -1,3 +1 @@
------------------------------------------------------
-190: __NR_vfork 0e
------------------------------------------------------
+valgrind: ./scalar_vfork: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/bug152022.stderr.diff
=================================================
--- bug152022.stderr.exp 2011-06-05 21:42:37.618593263 -0500
+++ bug152022.stderr.out 2011-06-05 21:49:25.445384403 -0500
@@ -0,0 +1 @@
+valgrind: ./bug152022: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/espindola2.stderr.diff
=================================================
--- espindola2.stderr.exp 2011-06-05 21:42:37.625592606 -0500
+++ espindola2.stderr.out 2011-06-05 21:49:25.475381665 -0500
@@ -0,0 +1 @@
+valgrind: ./espindola2: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/fpeflags.stderr.diff
=================================================
--- fpeflags.stderr.exp 2011-06-05 21:42:37.627592428 -0500
+++ fpeflags.stderr.out 2011-06-05 21:49:25.501379293 -0500
@@ -0,0 +1 @@
+valgrind: ./fpeflags: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/fprem.stderr.diff
=================================================
--- fprem.stderr.exp 2011-06-05 21:42:37.619593168 -0500
+++ fprem.stderr.out 2011-06-05 21:49:25.526377012 -0500
@@ -0,0 +1 @@
+valgrind: ./fprem: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/fprem.stdout.diff
=================================================
--- fprem.stdout.exp 2011-06-05 21:42:37.617593365 -0500
+++ fprem.stdout.out 2011-06-05 21:49:25.507378747 -0500
@@ -1,3 +0,0 @@
-fprem 0.693147
-fprem1 0.693147
-fsincos 0.130278
=================================================
./valgrind-new/memcheck/tests/x86/fxsave.stderr.diff
=================================================
--- fxsave.stderr.exp 2011-06-05 21:42:37.628592337 -0500
+++ fxsave.stderr.out 2011-06-05 21:49:25.552374640 -0500
@@ -0,0 +1 @@
+valgrind: ./fxsave: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/fxsave.stdout.diff
=================================================
--- fxsave.stdout.exp 2011-06-05 21:42:37.626592518 -0500
+++ fxsave.stdout.out 2011-06-05 21:49:25.533376374 -0500
@@ -1,104 +0,0 @@
-Re-run with any arg to suppress least-significant
- 16 bits of FP numbers
-
-BEFORE
- 0 7f 03 00 10 fc 00 00 00 00 00 00 00 00 00 00 00
- 16 00 00 00 00 00 00 00 00 80 1f 00 00 ff ff ff ff
- 32 xx xx 00 00 00 00 00 80 ff 3f 00 00 00 00 00 00
- 48 xx xx 68 21 a2 da 0f c9 00 40 00 00 00 00 00 00
- 64 xx xx cf fb 84 9a 20 9a fd 3f 00 00 00 00 00 00
- 80 xx xx cf d1 f7 17 72 b1 fe 3f 00 00 00 00 00 00
- 96 xx xx 00 00 00 00 00 80 ff 3f 00 00 00 00 00 00
-112 xx xx 68 21 a2 da 0f c9 00 40 00 00 00 00 00 00
-128 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-144 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-160 78 56 34 12 44 33 22 11 88 77 66 55 21 43 65 87
-176 01 ef cd ab dd cc bb aa 11 00 ff ee ba dc fe 10
-192 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-208 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-224 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-256 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-272 79 b9 f9 b9 99 ff 99 bb 99 77 99 bb 9b 9f 9b 97
-288 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-304 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-320 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-336 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-352 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-368 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-384 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-400 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-416 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-432 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-448 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-464 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-480 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-496 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-
-ZEROED
- 0 7f 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 16 00 00 00 00 00 00 00 00 80 1f 00 00 ff ff ff ff
- 32 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 48 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 64 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 80 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 96 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-112 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-128 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-144 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-176 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-192 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-208 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-224 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-256 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-272 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-288 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-304 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-320 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-336 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-352 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-368 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-384 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-400 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-416 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-432 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-448 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-464 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-480 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-496 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-
-RESTORED
- 0 7f 03 00 10 fc 00 00 00 00 00 00 00 00 00 00 00
- 16 00 00 00 00 00 00 00 00 80 1f 00 00 ff ff ff ff
- 32 xx xx 00 00 00 00 00 80 ff 3f 00 00 00 00 00 00
- 48 xx xx 68 21 a2 da 0f c9 00 40 00 00 00 00 00 00
- 64 xx xx cf fb 84 9a 20 9a fd 3f 00 00 00 00 00 00
- 80 xx xx cf d1 f7 17 72 b1 fe 3f 00 00 00 00 00 00
- 96 xx xx 00 00 00 00 00 80 ff 3f 00 00 00 00 00 00
-112 xx xx 68 21 a2 da 0f c9 00 40 00 00 00 00 00 00
-128 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-144 xx xx 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-160 78 56 34 12 44 33 22 11 88 77 66 55 21 43 65 87
-176 01 ef cd ab dd cc bb aa 11 00 ff ee ba dc fe 10
-192 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-208 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-224 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-256 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-272 79 b9 f9 b9 99 ff 99 bb 99 77 99 bb 9b 9f 9b 97
-288 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-304 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-320 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-336 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-352 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-368 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
-384 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86/insn_basic.stderr.diff
=================================================
--- insn_basic.stderr.exp 2011-06-05 21:43:21.610579964 -0500
+++ insn_basic.stderr.out 2011-06-05 21:49:25.577372359 -0500
@@ -0,0 +1 @@
+valgrind: ./../../../none/tests/x86/insn_basic: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/insn_basic.stdout.diff
=================================================
--- insn_basic.stdout.exp 2011-06-05 21:43:21.623578761 -0500
+++ insn_basic.stdout.out 2011-06-05 21:49:25.558374093 -0500
@@ -1,1056 +0,0 @@
-adcb_1 ... ok
-adcb_2 ... ok
-adcb_3 ... ok
-adcb_4 ... ok
-adcb_5 ... ok
-adcb_6 ... ok
-adcb_7 ... ok
-adcb_8 ... ok
-adcb_9 ... ok
-adcb_10 ... ok
-adcb_11 ... ok
-adcb_12 ... ok
-adcw_1 ... ok
-adcw_2 ... ok
-adcw_3 ... ok
-adcw_4 ... ok
-adcw_5 ... ok
-adcw_6 ... ok
-adcw_7 ... ok
-adcw_8 ... ok
-adcw_9 ... ok
-adcw_10 ... ok
-adcw_11 ... ok
-adcw_12 ... ok
-adcw_13 ... ok
-adcw_14 ... ok
-adcl_1 ... ok
-adcl_2 ... ok
-adcl_3 ... ok
-adcl_4 ... ok
-adcl_5 ... ok
-adcl_6 ... ok
-adcl_7 ... ok
-adcl_8 ... ok
-adcl_9 ... ok
-adcl_10 ... ok
-adcl_11 ... ok
-adcl_12 ... ok
-adcl_13 ... ok
-adcl_14 ... ok
-addb_1 ... ok
-addb_2 ... ok
-addb_3 ... ok
-addb_4 ... ok
-addb_5 ... ok
-addb_6 ... ok
-addw_1 ... ok
-addw_2 ... ok
-addw_3 ... ok
-addw_4 ... ok
-addw_5 ... ok
-addw_6 ... ok
-addw_7 ... ok
-addl_1 ... ok
-addl_2 ... ok
-addl_3 ... ok
-addl_4 ... ok
-addl_5 ... ok
-addl_6 ... ok
-addl_7 ... ok
-andb_1 ... ok
-andb_2 ... ok
-andb_3 ... ok
-andb_4 ... ok
-andb_5 ... ok
-andb_6 ... ok
-andw_1 ... ok
-andw_2 ... ok
-andw_3 ... ok
-andw_4 ... ok
-andw_5 ... ok
-andw_6 ... ok
-andw_7 ... ok
-andl_1 ... ok
-andl_2 ... ok
-andl_3 ... ok
-andl_4 ... ok
-andl_5 ... ok
-andl_6 ... ok
-andl_7 ... ok
-bsfw_1 ... ok
-bsfw_2 ... ok
-bsfl_1 ... ok
-bsfl_2 ... ok
-bsrw_1 ... ok
-bsrw_2 ... ok
-bsrl_1 ... ok
-bsrl_2 ... ok
-bswapl_1 ... ok
-btw_1 ... ok
-btw_2 ... ok
-btw_3 ... ok
-btw_4 ... ok
-btw_5 ... ok
-btw_6 ... ok
-btw_7 ... ok
-btw_8 ... ok
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86/insn_cmov.stderr.diff
=================================================
--- insn_cmov.stderr.exp 2011-06-05 21:43:21.608580150 -0500
+++ insn_cmov.stderr.out 2011-06-05 21:49:25.605369805 -0500
@@ -0,0 +1 @@
+valgrind: ./../../../none/tests/x86/insn_cmov: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/insn_cmov.stdout.diff
=================================================
--- insn_cmov.stdout.exp 2011-06-05 21:43:21.622578855 -0500
+++ insn_cmov.stdout.out 2011-06-05 21:49:25.584371720 -0500
@@ -1,384 +0,0 @@
-cmova_1 ... ok
-cmova_2 ... ok
-cmova_3 ... ok
-cmova_4 ... ok
-cmova_5 ... ok
-cmova_6 ... ok
-cmova_7 ... ok
-cmova_8 ... ok
-cmovae_1 ... ok
-cmovae_2 ... ok
-cmovae_3 ... ok
-cmovae_4 ... ok
-cmovb_1 ... ok
-cmovb_2 ... ok
-cmovb_3 ... ok
-cmovb_4 ... ok
-cmovbe_1 ... ok
-cmovbe_2 ... ok
-cmovbe_3 ... ok
-cmovbe_4 ... ok
-cmovbe_5 ... ok
-cmovbe_6 ... ok
-cmovbe_7 ... ok
-cmovbe_8 ... ok
-cmovc_1 ... ok
-cmovc_2 ... ok
-cmovc_3 ... ok
-cmovc_4 ... ok
-cmove_1 ... ok
-cmove_2 ... ok
-cmove_3 ... ok
-cmove_4 ... ok
-cmovg_1 ... ok
-cmovg_2 ... ok
-cmovg_3 ... ok
-cmovg_4 ... ok
-cmovg_5 ... ok
-cmovg_6 ... ok
-cmovg_7 ... ok
-cmovg_8 ... ok
-cmovg_9 ... ok
-cmovg_10 ... ok
-cmovg_11 ... ok
-cmovg_12 ... ok
-cmovg_13 ... ok
-cmovg_14 ... ok
-cmovg_15 ... ok
-cmovg_16 ... ok
-cmovge_1 ... ok
-cmovge_2 ... ok
-cmovge_3 ... ok
-cmovge_4 ... ok
-cmovge_5 ... ok
-cmovge_6 ... ok
-cmovge_7 ... ok
-cmovge_8 ... ok
-cmovl_1 ... ok
-cmovl_2 ... ok
-cmovl_3 ... ok
-cmovl_4 ... ok
-cmovl_5 ... ok
-cmovl_6 ... ok
-cmovl_7 ... ok
-cmovl_8 ... ok
-cmovle_1 ... ok
-cmovle_2 ... ok
-cmovle_3 ... ok
-cmovle_4 ... ok
-cmovle_5 ... ok
-cmovle_6 ... ok
-cmovle_7 ... ok
-cmovle_8 ... ok
-cmovle_9 ... ok
-cmovle_10 ... ok
-cmovle_11 ... ok
-cmovle_12 ... ok
-cmovle_13 ... ok
-cmovle_14 ... ok
-cmovle_15 ... ok
-cmovle_16 ... ok
-cmovna_1 ... ok
-cmovna_2 ... ok
-cmovna_3 ... ok
-cmovna_4 ... ok
-cmovna_5 ... ok
-cmovna_6 ... ok
-cmovna_7 ... ok
-cmovna_8 ... ok
-cmovnae_1 ... ok
-cmovnae_2 ... ok
-cmovnae_3 ... ok
-cmovnae_4 ... ok
-cmovnb_1 ... ok
-cmovnb_2 ... ok
-cmovnb_3 ... ok
-cmovnb_4 ... ok
-cmovnbe_1 ... ok
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86/insn_fpu.stderr.diff
=================================================
--- insn_fpu.stderr.exp 2011-06-05 21:43:21.615579486 -0500
+++ insn_fpu.stderr.out 2011-06-05 21:49:25.634367158 -0500
@@ -0,0 +1 @@
+valgrind: ./../../../none/tests/x86/insn_fpu: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/insn_fpu.stdout.diff
=================================================
--- insn_fpu.stdout.exp 2011-06-05 21:43:21.597580947 -0500
+++ insn_fpu.stdout.out 2011-06-05 21:49:25.612369166 -0500
@@ -1,452 +0,0 @@
-fabs_1 ... ok
-fabs_2 ... ok
-fabs_3 ... ok
-fabs_4 ... ok
-fadds_1 ... ok
-fadds_2 ... ok
-fadds_3 ... ok
-fadds_4 ... ok
-faddl_1 ... ok
-faddl_2 ... ok
-faddl_3 ... ok
-faddl_4 ... ok
-fadd_1 ... ok
-fadd_2 ... ok
-fadd_3 ... ok
-fadd_4 ... ok
-fadd_5 ... ok
-fadd_6 ... ok
-fadd_7 ... ok
-fadd_8 ... ok
-fadd_9 ... ok
-fadd_10 ... ok
-fadd_11 ... ok
-fadd_12 ... ok
-fadd_13 ... ok
-fadd_14 ... ok
-fadd_15 ... ok
-fadd_16 ... ok
-faddp_1 ... ok
-faddp_2 ... ok
-faddp_3 ... ok
-faddp_4 ... ok
-faddp_5 ... ok
-faddp_6 ... ok
-faddp_7 ... ok
-faddp_8 ... ok
-faddp_9 ... ok
-faddp_10 ... ok
-faddp_11 ... ok
-faddp_12 ... ok
-faddp_13 ... ok
-faddp_14 ... ok
-faddp_15 ... ok
-faddp_16 ... ok
-fiadds_1 ... ok
-fiadds_2 ... ok
-fiadds_3 ... ok
-fiadds_4 ... ok
-fiadds_5 ... ok
-fiadds_6 ... ok
-fiadds_7 ... ok
-fiadds_8 ... ok
-fiaddl_1 ... ok
-fiaddl_2 ... ok
-fiaddl_3 ... ok
-fiaddl_4 ... ok
-fiaddl_5 ... ok
-fiaddl_6 ... ok
-fiaddl_7 ... ok
-fiaddl_8 ... ok
-fcomi_1 ... ok
-fcomi_2 ... ok
-fcomi_3 ... ok
-fcomi_4 ... ok
-fcomi_5 ... ok
-fcomi_6 ... ok
-fcomip_1 ... ok
-fcomip_2 ... ok
-fcomip_3 ... ok
-fcomip_4 ... ok
-fcomip_5 ... ok
-fcomip_6 ... ok
-fucomi_1 ... ok
-fucomi_2 ... ok
-fucomi_3 ... ok
-fucomi_4 ... ok
-fucomi_5 ... ok
-fucomi_6 ... ok
-fucomip_1 ... ok
-fucomip_2 ... ok
-fucomip_3 ... ok
-fucomip_4 ... ok
-fucomip_5 ... ok
-fucomip_6 ... ok
-fchs_1 ... ok
-fchs_2 ... ok
-fchs_3 ... ok
-fchs_4 ... ok
-fdivs_1 ... ok
-fdivs_2 ... ok
-fdivs_3 ... ok
-fdivs_4 ... ok
-fdivl_1 ... ok
-fdivl_2 ... ok
-fdivl_3 ... ok
-fdivl_4 ... ok
-fdiv_1 ... ok
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86/insn_mmx.stderr.diff
=================================================
--- insn_mmx.stderr.exp 2011-06-05 21:43:21.615579486 -0500
+++ insn_mmx.stderr.out 2011-06-05 21:49:25.659364877 -0500
@@ -0,0 +1 @@
+valgrind: ./../../../none/tests/x86/insn_mmx: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/insn_mmx.stdout.diff
=================================================
--- insn_mmx.stdout.exp 2011-06-05 21:43:21.600580751 -0500
+++ insn_mmx.stdout.out 2011-06-05 21:49:25.641366521 -0500
@@ -1,103 +0,0 @@
-movd_1 ... ok
-movd_2 ... ok
-movd_3 ... ok
-movd_4 ... ok
-movq_1 ... ok
-movq_2 ... ok
-movq_3 ... ok
-packssdw_1 ... ok
-packssdw_2 ... ok
-packsswb_1 ... ok
-packsswb_2 ... ok
-packuswb_1 ... ok
-packuswb_2 ... ok
-paddb_1 ... ok
-paddb_2 ... ok
-paddd_1 ... ok
-paddd_2 ... ok
-paddsb_1 ... ok
-paddsb_2 ... ok
-paddsw_1 ... ok
-paddsw_2 ... ok
-paddusb_1 ... ok
-paddusb_2 ... ok
-paddusw_1 ... ok
-paddusw_2 ... ok
-paddw_1 ... ok
-paddw_2 ... ok
-pand_1 ... ok
-pand_2 ... ok
-pandn_1 ... ok
-pandn_2 ... ok
-pcmpeqb_1 ... ok
-pcmpeqb_2 ... ok
-pcmpeqd_1 ... ok
-pcmpeqd_2 ... ok
-pcmpeqw_1 ... ok
-pcmpeqw_2 ... ok
-pcmpgtb_1 ... ok
-pcmpgtb_2 ... ok
-pcmpgtd_1 ... ok
-pcmpgtd_2 ... ok
-pcmpgtw_1 ... ok
-pcmpgtw_2 ... ok
-pmaddwd_1 ... ok
-pmaddwd_2 ... ok
-pmulhw_1 ... ok
-pmulhw_2 ... ok
-pmullw_1 ... ok
-pmullw_2 ... ok
-por_1 ... ok
-por_2 ... ok
-pslld_1 ... ok
-pslld_2 ... ok
-pslld_3 ... ok
-psllq_1 ... ok
-psllq_2 ... ok
-psllq_3 ... ok
-psllw_1 ... ok
-psllw_2 ... ok
-psllw_3 ... ok
-psrad_1 ... ok
-psrad_2 ... ok
-psrad_3 ... ok
-psraw_1 ... ok
-psraw_2 ... ok
-psraw_3 ... ok
-psrld_1 ... ok
-psrld_2 ... ok
-psrld_3 ... ok
-psrlq_1 ... ok
-psrlq_2 ... ok
-psrlq_3 ... ok
-psrlw_1 ... ok
-psrlw_2 ... ok
-psrlw_3 ... ok
-psubb_1 ... ok
-psubb_2 ... ok
-psubd_1 ... ok
-psubd_2 ... ok
-psubsb_1 ... ok
-psubsb_2 ... ok
-psubsw_1 ... ok
-psubsw_2 ... ok
-psubusb_1 ... ok
-psubusb_2 ... ok
-psubusw_1 ... ok
-psubusw_2 ... ok
-psubw_1 ... ok
-psubw_2 ... ok
-punpckhbw_1 ... ok
-punpckhbw_2 ... ok
-punpckhdq_1 ... ok
-punpckhdq_2 ... ok
-punpckhwd_1 ... ok
-punpckhwd_2 ... ok
-punpcklbw_1 ... ok
-punpcklbw_2 ... ok
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86/insn_sse.stderr.diff
=================================================
--- insn_sse.stderr.exp 2011-06-05 21:43:21.604580455 -0500
+++ insn_sse.stderr.out 2011-06-05 21:49:25.685362505 -0500
@@ -0,0 +1 @@
+valgrind: ./../../../none/tests/x86/insn_sse: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/insn_sse.stdout.diff
=================================================
--- insn_sse.stdout.exp 2011-06-05 21:43:21.616579400 -0500
+++ insn_sse.stdout.out 2011-06-05 21:49:25.666364240 -0500
@@ -1,154 +0,0 @@
-addps_1 ... ok
-addps_2 ... ok
-addss_1 ... ok
-addss_2 ... ok
-andnps_1 ... ok
-andnps_2 ... ok
-andps_1 ... ok
-andps_2 ... ok
-cmpeqps_1 ... ok
-cmpeqps_2 ... ok
-cmpeqss_1 ... ok
-cmpeqss_2 ... ok
-cmpleps_1 ... ok
-cmpleps_2 ... ok
-cmpless_1 ... ok
-cmpless_2 ... ok
-cmpltps_1 ... ok
-cmpltps_2 ... ok
-cmpltss_1 ... ok
-cmpltss_2 ... ok
-cmpunordps_1 ... ok
-cmpunordps_2 ... ok
-cmpunordss_1 ... ok
-cmpunordss_2 ... ok
-cmpneqps_1 ... ok
-cmpneqps_2 ... ok
-cmpneqss_1 ... ok
-cmpneqss_2 ... ok
-cmpnleps_1 ... ok
-cmpnleps_2 ... ok
-cmpnless_1 ... ok
-cmpnless_2 ... ok
-cmpnltps_1 ... ok
-cmpnltps_2 ... ok
-cmpnltss_1 ... ok
-cmpnltss_2 ... ok
-cmpordps_1 ... ok
-cmpordps_2 ... ok
-cmpordss_1 ... ok
-cmpordss_2 ... ok
-comiss_1 ... ok
-comiss_2 ... ok
-comiss_3 ... ok
-comiss_4 ... ok
-comiss_5 ... ok
-comiss_6 ... ok
-cvtpi2ps_1 ... ok
-cvtpi2ps_2 ... ok
-cvtps2pi_1 ... ok
-cvtps2pi_2 ... ok
-cvtsi2ss_1 ... ok
-cvtsi2ss_2 ... ok
-cvtss2si_1 ... ok
-cvtss2si_2 ... ok
-cvttps2pi_1 ... ok
-cvttps2pi_2 ... ok
-cvttss2si_1 ... ok
-cvttss2si_2 ... ok
-divps_1 ... ok
-divps_2 ... ok
-divss_1 ... ok
-divss_2 ... ok
-maxps_1 ... ok
-maxps_2 ... ok
-maxss_1 ... ok
-maxss_2 ... ok
-minps_1 ... ok
-minps_2 ... ok
-minss_1 ... ok
-minss_2 ... ok
-movaps_1 ... ok
-movaps_2 ... ok
-movhlps_1 ... ok
-movhps_1 ... ok
-movhps_2 ... ok
-movlhps_1 ... ok
-movlps_1 ... ok
-movlps_2 ... ok
-movmskps_1 ... ok
-movntps_1 ... ok
-movntq_1 ... ok
-movss_1 ... ok
-movss_2 ... ok
-movss_3 ... ok
-movups_1 ... ok
-movups_2 ... ok
-mulps_1 ... ok
-mulps_2 ... ok
-mulss_1 ... ok
-mulss_2 ... ok
-orps_1 ... ok
-orps_2 ... ok
-pavgb_1 ... ok
-pavgb_2 ... ok
-pavgw_1 ... ok
-pavgw_2 ... ok
-pextrw_1 ... ok
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86/insn_sse2.stderr.diff
=================================================
--- insn_sse2.stderr.exp 2011-06-05 21:43:21.609580057 -0500
+++ insn_sse2.stderr.out 2011-06-05 21:49:25.711360133 -0500
@@ -0,0 +1 @@
+valgrind: ./../../../none/tests/x86/insn_sse2: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/insn_sse2.stdout.diff
=================================================
--- insn_sse2.stdout.exp 2011-06-05 21:43:21.622578855 -0500
+++ insn_sse2.stdout.out 2011-06-05 21:49:25.691361959 -0500
@@ -1,343 +0,0 @@
-addpd_1 ... ok
-addpd_2 ... ok
-addsd_1 ... ok
-addsd_2 ... ok
-andpd_1 ... ok
-andpd_2 ... ok
-andnpd_1 ... ok
-andnpd_2 ... ok
-cmpeqpd_1 ... ok
-cmpeqpd_2 ... ok
-cmpltpd_1 ... ok
-cmpltpd_2 ... ok
-cmplepd_1 ... ok
-cmplepd_2 ... ok
-cmpunordpd_1 ... ok
-cmpunordpd_2 ... ok
-cmpneqpd_1 ... ok
-cmpneqpd_2 ... ok
-cmpnltpd_1 ... ok
-cmpnltpd_2 ... ok
-cmpnlepd_1 ... ok
-cmpnlepd_2 ... ok
-cmpordpd_1 ... ok
-cmpordpd_2 ... ok
-cmpeqsd_1 ... ok
-cmpeqsd_2 ... ok
-cmpltsd_1 ... ok
-cmpltsd_2 ... ok
-cmplesd_1 ... ok
-cmplesd_2 ... ok
-cmpunordsd_1 ... ok
-cmpunordsd_2 ... ok
-cmpneqsd_1 ... ok
-cmpneqsd_2 ... ok
-cmpnltsd_1 ... ok
-cmpnltsd_2 ... ok
-cmpnlesd_1 ... ok
-cmpnlesd_2 ... ok
-cmpordsd_1 ... ok
-cmpordsd_2 ... ok
-comisd_1 ... ok
-comisd_2 ... ok
-comisd_3 ... ok
-comisd_4 ... ok
-comisd_5 ... ok
-comisd_6 ... ok
-cvtdq2pd_1 ... ok
-cvtdq2pd_2 ... ok
-cvtdq2ps_1 ... ok
-cvtdq2ps_2 ... ok
-cvtpd2dq_1 ... ok
-cvtpd2dq_2 ... ok
-cvtpd2pi_1 ... ok
-cvtpd2pi_2 ... ok
-cvtpd2ps_1 ... ok
-cvtpd2ps_2 ... ok
-cvtpi2pd_1 ... ok
-cvtpi2pd_2 ... ok
-cvtps2dq_1 ... ok
-cvtps2dq_2 ... ok
-cvtps2pd_1 ... ok
-cvtps2pd_2 ... ok
-cvtsd2si_1 ... ok
-cvtsd2si_2 ... ok
-cvtsd2ss_1 ... ok
-cvtsd2ss_2 ... ok
-cvtsi2sd_1 ... ok
-cvtsi2sd_2 ... ok
-cvtss2sd_1 ... ok
-cvtss2sd_2 ... ok
-cvttpd2pi_1 ... ok
-cvttpd2pi_2 ... ok
-cvttpd2dq_1 ... ok
-cvttpd2dq_2 ... ok
-cvttps2dq_1 ... ok
-cvttps2dq_2 ... ok
-cvttsd2si_1 ... ok
-cvttsd2si_2 ... ok
-divpd_1 ... ok
-divpd_2 ... ok
-divsd_1 ... ok
-divsd_2 ... ok
-lfence_1 ... ok
-maxpd_1 ... ok
-maxpd_2 ... ok
-maxsd_1 ... ok
-maxsd_2 ... ok
-mfence_1 ... ok
-minpd_1 ... ok
-minpd_2 ... ok
-minsd_1 ... ok
-minsd_2 ... ok
-movapd_1 ... ok
-movapd_2 ... ok
-movd_1 ... ok
-movd_2 ... ok
-movd_3 ... ok
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/x86/more_x86_fp.stderr.diff
=================================================
--- more_x86_fp.stderr.exp 2011-06-05 21:42:37.622592876 -0500
+++ more_x86_fp.stderr.out 2011-06-05 21:49:25.737357761 -0500
@@ -0,0 +1 @@
+valgrind: ./more_x86_fp: No such file or directory
=================================================
./valgrind-new/memcheck/tests/x86/more_x86_fp.stdout.diff
=================================================
--- more_x86_fp.stdout.exp 2011-06-05 21:42:37.620593070 -0500
+++ more_x86_fp.stdout.out 2011-06-05 21:49:25.717359586 -0500
@@ -1,175 +0,0 @@
-a=2.000000 b=3.000000 a+b=5.000000
-a=2.000000 b=3.000000 a-b=-1.000000
-a=2.000000 b=3.000000 a*b=6.000000
-a=2.000000 b=3.000000 a/b=0.666667
-a=2.000000 b=3.000000 fmod(a, b)=2.000000
-a=2.000000 sqrt(a)=1.414214
-a=2.000000 sin(a)=0.909297
-a=2.000000 cos(a)=-0.416147
-a=2.000000 tan(a)=-2.185040
-a=2.000000 log(a)=0.693147
-a=2.000000 exp(a)=7.389056
-a=2.000000 b=3.000000 atan2(a, b)=0.588003
-a=2.000000 asin(sin(a))=1.141593
-a=2.000000 acos(cos(a))=2.000000
-a=2.000000 atan(tan(a))=-1.141593
-a=1.400000 b=-5.000000 a+b=-3.600000
-a=1.400000 b=-5.000000 a-b=6.400000
-a=1.400000 b=-5.000000 a*b=-7.000000
-a=1.400000 b=-5.000000 a/b=-0.280000
-a=1.400000 b=-5.000000 fmod(a, b)=1.400000
-a=1.400000 sqrt(a)=1.183216
-a=1.400000 sin(a)=0.985450
-a=1.400000 cos(a)=0.169967
-a=1.400000 tan(a)=5.797884
-a=1.400000 log(a)=0.336472
...
[truncated message content] |
|
From: Tom H. <th...@cy...> - 2011-06-06 02:51:32
|
Nightly build on vauxhall ( x86_64, Fedora 14 ) Started at 2011-06-06 03:20:03 BST Ended at 2011-06-06 03:51:16 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 566 tests, 4 stderr failures, 1 stdout failure, 1 stderrB failure, 1 stdoutB failure, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) memcheck/tests/linux/stack_switch (stderr) memcheck/tests/origin5-bz2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) drd/tests/pth_detached2 (stdout) exp-sgcheck/tests/bad_percentify (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 566 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure, 1 stdoutB failure, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) memcheck/tests/linux/stack_switch (stderr) memcheck/tests/origin5-bz2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) exp-sgcheck/tests/bad_percentify (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Mon Jun 6 03:35:39 2011 --- new.short Mon Jun 6 03:51:16 2011 *************** *** 8,10 **** ! == 566 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure, 1 stdoutB failure, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) --- 8,10 ---- ! == 566 tests, 4 stderr failures, 1 stdout failure, 1 stderrB failure, 1 stdoutB failure, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) *************** *** 14,15 **** --- 14,16 ---- helgrind/tests/tc06_two_races_xml (stderr) + drd/tests/pth_detached2 (stdout) exp-sgcheck/tests/bad_percentify (stderr) |
|
From: Tom H. <th...@cy...> - 2011-06-06 02:46:59
|
Nightly build on bristol ( x86_64, Fedora 15 ) Started at 2011-06-06 03:20:02 BST Ended at 2011-06-06 03:46:37 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 570 tests, 23 stderr failures, 1 stdout failure, 1 stderrB failure, 1 stdoutB failure, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/overlap (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/clreq (stderr) cachegrind/tests/dlclose (stderr) cachegrind/tests/notpower2 (stderr) cachegrind/tests/wrap5 (stderr) cachegrind/tests/x86/fpu-28-108 (stderr) callgrind/tests/notpower2-hwpref (stderr) callgrind/tests/notpower2-use (stderr) callgrind/tests/notpower2-wb (stderr) callgrind/tests/notpower2 (stderr) callgrind/tests/simwork-both (stderr) callgrind/tests/simwork-cache (stderr) callgrind/tests/simwork1 (stderr) callgrind/tests/simwork2 (stderr) callgrind/tests/simwork3 (stderr) callgrind/tests/threads-use (stderr) none/tests/amd64/bug127521-64 (stdout) none/tests/amd64/bug127521-64 (stderr) none/tests/shell (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) exp-sgcheck/tests/bad_percentify (stderr) |
|
From: Tom H. <th...@cy...> - 2011-06-06 02:38:24
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2011-06-06 03:10:03 BST Ended at 2011-06-06 03:38:08 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 569 tests, 4 stderr failures, 4 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcclean_after_fork (stderr) gdbserver_tests/mcclean_after_fork (stdoutB) gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/mcwatchpoints (stdoutB) none/tests/amd64/bug132918 (stdout) none/tests/amd64/fxtract (stdout) none/tests/amd64/sse4-64 (stdout) none/tests/x86/fxtract (stdout) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Christian B. <bor...@de...> - 2011-06-05 20:40:56
|
Nightly build on fedora390 ( Fedora 13/14/15 mix with gcc 3.5.3 on z196 (s390x) ) Started at 2011-06-05 22:10:01 CEST Ended at 2011-06-05 22:40:03 CEST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 476 tests, 6 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) |
|
From: Christian B. <bor...@de...> - 2011-06-05 20:36:37
|
Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP1 gcc 4.3.4 on z196 (s390x) ) Started at 2011-06-05 22:10:01 CEST Ended at 2011-06-05 22:36:26 CEST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 476 tests, 6 stderr failures, 0 stdout failures, 3 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcbreak (stderrB) gdbserver_tests/mcclean_after_fork (stderrB) gdbserver_tests/mssnapshot (stderrB) none/tests/faultstatus (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) |
|
From: Marcin S. <mar...@gm...> - 2011-06-05 18:45:00
|
On Sun, Jun 05, 2011 at 07:29:55PM +0100, Tom Hughes wrote: > On 05/06/11 19:24, Marcin Slusarz wrote: > > MMapTrace / NVTrace > > > > This is a plugin which allows tracing application accesses to mmaped memory. > > It is a very useful tool in figuring out how closed source drivers program > > the hardware. It was created by Dave Airlie for tracing ATI drivers and then > > extended/fixed by others (including me). Now it is mostly used by Nouveau > > developers (http://nouveau.freedesktop.org). > > > > Note that this patch contain nvidia specific code for ioctl tracing, but > > it's completely optional. > > > > Please apply. > > As with the other patch, please open a bug and attach the patch. > Done. https://bugs.kde.org/show_bug.cgi?id=274999 |
|
From: Marcin S. <mar...@gm...> - 2011-06-05 18:44:32
|
On Sun, Jun 05, 2011 at 07:28:37PM +0100, Tom Hughes wrote: > On 05/06/11 19:09, Marcin Slusarz wrote: > > Please apply. > > Please open a ticket in the bug tracker and attach your patch, or it > will likely get missed. > Done. https://bugs.kde.org/show_bug.cgi?id=274998 |
|
From: Tom H. <to...@co...> - 2011-06-05 18:30:06
|
On 05/06/11 19:24, Marcin Slusarz wrote: > MMapTrace / NVTrace > > This is a plugin which allows tracing application accesses to mmaped memory. > It is a very useful tool in figuring out how closed source drivers program > the hardware. It was created by Dave Airlie for tracing ATI drivers and then > extended/fixed by others (including me). Now it is mostly used by Nouveau > developers (http://nouveau.freedesktop.org). > > Note that this patch contain nvidia specific code for ioctl tracing, but > it's completely optional. > > Please apply. As with the other patch, please open a bug and attach the patch. Thanks, Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: Tom H. <to...@co...> - 2011-06-05 18:28:42
|
On 05/06/11 19:09, Marcin Slusarz wrote: > Please apply. Please open a ticket in the bug tracker and attach your patch, or it will likely get missed. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: Marcin S. <mar...@gm...> - 2011-06-05 18:24:47
|
MMapTrace / NVTrace This is a plugin which allows tracing application accesses to mmaped memory. It is a very useful tool in figuring out how closed source drivers program the hardware. It was created by Dave Airlie for tracing ATI drivers and then extended/fixed by others (including me). Now it is mostly used by Nouveau developers (http://nouveau.freedesktop.org). Note that this patch contain nvidia specific code for ioctl tracing, but it's completely optional. Please apply. diff --git a/Makefile.am b/Makefile.am index 6bbe4d4..f906d5f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,7 @@ TOOLS = memcheck \ callgrind \ massif \ lackey \ + mmt \ none \ helgrind \ drd diff --git a/configure.in b/configure.in index a47fede..770ad32 100644 --- a/configure.in +++ b/configure.in @@ -1986,6 +1986,8 @@ AC_CONFIG_FILES([ massif/ms_print lackey/Makefile lackey/tests/Makefile + mmt/Makefile + mmt/tests/Makefile none/Makefile none/tests/Makefile none/tests/amd64/Makefile diff --git a/mmt/Makefile.am b/mmt/Makefile.am new file mode 100644 index 0000000..d964a5e --- /dev/null +++ b/mmt/Makefile.am @@ -0,0 +1,48 @@ +include $(top_srcdir)/Makefile.tool.am + +noinst_PROGRAMS = mmt-@VGCONF_ARCH_PRI@-@VGCONF_OS@ +if VGCONF_HAVE_PLATFORM_SEC +noinst_PROGRAMS += mmt-@VGCONF_ARCH_SEC@-@VGCONF_OS@ +endif + +MMT_SOURCES_COMMON = mmt_main.c + +mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = \ + $(MMT_SOURCES_COMMON) +mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = \ + $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = \ + $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \ + $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) +mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = \ + $(TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@) +mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \ + $(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \ + $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \ + @VALT_LOAD_ADDRESS_PRI@ \ + $(LINK) \ + $(mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \ + $(mmt_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS) + +if VGCONF_HAVE_PLATFORM_SEC +mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = \ + $(MMT_SOURCES_COMMON) +mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = \ + $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) +mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = \ + $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) +mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \ + $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@) +mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD = \ + $(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@) +mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \ + $(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) +mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \ + $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \ + @VALT_LOAD_ADDRESS_SEC@ \ + $(LINK) \ + $(mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \ + $(mmt_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS) +endif diff --git a/mmt/mmaptest/Makefile b/mmt/mmaptest/Makefile new file mode 100644 index 0000000..33929eb --- /dev/null +++ b/mmt/mmaptest/Makefile @@ -0,0 +1,24 @@ +all: build test + +build: mmaptest32 mmaptest64 + +mmaptest32: mmaptest.c + @gcc -m32 -msse mmaptest.c -o mmaptest32 + +mmaptest64: mmaptest.c + @gcc -m64 mmaptest.c -o mmaptest64 + +clean: + @rm -f mmaptest32 mmaptest64 mmaptest32.out1.tmp mmaptest32.out2.tmp mmaptest64.out1.tmp mmaptest64.out2.tmp + +test: test32 test64 + +test32: mmaptest32 + @../../coregrind/valgrind --tool=mmt --mmt-trace-file=/dev/zero ./mmaptest32 >mmaptest32.out1.tmp 2>mmaptest32.out2.tmp || (cat mmaptest32.out1.tmp && cat mmaptest32.out2.tmp && false) + @cat mmaptest32.out1.tmp | diff -u mmaptest32.out1 - + @cat mmaptest32.out2.tmp | grep "^--" | sed "s/^--[0-9]*-- //" | diff -u mmaptest32.out2 - + +test64: mmaptest64 + @../../coregrind/valgrind --tool=mmt --mmt-trace-file=/dev/zero ./mmaptest64 >mmaptest64.out1.tmp 2>mmaptest64.out2.tmp || (cat mmaptest64.out1.tmp && cat mmaptest64.out2.tmp && false) + @cat mmaptest64.out1.tmp | diff -u mmaptest64.out1 - + @cat mmaptest64.out2.tmp | grep "^--" | sed "s/^--[0-9]*-- //" | diff -u mmaptest64.out2 - diff --git a/mmt/mmaptest/mmaptest.c b/mmt/mmaptest/mmaptest.c new file mode 100644 index 0000000..0756b37 --- /dev/null +++ b/mmt/mmaptest/mmaptest.c @@ -0,0 +1,103 @@ +#define _GNU_SOURCE +#include <stdio.h> +#include <unistd.h> +#include <sys/mman.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <stdlib.h> +#include <string.h> + +typedef float v4sf __attribute__((vector_size(16))); + +#define MMAP_LEN 0x1000 +#define STARTING_ADDRESS ((void *)0x77770000) +#define MMAP_OFFSET 0x2000 + +#define NVIDIA_IOCTL_REQUEST 0xc030464e + +unsigned long long data128[] = { + 0x1234567890abcdefULL, 0xdeadbeeffeeddeadULL, + 0x1234567890abcdefULL, 0xdeadbeeffeeddeadULL}; + +int main() +{ + char *ptr; + int fd = open("/dev/zero", O_RDWR); + if (fd < 0) + { + perror("open"); + exit(-1); + } + + unsigned int ioctl_data[16] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + MMAP_OFFSET}; + + ioctl(fd, NVIDIA_IOCTL_REQUEST, ioctl_data); + + ptr = mmap(STARTING_ADDRESS, MMAP_LEN, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, fd, MMAP_OFFSET); + if (ptr == MAP_FAILED) + { + perror("mmap"); + exit(-2); + } + + if (ptr != STARTING_ADDRESS) + { + fprintf(stderr, "failed to mmap at specified address: %p != %p\n", ptr, STARTING_ADDRESS); + exit(-3); + } + + ptr[0x11] = 0x0f; + ptr[0x14] = 0x77; + + ((short *)ptr) [0xC8 / 2] = 0x1234; + ((short *)ptr) [0xCA / 2] = 0x5678; + + ((int *)ptr) [0x190 / 4] = 0x98765432; + ((int *)ptr) [0x194 / 4] = 0xdeadbeef; + + ((long long *)ptr) [0x320 / 8] = 0x1234567890abcdefULL; + ((long long *)ptr) [0x328 / 8] = 0xfedcba9876543210ULL; + + __builtin_ia32_movntq((void *)(ptr + 0x20), data128[0]); + + __builtin_ia32_movntps((void *)(ptr + 0x40), *((v4sf *)data128)); + + printf("%x\n", ptr[0x11]); + printf("%x\n", ptr[0x14]); + printf("%x\n", ((short *)ptr)[0xC8 / 2]); + printf("%x\n", ((short *)ptr)[0xCA / 2]); + printf("%x\n", ((int *)ptr)[0x190 / 4]); + printf("%x\n", ((int *)ptr)[0x194 / 4]); + printf("%llx\n", ((long long *)ptr)[0x320 / 8]); + printf("%llx\n", ((long long *)ptr)[0x328 / 8]); + + __builtin_ia32_movntq(data128, *(unsigned long long *)(ptr + 0x20)); + + __builtin_ia32_movntps((float *)data128, *(v4sf *)(ptr + 0x40)); + + ptr = mremap(ptr, MMAP_LEN, MMAP_LEN + 4096, MREMAP_FIXED | MREMAP_MAYMOVE, + STARTING_ADDRESS + 213411 * 4096); + if (ptr == MAP_FAILED) + { + perror("mremap"); + exit(-97); + } + + if (munmap(ptr, MMAP_LEN) < 0) + { + perror("munmap"); + exit(-98); + } + + if (close(fd) < 0) + { + perror("close"); + exit(-99); + } + + return 0; +} diff --git a/mmt/mmaptest/mmaptest32.out1 b/mmt/mmaptest/mmaptest32.out1 new file mode 100644 index 0000000..23bb6f3 --- /dev/null +++ b/mmt/mmaptest/mmaptest32.out1 @@ -0,0 +1,8 @@ +f +77 +1234 +5678 +98765432 +deadbeef +1234567890abcdef +fedcba9876543210 diff --git a/mmt/mmaptest/mmaptest32.out2 b/mmt/mmaptest/mmaptest32.out2 new file mode 100644 index 0000000..86233a7 --- /dev/null +++ b/mmt/mmaptest/mmaptest32.out2 @@ -0,0 +1,28 @@ +got new mmap at 0x77770000, len: 0x00001000, offset: 0x2000, serial: 1 +w 1:0x0011, 0x0f +w 1:0x0014, 0x77 +w 1:0x00c8, 0x1234 +w 1:0x00ca, 0x5678 +w 1:0x0190, 0x98765432 +w 1:0x0194, 0xdeadbeef +w 1:0x0320, 0x90abcdef +w 1:0x0324, 0x12345678 +w 1:0x0328, 0x76543210 +w 1:0x032c, 0xfedcba98 +w 1:0x0020, 0x12345678,0x90abcdef +w 1:0x0040, 0xdeadbeef,0xfeeddead,0x12345678,0x90abcdef +r 1:0x0011, 0x0f +r 1:0x0014, 0x77 +r 1:0x00c8, 0x1234 +r 1:0x00ca, 0x5678 +r 1:0x0190, 0x98765432 +r 1:0x0194, 0xdeadbeef +r 1:0x0324, 0x12345678 +r 1:0x0320, 0x90abcdef +r 1:0x032c, 0xfedcba98 +r 1:0x0328, 0x76543210 +r 1:0x0024, 0x12345678 +r 1:0x0020, 0x90abcdef +r 1:0x0040, 0xdeadbeef,0xfeeddead,0x12345678,0x90abcdef +changed mmap 0x0:0x0 from: (address: 0x77770000, len: 0x00001000), to: (address: 0xAB913000, len: 0x00002000), offset 0x2000, serial 1 +removed mmap 0x0:0x0 for: 0xAB913000, len: 0x00002000, offset: 0x2000, serial: 1 diff --git a/mmt/mmaptest/mmaptest64.out1 b/mmt/mmaptest/mmaptest64.out1 new file mode 100644 index 0000000..23bb6f3 --- /dev/null +++ b/mmt/mmaptest/mmaptest64.out1 @@ -0,0 +1,8 @@ +f +77 +1234 +5678 +98765432 +deadbeef +1234567890abcdef +fedcba9876543210 diff --git a/mmt/mmaptest/mmaptest64.out2 b/mmt/mmaptest/mmaptest64.out2 new file mode 100644 index 0000000..6ebb0f5 --- /dev/null +++ b/mmt/mmaptest/mmaptest64.out2 @@ -0,0 +1,25 @@ +got new mmap at 0x77770000, len: 0x00001000, offset: 0x2000, serial: 1 +w 1:0x0011, 0x0f +w 1:0x0014, 0x77 +w 1:0x00c8, 0x1234 +w 1:0x00ca, 0x5678 +w 1:0x0190, 0x98765432 +w 1:0x0194, 0xdeadbeef +w 1:0x0320, 0x90abcdef +w 1:0x0324, 0x12345678 +w 1:0x0328, 0x76543210 +w 1:0x032c, 0xfedcba98 +w 1:0x0020, 0x12345678,0x90abcdef +w 1:0x0040, 0xdeadbeef,0xfeeddead,0x12345678,0x90abcdef +r 1:0x0011, 0x0f +r 1:0x0014, 0x77 +r 1:0x00c8, 0x1234 +r 1:0x00ca, 0x5678 +r 1:0x0190, 0x98765432 +r 1:0x0194, 0xdeadbeef +r 1:0x0320, 0x12345678,0x90abcdef +r 1:0x0328, 0xfedcba98,0x76543210 +r 1:0x0020, 0x12345678,0x90abcdef +r 1:0x0040, 0xdeadbeef,0xfeeddead,0x12345678,0x90abcdef +changed mmap 0x0:0x0 from: (address: 0x77770000, len: 0x00001000), to: (address: 0xAB913000, len: 0x00002000), offset 0x2000, serial 1 +removed mmap 0x0:0x0 for: 0xAB913000, len: 0x00002000, offset: 0x2000, serial: 1 diff --git a/mmt/mmt_main.c b/mmt/mmt_main.c new file mode 100644 index 0000000..90d656d --- /dev/null +++ b/mmt/mmt_main.c @@ -0,0 +1,1713 @@ +/*--------------------------------------------------------------------*/ +/*--- nvtrace: mmaptracer tool that tracks NVidia ioctls ---*/ +/*--------------------------------------------------------------------*/ + +/* + Copyright (C) 2006 Dave Airlie + Copyright (C) 2007 Wladimir J. van der Laan + Copyright (C) 2009 Marcin Slusarz <mar...@gm...> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +/* + Vg_UserMsg for important messages + Vg_DebugMsg for memory load/store messages + Vg_DebugExtraMsg for other messages +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_libcassert.h" + +#include "pub_tool_tooliface.h" +#include "pub_tool_debuginfo.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_options.h" +#include "pub_tool_machine.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_vki.h" + +#include "pub_tool_vkiscnums.h" +#include "pub_tool_libcfile.h" +#include "pub_tool_mallocfree.h" + +#include "coregrind/pub_core_basics.h" +#include "coregrind/pub_core_libcassert.h" +#include "coregrind/m_syswrap/priv_types_n_macros.h" + +#include <fcntl.h> +#include <string.h> + +#define MAX_REGIONS 100 +#define MAX_TRACE_FILES 10 + +#ifdef __LP64__ +#define MMT_64BIT +#endif + +static struct mmt_mmap_data { + Addr start; + Addr end; + int fd; + Off64T offset; + UInt id; + UWord data1; + UWord data2; +} mmt_mmaps[MAX_REGIONS]; +static int last_region = -1; + +static struct object_type { + UInt id; // type id + char *name; // some name + UInt cargs; // number of constructor args (uint32) +} object_types[] = +{ + {0x0000, "NV_CONTEXT_NEW", 0}, + + {0x0004, "NV_PTIMER", 0}, + + {0x0041, "NV_CONTEXT", 0}, + + {0x502d, "NV50_2D", 0}, + {0x902d, "NVC0_2D", 0}, + + {0x5039, "NV50_M2MF", 0}, + {0x9039, "NVC0_M2MF", 0}, + + {0x9068, "NVC0_PEEPHOLE", 0}, + + {0x406e, "NV40_FIFO_DMA", 6}, + + {0x506f, "NV50_FIFO_IB", 6}, + {0x826f, "NV84_FIFO_IB", 6}, + {0x906f, "NVC0_FIFO_IB", 6}, + + {0x5070, "NV84_DISPLAY", 4}, + {0x8270, "NV84_DISPLAY", 4}, + {0x8370, "NVA0_DISPLAY", 4}, + {0x8870, "NV98_DISPLAY", 4}, + {0x8570, "NVA3_DISPLAY", 4}, + + {0x5072, NULL, 8}, + + {0x7476, "NV84_VP", 0}, + + {0x507a, "NV50_DISPLAY_CURSOR", 0}, + {0x827a, "NV84_DISPLAY_CURSOR", 0}, + {0x857a, "NVA3_DISPLAY_CURSOR", 0}, + + {0x507b, "NV50_DISPLAY_OVERLAY", 0}, + {0x827b, "NV84_DISPLAY_OVERLAY", 0}, + {0x857b, "NVA3_DISPLAY_OVERLAY", 0}, + + {0x507c, "NV50_DISPLAY_SYNC_FIFO", 8}, + {0x827c, "NV84_DISPLAY_SYNC_FIFO", 8}, + {0x837c, "NVA0_DISPLAY_SYNC_FIFO", 8}, + {0x857c, "NVA3_DISPLAY_SYNC_FIFO", 8}, + + {0x507d, "NV50_DISPLAY_MASTER_FIFO", 0}, + {0x827d, "NV84_DISPLAY_MASTER_FIFO", 0}, + {0x837d, "NVA0_DISPLAY_MASTER_FIFO", 0}, + {0x887d, "NV98_DISPLAY_MASTER_FIFO", 0}, + {0x857d, "NVA3_DISPLAY_MASTER_FIFO", 0}, + + {0x307e, "NV30_PEEPHOLE", 0}, + + {0x507e, "NV50_DISPLAY_OVERLAY_FIFO", 8}, + {0x827e, "NV84_DISPLAY_OVERLAY_FIFO", 8}, + {0x837e, "NVA0_DISPLAY_OVERLAY_FIFO", 8}, + {0x857e, "NVA3_DISPLAY_OVERLAY_FIFO", 8}, + + {0x0080, "NV_DEVICE", 1}, + {0x2080, "NV_SUBDEVICE_0", 0}, + {0x2081, "NV_SUBDEVICE_1", 0}, + {0x2082, "NV_SUBDEVICE_2", 0}, + {0x2083, "NV_SUBDEVICE_3", 0}, + + {0x5097, "NV50_3D", 0}, + {0x8297, "NV84_3D", 0}, + {0x8397, "NVA0_3D", 0}, + {0x8597, "NVA3_3D", 0}, + {0x8697, "NVAF_3D", 0}, + {0x9097, "NVC0_3D", 0}, + + {0x74b0, "NV84_BSP", 0}, + + {0x88b1, "NV98_BSP", 0}, + {0x85b1, "NVA3_BSP", 0}, + {0x86b1, "NVAF_BSP", 0}, + {0x90b1, "NVC0_BSP", 0}, + + {0x88b2, "NV98_VP", 0}, + {0x85b2, "NVA3_VP", 0}, + {0x90b2, "NVC0_VP", 0}, + + {0x88b3, "NV98_PPP", 0}, + {0x85b3, "NVA3_PPP", 0}, + {0x90b3, "NVC0_PPP", 0}, + + {0x88b4, "NV98_CRYPT", 0}, + + {0x85b5, "NVA3_COPY", 0}, + {0x90b5, "NVC0_COPY0", 0}, + + {0x50c0, "NV50_COMPUTE", 0}, + {0x85c0, "NVA3_COMPUTE", 0}, + {0x90c0, "NVC0_COMPUTE", 0}, + + {0x74c1, "NV84_CRYPT", 0}, + + {0x50e0, "NV50_PGRAPH", 0}, + {0x50e2, "NV50_PFIFO", 0}, +}; + +static UInt current_item = 1; + +/* Command line options */ +//UInt mmt_clo_offset = (UInt) -1; +int dump_load = True, dump_store = True; +static int trace_opens = False; + +static struct trace_file { + const char *path; + fd_set fds; +} trace_files[MAX_TRACE_FILES]; +static int trace_all_files = False; + +static int trace_nvidia_ioctls = False; +static int trace_marks = False; +static int trace_mark_fd; +static int trace_mark_cnt = 0; +static fd_set nvidiactl_fds; +static fd_set nvidia0_fds; + +static struct mmt_mmap_data *find_mmap(Addr addr) +{ + struct mmt_mmap_data *region = NULL; + int i; + + for (i = 0; i <= last_region; i++) + { + region = &mmt_mmaps[i]; + if (addr >= region->start && addr < region->end) + return region; + } + + return NULL; +} + +static struct object_type *find_objtype(UInt id) +{ + int i; + int n = sizeof(object_types) / sizeof(struct object_type); + + for (i = 0; i < n; ++i) + if (object_types[i].id == id) + return &object_types[i]; + + return NULL; +} + +static void mydescribe(Addr inst_addr, char *namestr, int len) +{ +#if 0 + const SegInfo *si; + /* Search for it in segments */ + VG_(snprintf) (namestr, len, "@%08x", inst_addr); + for (si = VG_(next_seginfo) (NULL); + si != NULL; si = VG_(next_seginfo) (si)) + { + Addr base = VG_(seginfo_start) (si); + SizeT size = VG_(seginfo_size) (si); + + if (inst_addr >= base && inst_addr < base + size) + { + const UChar *filename = VG_(seginfo_filename) (si); + VG_(snprintf) (namestr, len, "@%08x (%s:%08x)", inst_addr, + filename, inst_addr - base); + + break; + } + } +#else + VG_(strcpy) (namestr, ""); +#endif + +} + +static VG_REGPARM(2) +void trace_store(Addr addr, SizeT size, Addr inst_addr, UWord value) +{ + struct mmt_mmap_data *region; + char valstr[64]; + char namestr[256]; + + region = find_mmap(addr); + if (!region) + return; + + switch (size) + { + case 1: + VG_(sprintf) (valstr, "0x%02lx", value); + break; + case 2: + VG_(sprintf) (valstr, "0x%04lx", value); + break; + case 4: + VG_(sprintf) (valstr, "0x%08lx", value); + break; +#ifdef MMT_64BIT + case 8: + VG_(sprintf) (valstr, "0x%08lx,0x%08lx", value >> 32, value & 0xffffffff); + break; +#endif + default: + return; + } + mydescribe(inst_addr, namestr, 256); + + VG_(message) (Vg_DebugMsg, "w %d:0x%04x, %s %s\n", region->id, (unsigned int)(addr - region->start), valstr, namestr); +} + +static VG_REGPARM(2) +void trace_store2(Addr addr, SizeT size, Addr inst_addr, UWord value1, UWord value2) +{ + struct mmt_mmap_data *region; + char valstr[64]; + char namestr[256]; + + region = find_mmap(addr); + if (!region) + return; + + switch (size) + { + case 4: + VG_(sprintf) (valstr, "0x%08lx,0x%08lx", value1, value2); + break; +#ifdef MMT_64BIT + case 8: + VG_(sprintf) (valstr, "0x%08lx,0x%08lx,0x%08lx,0x%08lx", + value1 >> 32, value1 & 0xffffffff, + value2 >> 32, value2 & 0xffffffff); + break; +#endif + default: + return; + } + + mydescribe(inst_addr, namestr, 256); + + VG_(message) (Vg_DebugMsg, "w %d:0x%04x, %s %s\n", region->id, (unsigned int)(addr - region->start), valstr, namestr); +} + +#ifndef MMT_64BIT +static VG_REGPARM(2) +void trace_store4(Addr addr, Addr inst_addr, UWord value1, UWord value2, UWord value3, UWord value4) +{ + struct mmt_mmap_data *region; + char valstr[64]; + char namestr[256]; + + region = find_mmap(addr); + if (!region) + return; + + VG_(sprintf) (valstr, "0x%08lx,0x%08lx,0x%08lx,0x%08lx", value1, value2, value3, value4); + mydescribe(inst_addr, namestr, 256); + + VG_(message) (Vg_DebugMsg, "w %d:0x%04x, %s %s\n", region->id, (unsigned int)(addr - region->start), valstr, namestr); +} +#endif + +static VG_REGPARM(2) +void trace_load(Addr addr, SizeT size, UInt inst_addr, UWord value) +{ + struct mmt_mmap_data *region; + char valstr[64]; + char namestr[256]; + + region = find_mmap(addr); + if (!region) + return; + + switch (size) + { + case 1: + VG_(sprintf) (valstr, "0x%02lx", value); + break; + case 2: + VG_(sprintf) (valstr, "0x%04lx", value); + break; + case 4: + VG_(sprintf) (valstr, "0x%08lx", value); + break; +#ifdef MMT_64BIT + case 8: + VG_(sprintf) (valstr, "0x%08lx,0x%08lx", value >> 32, value & 0xffffffff); + break; +#endif + default: + return; + } + mydescribe(inst_addr, namestr, 256); + + VG_(message) (Vg_DebugMsg, "r %d:0x%04x, %s %s\n", region->id, (unsigned int)(addr - region->start), valstr, namestr); +} + +static VG_REGPARM(2) +void trace_load2(Addr addr, SizeT size, UInt inst_addr, UWord value1, UWord value2) +{ + struct mmt_mmap_data *region; + char valstr[64]; + char namestr[256]; + + region = find_mmap(addr); + if (!region) + return; + + switch (size) + { + case 4: + VG_(sprintf) (valstr, "0x%08lx,0x%08lx", value1, value2); + break; +#ifdef MMT_64BIT + case 8: + VG_(sprintf) (valstr, "0x%08lx,0x%08lx,0x%08lx,0x%08lx", + value1 >> 32, value1 & 0xffffffff, + value2 >> 32, value2 & 0xffffffff); + break; +#endif + default: + return; + } + mydescribe(inst_addr, namestr, 256); + + VG_(message) (Vg_DebugMsg, "r %d:0x%04x, %s %s\n", region->id, (unsigned int)(addr - region->start), valstr, namestr); +} + +#ifndef MMT_64BIT +static VG_REGPARM(2) +void trace_load4(Addr addr, SizeT size, UInt inst_addr, UWord value1, UWord value2, UWord value3, UWord value4) +{ + struct mmt_mmap_data *region; + char valstr[64]; + char namestr[256]; + + region = find_mmap(addr); + if (!region) + return; + + VG_(sprintf) (valstr, "0x%08lx,0x%08lx,0x%08lx,0x%08lx", value1, value2, value3, value4); + mydescribe(inst_addr, namestr, 256); + + VG_(message) (Vg_DebugMsg, "r %d:0x%04x, %s %s\n", region->id, (unsigned int)(addr - region->start), valstr, namestr); +} +#endif + +static void add_trace_load1(IRSB *bb, IRExpr *addr, Int size, Addr inst_addr, IRExpr *val1) +{ + IRExpr **argv = mkIRExprVec_4(addr, mkIRExpr_HWord(size), + mkIRExpr_HWord(inst_addr), val1); + IRDirty *di = unsafeIRDirty_0_N(2, + "trace_load", + VG_(fnptr_to_fnentry) (trace_load), + argv); + addStmtToIRSB(bb, IRStmt_Dirty(di)); +} + +static void add_trace_load2(IRSB *bb, IRExpr *addr, Int size, Addr inst_addr, IRExpr *val1, IRExpr *val2) +{ + IRExpr **argv = mkIRExprVec_5(addr, mkIRExpr_HWord(size), + mkIRExpr_HWord(inst_addr), val1, val2); + IRDirty *di = unsafeIRDirty_0_N(2, + "trace_load2", + VG_(fnptr_to_fnentry) (trace_load2), + argv); + addStmtToIRSB(bb, IRStmt_Dirty(di)); +} + +#ifndef MMT_64BIT +static void add_trace_load4(IRSB *bb, IRExpr *addr, Int size, Addr inst_addr, IRExpr *val1, IRExpr *val2, IRExpr *val3, IRExpr *val4) +{ + IRExpr **argv = mkIRExprVec_7(addr, mkIRExpr_HWord(size), + mkIRExpr_HWord(inst_addr), val1, val2, val3, val4); + IRDirty *di = unsafeIRDirty_0_N(2, + "trace_load4", + VG_(fnptr_to_fnentry) (trace_load4), + argv); + addStmtToIRSB(bb, IRStmt_Dirty(di)); +} +#endif + +#ifdef MMT_64BIT +static void add_trace_load(IRSB *bb, IRExpr *addr, Int size, Addr inst_addr, IRExpr *data, IRType arg_ty) +{ + IRTemp t; + IRStmt *cast; + IRExpr *data1, *data2; + + switch (arg_ty) + { + case Ity_I8: + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_8Uto64, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + + add_trace_load1(bb, addr, size, inst_addr, data); + break; + + case Ity_I16: + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_16Uto64, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + add_trace_load1(bb, addr, size, inst_addr, data); + break; + + case Ity_F32: + // reinterpret as I32 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF32asI32, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + + // no break; + case Ity_I32: + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_32Uto64, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + + add_trace_load1(bb, addr, size, inst_addr, data); + break; + + case Ity_F64: + // reinterpret as I64 + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF64asI64, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + // no break; + + case Ity_I64: + add_trace_load1(bb, addr, size, inst_addr, data); + break; + + case Ity_V128: + // upper 64 + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128HIto64, data)); + addStmtToIRSB(bb, cast); + data1 = IRExpr_RdTmp(t); + + // lower 64 + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128to64, data)); + addStmtToIRSB(bb, cast); + data2 = IRExpr_RdTmp(t); + + add_trace_load2(bb, addr, sizeofIRType(Ity_I64), inst_addr, data1, data2); + break; + default: + VG_(message) (Vg_UserMsg, "Warning! we missed a read of 0x%08x\n", (UInt) arg_ty); + break; + } +} +#else +static void add_trace_load(IRSB *bb, IRExpr *addr, Int size, Addr inst_addr, IRExpr *data, IRType arg_ty) +{ + IRTemp t; + IRStmt *cast; + IRExpr *data0; + IRExpr *data1, *data2; + IRExpr *data3, *data4; + + switch (arg_ty) + { + case Ity_I8: + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_8Uto32, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + + add_trace_load1(bb, addr, size, inst_addr, data); + break; + + case Ity_I16: + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_16Uto32, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + + add_trace_load1(bb, addr, size, inst_addr, data); + break; + + case Ity_F32: + // reinterpret as I32 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF32asI32, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + + // no break; + case Ity_I32: + add_trace_load1(bb, addr, size, inst_addr, data); + break; + + case Ity_F64: + // reinterpret as I64 + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF64asI64, data)); + + addStmtToIRSB(bb, cast); + data = IRExpr_RdTmp(t); + // no break; + case Ity_I64: + // we cannot pass whole 64-bit value in one parameter, so we split it + + // upper 32 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64HIto32, data)); + addStmtToIRSB(bb, cast); + data1 = IRExpr_RdTmp(t); + + // lower 32 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64to32, data)); + addStmtToIRSB(bb, cast); + data2 = IRExpr_RdTmp(t); + + add_trace_load2(bb, addr, sizeofIRType(Ity_I32), inst_addr, data1, data2); + break; + case Ity_V128: + // upper 64 + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128HIto64, data)); + addStmtToIRSB(bb, cast); + data0 = IRExpr_RdTmp(t); + + // upper 32 of upper 64 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64HIto32, data0)); + addStmtToIRSB(bb, cast); + data1 = IRExpr_RdTmp(t); + + // lower 32 of upper 64 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64to32, data0)); + addStmtToIRSB(bb, cast); + data2 = IRExpr_RdTmp(t); + + // lower 64 + t = newIRTemp(bb->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128to64, data)); + addStmtToIRSB(bb, cast); + data0 = IRExpr_RdTmp(t); + + // upper 32 of lower 64 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64HIto32, data0)); + addStmtToIRSB(bb, cast); + data3 = IRExpr_RdTmp(t); + + // lower 32 of lower 64 + t = newIRTemp(bb->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64to32, data0)); + addStmtToIRSB(bb, cast); + data4 = IRExpr_RdTmp(t); + + add_trace_load4(bb, addr, sizeofIRType(Ity_I32), inst_addr, data1, data2, data3, data4); + break; + default: + VG_(message) (Vg_UserMsg, "Warning! we missed a read of 0x%08x\n", (UInt) arg_ty); + break; + } +} +#endif + +static void +add_trace_store1(IRSB *bb, IRExpr *addr, Int size, Addr inst_addr, + IRExpr *data) +{ + IRExpr **argv = mkIRExprVec_4(addr, mkIRExpr_HWord(size), + mkIRExpr_HWord(inst_addr), data); + IRDirty *di = unsafeIRDirty_0_N(2, + "trace_store", + VG_(fnptr_to_fnentry) (trace_store), + argv); + addStmtToIRSB(bb, IRStmt_Dirty(di)); +} + +static void +add_trace_store2(IRSB *bb, IRExpr *addr, Int size, Addr inst_addr, + IRExpr *data1, IRExpr *data2) +{ + IRExpr **argv = mkIRExprVec_5(addr, mkIRExpr_HWord(size), + mkIRExpr_HWord(inst_addr), + data1, data2); + IRDirty *di = unsafeIRDirty_0_N(2, + "trace_store2", + VG_(fnptr_to_fnentry) (trace_store2), + argv); + addStmtToIRSB(bb, IRStmt_Dirty(di)); +} + +#ifndef MMT_64BIT +static void +add_trace_store4(IRSB *bb, IRExpr *addr, Addr inst_addr, + IRExpr *data1, IRExpr *data2, IRExpr *data3, IRExpr *data4) +{ + IRExpr **argv = mkIRExprVec_6(addr, mkIRExpr_HWord(inst_addr), + data1, data2, data3, data4); + IRDirty *di = unsafeIRDirty_0_N(2, + "trace_store4", + VG_(fnptr_to_fnentry) (trace_store4), + argv); + addStmtToIRSB(bb, IRStmt_Dirty(di)); +} +#endif + +#ifdef MMT_64BIT +static void add_trace_store(IRSB *bbOut, IRExpr *destAddr, Addr inst_addr, + IRType arg_ty, IRExpr *data_expr) +{ + IRTemp t = IRTemp_INVALID; + IRStmt *cast = NULL; + IRExpr *data_expr1, *data_expr2; + + Int size = sizeofIRType(arg_ty); + + switch (arg_ty) + { + case Ity_I8: + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_8Uto64, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + + add_trace_store1(bbOut, destAddr, size, inst_addr, data_expr); + break; + case Ity_I16: + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_16Uto64, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + + add_trace_store1(bbOut, destAddr, size, inst_addr, data_expr); + break; + case Ity_F32: + // reinterpret as I32 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF32asI32, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + + // no break; + case Ity_I32: + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_32Uto64, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + + add_trace_store1(bbOut, destAddr, size, inst_addr, data_expr); + break; + case Ity_F64: + // reinterpret as I64 + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF64asI64, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + // no break; + case Ity_I64: + add_trace_store1(bbOut, destAddr, size, inst_addr, data_expr); + break; + case Ity_V128: + // we cannot pass whole 128-bit value in one parameter, so we split it + + // upper 64 + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128HIto64, data_expr)); + addStmtToIRSB(bbOut, cast); + data_expr1 = IRExpr_RdTmp(t); + + // lower 64 + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128to64, data_expr)); + addStmtToIRSB(bbOut, cast); + data_expr2 = IRExpr_RdTmp(t); + + add_trace_store2(bbOut, destAddr, sizeofIRType(Ity_I64), inst_addr, + data_expr1, data_expr2); + + break; + default: + VG_(message) (Vg_UserMsg, "Warning! we missed a write of 0x%08x\n", (UInt) arg_ty); + break; + } +} +#else +static void add_trace_store(IRSB *bbOut, IRExpr *destAddr, Addr inst_addr, + IRType arg_ty, IRExpr *data_expr) +{ + IRTemp t = IRTemp_INVALID; + IRStmt *cast = NULL; + IRExpr *data_expr0; + IRExpr *data_expr1, *data_expr2; + IRExpr *data_expr3, *data_expr4; + + Int size = sizeofIRType(arg_ty); + + switch (arg_ty) + { + case Ity_I8: + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_8Uto32, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + + add_trace_store1(bbOut, destAddr, size, inst_addr, data_expr); + break; + case Ity_I16: + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_16Uto32, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + + add_trace_store1(bbOut, destAddr, size, inst_addr, data_expr); + break; + case Ity_F32: + // reinterpret as I32 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF32asI32, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + + // no break; + case Ity_I32: + add_trace_store1(bbOut, destAddr, size, inst_addr, data_expr); + break; + case Ity_F64: + // reinterpret as I64 + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_ReinterpF64asI64, data_expr)); + + addStmtToIRSB(bbOut, cast); + data_expr = IRExpr_RdTmp(t); + // no break; + case Ity_I64: + // we cannot pass whole 64-bit value in one parameter, so we split it + + // upper 32 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64HIto32, data_expr)); + addStmtToIRSB(bbOut, cast); + data_expr1 = IRExpr_RdTmp(t); + + // lower 32 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64to32, data_expr)); + addStmtToIRSB(bbOut, cast); + data_expr2 = IRExpr_RdTmp(t); + + add_trace_store2(bbOut, destAddr, sizeofIRType(Ity_I32), inst_addr, data_expr1, data_expr2); + break; + case Ity_V128: + // upper 64 + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128HIto64, data_expr)); + addStmtToIRSB(bbOut, cast); + data_expr0 = IRExpr_RdTmp(t); + + // upper 32 of upper 64 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64HIto32, data_expr0)); + addStmtToIRSB(bbOut, cast); + data_expr1 = IRExpr_RdTmp(t); + + // lower 32 of upper 64 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64to32, data_expr0)); + addStmtToIRSB(bbOut, cast); + data_expr2 = IRExpr_RdTmp(t); + + // lower 64 + t = newIRTemp(bbOut->tyenv, Ity_I64); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_V128to64, data_expr)); + addStmtToIRSB(bbOut, cast); + data_expr0 = IRExpr_RdTmp(t); + + // upper 32 of lower 64 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64HIto32, data_expr0)); + addStmtToIRSB(bbOut, cast); + data_expr3 = IRExpr_RdTmp(t); + + // lower 32 of lower 64 + t = newIRTemp(bbOut->tyenv, Ity_I32); + cast = IRStmt_WrTmp(t, IRExpr_Unop(Iop_64to32, data_expr0)); + addStmtToIRSB(bbOut, cast); + data_expr4 = IRExpr_RdTmp(t); + + add_trace_store4(bbOut, destAddr, inst_addr, + data_expr1, data_expr2, data_expr3, data_expr4); + + break; + default: + VG_(message) (Vg_UserMsg, "Warning! we missed a write of 0x%08x\n", (UInt) arg_ty); + break; + } +} +#endif + +static IRSB *mmt_instrument(VgCallbackClosure *closure, + IRSB *bbIn, + VexGuestLayout *layout, + VexGuestExtents *vge, + IRType gWordTy, IRType hWordTy) +{ + IRSB *bbOut; + int i = 0; + Addr inst_addr; + + if (gWordTy != hWordTy) + { + /* We don't currently support this case. */ + VG_(tool_panic) ("host/guest word size mismatch"); + } + + /* Set up BB */ + bbOut = deepCopyIRSBExceptStmts(bbIn); + + /* Copy verbatim any IR preamble preceding the first IMark */ + while (i < bbIn->stmts_used && bbIn->stmts[i]->tag != Ist_IMark) + { + addStmtToIRSB(bbOut, bbIn->stmts[i]); + i++; + } + + inst_addr = 0; + + for (; i < bbIn->stmts_used; i++) + { + IRStmt *st = bbIn->stmts[i]; + IRExpr *data_expr; + IRType arg_ty; + + if (!st) + continue; + + if (st->tag == Ist_IMark) + { + inst_addr = st->Ist.IMark.addr; + addStmtToIRSB(bbOut, st); + } + else if (st->tag == Ist_Store && dump_store) + { + data_expr = st->Ist.Store.data; + + arg_ty = typeOfIRExpr(bbIn->tyenv, data_expr); + + add_trace_store(bbOut, st->Ist.Store.addr, inst_addr, + arg_ty, data_expr); + addStmtToIRSB(bbOut, st); + } + else if (st->tag == Ist_WrTmp && dump_load) + { + data_expr = st->Ist.WrTmp.data; + + if (data_expr->tag == Iex_Load) + { + IRTemp dest = st->Ist.WrTmp.tmp; + IRExpr *value; + + addStmtToIRSB(bbOut, st); + + value = IRExpr_RdTmp(dest); + + arg_ty = typeOfIRExpr(bbIn->tyenv, value); + + add_trace_load(bbOut, data_expr->Iex.Load.addr, + sizeofIRType(data_expr->Iex.Load.ty), + inst_addr, value, arg_ty); + } + else + addStmtToIRSB(bbOut, st); + } + else + addStmtToIRSB(bbOut, st); + + } + return bbOut; +} + +#define TF_OPT "--mmt-trace-file=" +#define TN_OPT "--mmt-trace-nvidia-ioctls" +#define TO_OPT "--mmt-trace-all-opens" +#define TA_OPT "--mmt-trace-all-files" +#define TM_OPT "--mmt-trace-marks" + +static Bool mmt_process_cmd_line_option(Char * arg) +{ +// VG_(printf)("arg: %s\n", arg); + if (VG_(strncmp)(arg, TF_OPT, strlen(TF_OPT)) == 0) + { + int i; + for (i = 0; i < MAX_TRACE_FILES; ++i) + if (trace_files[i].path == NULL) + break; + if (i == MAX_TRACE_FILES) + { + VG_(printf)("too many files to trace\n"); + return False; + } + trace_files[i].path = VG_(strdup)("mmt.options-parsing", arg + strlen(TF_OPT)); + return True; + } + else if (VG_(strcmp)(arg, TN_OPT) == 0) + { + trace_nvidia_ioctls = True; + return True; + } + else if (VG_(strcmp)(arg, TO_OPT) == 0) + { + trace_opens = True; + return True; + } + else if (VG_(strcmp)(arg, TA_OPT) == 0) + { + trace_all_files = True; + return True; + } + else if (VG_(strcmp)(arg, TM_OPT) == 0) + { + trace_marks = True; + return True; + } + + return False; +} + +static void mmt_print_usage(void) +{ + VG_(printf)(" " TF_OPT "path trace loads and stores to memory mapped for\n" + " this file (e.g. /dev/nvidia0) (you can pass \n" + " this option multiple times)\n"); + VG_(printf)(" " TA_OPT " trace loads and store to memory mapped for all files\n"); + VG_(printf)(" " TN_OPT " trace ioctls on /dev/nvidiactl\n"); + VG_(printf)(" " TO_OPT " trace all 'open' syscalls\n"); + VG_(printf)(" " TM_OPT " send mmiotrace marks before and after ioctls\n"); +} + +static void mmt_print_debug_usage(void) +{ +} + +static void mmt_fini(Int exitcode) +{ + if (trace_marks) { + VG_(close)(trace_mark_fd); + } +} + +static void mmt_post_clo_init(void) +{ + if (trace_marks) { + SysRes ff; + ff = VG_(open)("/sys/kernel/debug/tracing/trace_marker", O_WRONLY, 0777); + if (ff._isError) { + VG_(message) (Vg_UserMsg, "Cannot open marker file!\n"); + trace_marks = 0; + } + trace_mark_fd = ff._val; + } +} + +static void dumpmem(char *s, Addr addr, UInt size) +{ + char line[4096]; + int idx = 0; + line[0] = 0; + + UInt i; + if (!addr || (addr & 0xffff0000) == 0xbeef0000) + return; + + size = size / 4; + + for (i = 0; i < size; ++i) + { + if (idx + 11 >= 4095) + break; + VG_(sprintf) (line + idx, "0x%08x ", ((UInt *) addr)[i]); + idx += 11; + } + VG_(message) (Vg_DebugMsg, "%s%s\n", s, line); +} + +static inline unsigned long long mmt_2x4to8(UInt h, UInt l) +{ + return (((unsigned long long)h) << 32) | l; +} + +static void pre_ioctl(ThreadId tid, UWord *args, UInt nArgs) +{ + int fd = args[0]; + UInt id = args[1]; + UInt *data = (UInt *) args[2]; + UWord addr; + UInt obj1, obj2, size; + int i; + + if (!FD_ISSET(fd, &nvidiactl_fds) && !FD_ISSET(fd, &nvidia0_fds)) + return; + + if (trace_marks) { + char buf[50]; + VG_(snprintf)(buf, 50, "VG-%d-%d-PRE\n", VG_(getpid)(), trace_mark_cnt); + VG_(write)(trace_mark_fd, buf, VG_(strlen)(buf)); + VG_(message)(Vg_DebugMsg, "MARK: %s", buf); + } + + if ((id & 0x0000FF00) == 0x4600) + { + char line[4096]; + int idx = 0; + + size = ((id & 0x3FFF0000) >> 16) / 4; + VG_(sprintf) (line, "pre_ioctl: fd:%d, id:0x%02x (full:0x%x), data: ", fd, id & 0xFF, id); + idx = strlen(line); + + for (i = 0; i < size; ++i) + { + if (idx + 11 >= 4095) + break; + VG_(sprintf) (line + idx, "0x%08x ", data[i]); + idx += 11; + } + VG_(message) (Vg_DebugMsg, "%s\n", line); + } + else + VG_(message)(Vg_DebugMsg, "pre_ioctl, fd: %d, wrong id:0x%x\n", fd, id); + + switch (id) + { + // 0x23 + // c1d00041 5c000001 00000080 00000000 00000000 00000000 00000000 00000000 + // c1d0004a beef0003 000000ff 00000000 04fe8af8 00000000 00000000 00000000 + case 0xc0204623: + obj1 = data[1]; + VG_(message) (Vg_DebugMsg, "create device object 0x%08x\n", obj1); + + // argument can be a string (7:0, indicating the bus number), but only if + // argument is 0xff + dumpmem("in ", data[4], 0x3C); + + break; + // 0x37 read stuff from video ram? + //case 0xc0204637: + case 0xc0204638: + dumpmem("in ", data[4], data[6]); + break; +#if 1 + case 0xc0204637: + { + UInt *addr2; + dumpmem("in ", data[4], data[6]); + + addr2 = (*(UInt **) (&data[4])); + //if(data[2]==0x14c && addr2[2]) + // dumpmem("in2 ", addr2[2], 0x40); + break; + } +#endif + case 0xc020462a: + VG_(message) (Vg_DebugMsg, "call method 0x%08x:0x%08x\n", data[1], data[2]); + dumpmem("in ", mmt_2x4to8(data[5], data[4]), mmt_2x4to8(data[7], data[6])); + // 0x10000002 + // word 2 is an address + // what is there? + if (data[2] == 0x10000002) + { + UInt *addr2 = (*(UInt **) (&data[4])); + dumpmem("in2 ", addr2[2], 0x3c); + } + break; + + case 0xc040464d: + VG_(message) (Vg_DebugMsg, "in %s\n", *(char **) (&data[6])); + break; + case 0xc028465e: + { + // Copy data from mem to GPU +#if 0 + SysRes ff; + ff = VG_(open) ("dump5e", O_CREAT | O_WRONLY | O_TRUNC, 0777); + if (!ff.isError) + { + VG_(write) (ff.res, (void *) data[6], 0x01000000); + VG_(close) (ff.res); + } +#endif + break; + } + case 0xc0104629: + obj1 = data[1]; + obj2 = data[2]; + VG_(message) (Vg_DebugMsg, "destroy object 0x%08x:0x%08x\n", obj1, obj2); + break; + case 0xc020462b: + { + struct object_type *objtype; + char *name = "???"; + obj1 = data[1]; + obj2 = data[2]; + addr = data[3]; + objtype = find_objtype(addr); + if (objtype && objtype->name) + name = objtype->name; + VG_(message) (Vg_DebugMsg, + "create gpu object 0x%08x:0x%08x type 0x%04lx (%s)\n", + obj1, obj2, addr, name); + if (data[4]) + { + if (objtype) + dumpmem("in ", mmt_2x4to8(data[5], data[4]), objtype->cargs * 4); + else + dumpmem("in ", mmt_2x4to8(data[5], data[4]), 0x40); + } + + break; + } + case 0xc014462d: + obj1 = data[1]; + obj2 = data[2]; + addr = data[3]; + VG_(message) (Vg_DebugMsg, + "create driver object 0x%08x:0x%08x type 0x%04lx\n", obj1, obj2, addr); + break; + + } +} + +static void pre_syscall(ThreadId tid, UInt syscallno, UWord *args, UInt nArgs) +{ + if (syscallno == __NR_ioctl) + pre_ioctl(tid, args, nArgs); +} + +static struct mmt_mmap_data *get_nvidia_mapping(Off64T offset) +{ + struct mmt_mmap_data *region; + int i; + for (i = 0; i <= last_region; ++i) + { + region = &mmt_mmaps[i]; + if (FD_ISSET(region->fd, &nvidia0_fds)) + if (region->offset == offset) + return region; + } + + if (last_region + 1 >= MAX_REGIONS) + { + VG_(message)(Vg_UserMsg, "no space for new mapping!\n"); + return NULL; + } + + region = &mmt_mmaps[++last_region]; + region->id = current_item++; + region->fd = 0; + region->offset = offset; + return region; +} + +static inline void free_region(int idx) +{ + if (last_region != idx) + VG_(memmove)(mmt_mmaps + idx, mmt_mmaps + idx + 1, + (last_region - idx) * sizeof(struct mmt_mmap_data)); + VG_(memset)(&mmt_mmaps[last_region--], 0, sizeof(struct mmt_mmap_data)); +} + +static Addr release_nvidia_mapping(Off64T offset) +{ + int i; + for (i = 0; i <= last_region; ++i) + { + struct mmt_mmap_data *region = &mmt_mmaps[i]; + if (FD_ISSET(region->fd, &nvidia0_fds)) + if (region->offset == offset) + { + Addr addr = region->start; + free_region(i); + return addr; + } + } + return 0; +} + +static Addr release_nvidia_mapping2(UWord data1, UWord data2) +{ + int i; + for (i = 0; i <= last_region; ++i) + { + struct mmt_mmap_data *region = &mmt_mmaps[i]; + if (FD_ISSET(region->fd, &nvidia0_fds)) + if (region->data1 == data1 && region->data2 == data2) + { + Addr addr = region->start; + free_region(i); + return addr; + } + } + return 0; +} + +static void post_ioctl(ThreadId tid, UWord *args, UInt nArgs) +{ + int fd = args[0]; + UInt id = args[1]; + UInt *data = (UInt *) args[2]; + UWord addr; + UInt obj1, obj2, size, type; + int i; + struct mmt_mmap_data *region; + + if (!FD_ISSET(fd, &nvidiactl_fds) && !FD_ISSET(fd, &nvidia0_fds)) + return; + + if (trace_marks) { + char buf[50]; + VG_(snprintf)(buf, 50, "VG-%d-%d-POST\n", VG_(getpid)(), trace_mark_cnt++); + VG_(write)(trace_mark_fd, buf, VG_(strlen)(buf)); + VG_(message)(Vg_DebugMsg, "MARK: %s", buf); + } + + if ((id & 0x0000FF00) == 0x4600) + { + char line[4096]; + int idx = 0; + + size = ((id & 0x3FFF0000) >> 16) / 4; + VG_(sprintf) (line, "post_ioctl: fd:%d, id:0x%02x (full:0x%x), data: ", fd, id & 0xFF, id); + idx = strlen(line); + + for (i = 0; i < size; ++i) + { + if (idx + 11 >= 4095) + break; + VG_(sprintf) (line + idx, "0x%08x ", data[i]); + idx += 11; + } + VG_(message) (Vg_DebugMsg, "%s\n", line); + } + else + VG_(message)(Vg_DebugMsg, "post_ioctl, fd: %d, wrong id:0x%x\n", fd, id); + + switch (id) + { + // NVIDIA + case 0xc00c4622: // Initialize + obj1 = data[0]; + VG_(message) (Vg_DebugMsg, "created context object 0x%08x\n", obj1); + break; + + case 0xc0204623: + dumpmem("out", data[4], 0x3C); + break; + + case 0xc030464e: // Allocate map for existing object + obj1 = data[1]; + obj2 = data[2]; + addr = data[8]; + VG_(message) (Vg_DebugMsg, "allocate map 0x%08x:0x%08x 0x%08lx\n", obj1, obj2, addr); + + region = get_nvidia_mapping(addr); + if (region) + { + region->data1 = obj1; + region->data2 = obj2; + } + + break; + case 0xc020464f: // Deallocate map for existing object + obj1 = data[1]; + obj2 = data[2]; + addr = data[4]; + /// XXX some currently mapped memory might be orphaned + + if (release_nvidia_mapping(addr)) + VG_(message) (Vg_DebugMsg, "deallocate map 0x%08x:0x%08x 0x%08lx\n", obj1, obj2, addr); + + break; + case 0xc0304627: // 0x27 Allocate map (also create object) + obj1 = data[1]; + obj2 = data[2]; + type = data[3]; + addr = data[6]; + VG_(message) (Vg_DebugMsg, + "create mapped object 0x%08x:0x%08x type=0x%08x 0x%08lx\n", + obj1, obj2, type, addr); + if (addr == 0) + break; + + region = get_nvidia_mapping(addr); + if (region) + { + region->data1 = obj1; + region->data2 = obj2; + } +#if 0 + dumpmem("out ", data[2], 0x40); +#endif + break; + // 0x29 seems to destroy/deallocate + case 0xc0104629: + obj1 = data[1]; + obj2 = data[2]; + /// XXX some currently mapped memory might be orphaned + + { + Addr addr1 = release_nvidia_mapping2(obj1, obj2); + if ((void *)addr1 != NULL) + VG_(message) (Vg_DebugMsg, "deallocate map 0x%08x:0x%08x %p\n", + obj1, obj2, (void *)addr1); + } + break; + // 0x2a read stuff from video ram? + // i 3 pre 2a: c1d00046 c1d00046 02000014 00000000 be88a948 00000000 00000080 00000000 + case 0xc020462a: + dumpmem("out ", mmt_2x4to8(data[5], data[4]), mmt_2x4to8(data[7], data[6])); + + if (data[2] == 0x10000002) + { + UInt *addr2 = (*(UInt **) (&data[4])); + dumpmem("out2 ", addr2[2], 0x3c); + } + break; + // 0x37 read configuration parameter + case 0xc0204638: + dumpmem("out", data[4], data[6]); + break; + case 0xc0204637: + { + UInt *addr2 = (*(UInt **) (&data[4])); + dumpmem("out", data[4], data[6]); + if (data[2] == 0x14c && addr2[2]) + /// List supported object types + dumpmem("out2 ", addr2[2], addr2[0] * 4); + } + break; + case 0xc0384657: // map GPU address + VG_(message) (Vg_DebugMsg, + "gpu map 0x%08x:0x%08x:0x%08x, addr 0x%08x, len 0x%08x\n", + data[1], data[2], data[3], data[10], data[6]); + break; + case 0xc0284658: // unmap GPU address + VG_(message) (Vg_DebugMsg, + "gpu unmap 0x%08x:0x%08x:0x%08x addr 0x%08x\n", data[1], + data[2], data[3], data[6]); + break; + case 0xc0304654: // create DMA object [3] is some kind of flags, [6] is an offset? + VG_(message) (Vg_DebugMsg, + "create dma object 0x%08x, type 0x%08x, parent 0x%08x\n", + data[1], data[2], data[5]); + break; + case 0xc0104659: // bind + VG_(message) (Vg_DebugMsg, "bind 0x%08x 0x%08x\n", data[1], data[2]); + break; + //case 0xc01c4634: + // dumpmem("out", data[4], 0x40); + // break; + // to c1d00046 c1d00046 02000014 00000000, from be88a948 00000000, size 00000080 00000000 + // 2b: c1d00046 5c000001 5c000009 0000506f be88a888 00000000 00000000 00000000 + // same, but other way around? + // i 5 pre 37: c1d00046 5c000001 0000014c 00000000 be88a9c8 00000000 00000010 00000000 + + // 0x23 create first object?? + // 0x2a method call? args/in/out depend + // 0x2b object creation + // c1d00046 beef0003 beef0028 0000307e + // 0x32 gets some value + // 0x37 read from GPU object? seems a read, not a write + // 0x4a memory allocation + // 0x4d after opening /dev/nvidiaX + // 0xd2 version id check + // 0x22 initialize (get context) + // 0x54 bind? 0xc0304654 + // 0x57 map to card 0xc0384657 + // 0x58 unmap from card 0xc0284658 + // 0xca ?? + + // These have external pointer: + // 0x2a (offset 0x10, size 0x18) + // 0x2b (offset 0x10, no size specified) + // 0x37 (offset 0x10, size 0x18) + // 0x38 (offset 0x10, size 0x18) + } +} + +static void post_open(ThreadId tid, UWord *args, UInt nArgs, SysRes res) +{ + const char *path = (const char *)args[0]; + int i; + + if (trace_opens) + { + int flags = (int)args[1]; + int mode = (int)args[2]; + VG_(message)(Vg_DebugMsg, "sys_open: %s, flags: 0x%x, mode: 0x%x, ret: %ld\n", path, flags, mode, res._val); + } + if (res._isError) + return; + + if (!trace_all_files) + { + for (i = 0; i < MAX_TRACE_FILES; ++i) + { + const char *path2 = trace_files[i].path; + if (path2 != NULL && VG_(strcmp)(path, path2) == 0) + { + FD_SET(res._val, &trace_files[i].fds); +// VG_(message)(Vg_DebugMsg, "fd %ld connected to %s\n", res._val, path); + break; + } + } + } + + if (trace_nvidia_ioctls) + { + if (VG_(strcmp)(path, "/dev/nvidiactl") == 0) + FD_SET(res._val, &nvidiactl_fds); + else if (VG_(strncmp)(path, "/dev/nvidia", 11) == 0) + FD_SET(res._val, &nvidia0_fds); + } +} + +static void post_close(ThreadId tid, UWord *args, UInt nArgs, SysRes res) +{ + int fd = (int)args[0]; + int i; + + if (!trace_all_files) + for(i = 0; i < MAX_TRACE_FILES; ++i) + { + if (trace_files[i].path != NULL && FD_ISSET(fd, &trace_files[i].fds)) + { + FD_CLR(fd, &trace_files[i].fds); + break; + } + } + + if (trace_nvidia_ioctls) + { + FD_CLR(fd, &nvidiactl_fds); + FD_CLR(fd, &nvidia0_fds); + } +} + +static void post_mmap(ThreadId tid, UWord *args, UInt nArgs, SysRes res, int offset_unit) +{ + void *start = (void *)args[0]; + unsigned long len = args[1]; +// unsigned long prot = args[2]; +// unsigned long flags = args[3]; + unsigned long fd = args[4]; + unsigned long offset = args[5]; + int i; + struct mmt_mmap_data *region; + + if (res._isError || (int)fd == -1) + return; + + start = (void *)res._val; + + if (!trace_all_files) + { + for(i = 0; i < MAX_TRACE_FILES; ++i) + { + if (FD_ISSET(fd, &trace_files[i].fds)) + break; + } + if (i == MAX_TRACE_FILES) + { +// VG_(message)(Vg_DebugMsg, "fd %ld not found\n", fd); + return; + } + } + + if (trace_nvidia_ioctls && FD_ISSET(fd, &nvidia0_fds)) + { + for (i = 0; i <= last_region; ++i) + { + region = &mmt_mmaps[i]; + if (region->id > 0 && + (region->fd == fd || region->fd == 0) && //region->fd=0 when created from get_nvidia_mapping + region->offset == offset * offset_unit) + { + region->fd = fd; + region->start = (Addr)start; + region->end = (Addr)(((char *)start) + len); + VG_(message) (Vg_DebugMsg, + "got new mmap for 0x%08lx:0x%08lx at %p, len: 0x%08lx, offset: 0x%llx, serial: %d\n", + region->data1, region->data2, (void *)region->start, len, + region->offset, region->id); + return; + } + } + } + + if (last_region + 1 >= MAX_REGIONS) + { + VG_(message)(Vg_UserMsg, "not enough space for new mmap!\n"); + return; + } + + region = &mmt_mmaps[++last_region]; + + region->fd = fd; + region->id = current_item++; + region->start = (Addr)start; + region->end = (Addr)(((char *)start) + len); + region->offset = offset * offset_unit; + + VG_(message) (Vg_DebugMsg, + "got new mmap at %p, len: 0x%08lx, offset: 0x%llx, serial: %d\n", + (void *)region->start, len, region->offset, region->id); +} + +static void post_munmap(ThreadId tid, UWord *args, UInt nArgs, SysRes res) +{ + void *start = (void *)args[0]; +// unsigned long len = args[1]; + int i; + struct mmt_mmap_data *region; + + if (res._isError) + return; + + for (i = 0; i <= last_region; ++i) + { + region = &mmt_mmaps[i]; + if (region->start == (Addr)start) + { + VG_(message) (Vg_DebugMsg, + "removed mmap 0x%lx:0x%lx for: %p, len: 0x%08lx, offset: 0x%llx, serial: %d\n", + region->data1, region->data2, (void *)region->start, + region->end - region->start, region->offset, region->id); + free_region(i); + return; + } + } +} + +static void post_mremap(ThreadId tid, UWord *args, UInt nArgs, SysRes res) +{ + void *start = (void *)args[0]; + unsigned long old_len = args[1]; + unsigned long new_len = args[2]; +// unsigned long flags = args[3]; + int i; + struct mmt_mmap_data *region; + + if (res._isError) + return; + + for (i = 0; i <= last_region; ++i) + { + region = &mmt_mmaps[i]; + if (region->start == (Addr)start) + { + region->start = (Addr) res._val; + region->end = region->start + new_len; + VG_(message) (Vg_DebugMsg, + "changed mmap 0x%lx:0x%lx from: (address: %p, len: 0x%08lx), to: (address: %p, len: 0x%08lx), offset 0x%llx, serial %d\n", + region->data1, region->data2, + start, old_len, + (void *)region->start, region->end - region->start, + region->offset, region->id); + return; + } + } +} + +static void post_syscall(ThreadId tid, UInt syscallno, UWord *args, + UInt nArgs, SysRes res) +{ + if (syscallno == __NR_ioctl) + post_ioctl(tid, args, nArgs); + else if (syscallno == __NR_open) + post_open(tid, args, nArgs, res); + else if (syscallno == __NR_close) + post_close(tid, args, nArgs, res); + else if (syscallno == __NR_mmap) + post_mmap(tid, args, nArgs, res, 1); +#ifndef MMT_64BIT + else if (syscallno == __NR_mmap2) + post_mmap(tid, args, nArgs, res, 4096); +#endif + else if (syscallno == __NR_munmap) + post_munmap(tid, args, nArgs, res); + else if (syscallno == __NR_mremap) + post_mremap(tid, args, nArgs, res); +} + +static void mmt_pre_clo_init(void) +{ + int i; + VG_(details_name) ("mmaptrace"); + VG_(details_version) (NULL); + VG_(details_description) ("an MMAP tracer"); + VG_(details_copyright_author) + ("Copyright (C) 2007,2009, and GNU GPL'd, by Dave Airlie, W.J. van der Laan, Marcin Slusarz."); + VG_(details_bug_reports_to) (VG_BUGS_TO); + + VG_(basic_tool_funcs) (mmt_post_clo_init, mmt_instrument, mmt_fini); + + VG_(needs_command_line_options) (mmt_process_cmd_line_option, + mmt_print_usage, + mmt_print_debug_usage); + + VG_(needs_syscall_wrapper) (pre_syscall, post_syscall); + + for (i = 0; i < MAX_TRACE_FILES; ++i) + FD_ZERO(&trace_files[i].fds); + FD_ZERO(&nvidiactl_fds); + FD_ZERO(&nvidia0_fds); +} + +VG_DETERMINE_INTERFACE_VERSION(mmt_pre_clo_init) diff --git a/mmt/tests/Makefile.am b/mmt/tests/Makefile.am new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/mmt/tests/Makefile.am @@ -0,0 +1 @@ + |
|
From: Marcin S. <mar...@gm...> - 2011-06-05 18:09:20
|
Please apply.
Index: include/vki/vki-linux.h
===================================================================
--- include/vki/vki-linux.h (wersja 11797)
+++ include/vki/vki-linux.h (kopia robocza)
@@ -2722,6 +2722,586 @@
#define VKI_EV_MAX 0x1f
#define VKI_EV_CNT (VKI_EV_MAX+1)
+
+// drm
+
+// drm_mode.h
+#define VKI_DRM_DISPLAY_MODE_LEN 32
+#define VKI_DRM_PROP_NAME_LEN 32
+
+struct vki_drm_mode_modeinfo {
+ __vki_u32 clock;
+ __vki_u16 hdisplay, hsync_start, hsync_end, htotal, hskew;
+ __vki_u16 vdisplay, vsync_start, vsync_end, vtotal, vscan;
+
+ __vki_u32 vrefresh;
+
+ __vki_u32 flags;
+ __vki_u32 type;
+ char name[VKI_DRM_DISPLAY_MODE_LEN];
+};
+
+struct vki_drm_mode_card_res {
+ __vki_u64 fb_id_ptr;
+ __vki_u64 crtc_id_ptr;
+ __vki_u64 connector_id_ptr;
+ __vki_u64 encoder_id_ptr;
+ __vki_u32 count_fbs;
+ __vki_u32 count_crtcs;
+ __vki_u32 count_connectors;
+ __vki_u32 count_encoders;
+ __vki_u32 min_width, max_width;
+ __vki_u32 min_height, max_height;
+};
+
+struct vki_drm_mode_crtc {
+ __vki_u64 set_connectors_ptr;
+ __vki_u32 count_connectors;
+
+ __vki_u32 crtc_id; /**< Id */
+ __vki_u32 fb_id; /**< Id of framebuffer */
+
+ __vki_u32 x, y; /**< Position on the frameuffer */
+
+ __vki_u32 gamma_size;
+ __vki_u32 mode_valid;
+ struct vki_drm_mode_modeinfo mode;
+};
+
+struct vki_drm_mode_get_encoder {
+ __vki_u32 encoder_id;
+ __vki_u32 encoder_type;
+
+ __vki_u32 crtc_id; /**< Id of crtc */
+
+ __vki_u32 possible_crtcs;
+ __vki_u32 possible_clones;
+};
+
+struct vki_drm_mode_get_connector {
+ __vki_u64 encoders_ptr;
+ __vki_u64 modes_ptr;
+ __vki_u64 props_ptr;
+ __vki_u64 prop_values_ptr;
+
+ __vki_u32 count_modes;
+ __vki_u32 count_props;
+ __vki_u32 count_encoders;
+
+ __vki_u32 encoder_id; /**< Current Encoder */
+ __vki_u32 connector_id; /**< Id */
+ __vki_u32 connector_type;
+ __vki_u32 connector_type_id;
+
+ __vki_u32 connection;
+ __vki_u32 mm_width, mm_height; /**< HxW in millimeters */
+ __vki_u32 subpixel;
+};
+
+struct vki_drm_mode_property_enum {
+ __vki_u64 value;
+ char name[VKI_DRM_PROP_NAME_LEN];
+};
+
+struct vki_drm_mode_get_property {
+ __vki_u64 values_ptr; /* values and blob lengths */
+ __vki_u64 enum_blob_ptr; /* enum and blob id ptrs */
+
+ __vki_u32 prop_id;
+ __vki_u32 flags;
+ char name[VKI_DRM_PROP_NAME_LEN];
+
+ __vki_u32 count_values;
+ __vki_u32 count_enum_blobs;
+};
+
+struct vki_drm_mode_connector_set_property {
+ __vki_u64 value;
+ __vki_u32 prop_id;
+ __vki_u32 connector_id;
+};
+
+struct vki_drm_mode_get_blob {
+ __vki_u32 blob_id;
+ __vki_u32 length;
+ __vki_u64 data;
+};
+
+struct vki_drm_mode_fb_cmd {
+ __vki_u32 fb_id;
+ __vki_u32 width, height;
+ __vki_u32 pitch;
+ __vki_u32 bpp;
+ __vki_u32 depth;
+ /* driver specific handle */
+ __vki_u32 handle;
+};
+
+struct vki_drm_mode_fb_dirty_cmd {
+ __vki_u32 fb_id;
+ __vki_u32 flags;
+ __vki_u32 color;
+ __vki_u32 num_clips;
+ __vki_u64 clips_ptr;
+};
+
+struct vki_drm_mode_mode_cmd {
+ __vki_u32 connector_id;
+ struct vki_drm_mode_modeinfo mode;
+};
+
+#define VKI_DRM_MODE_CURSOR_BO (1<<0)
+#define VKI_DRM_MODE_CURSOR_MOVE (1<<1)
+
+struct vki_drm_mode_cursor {
+ __vki_u32 flags;
+ __vki_u32 crtc_id;
+ __vki_s32 x;
+ __vki_s32 y;
+ __vki_u32 width;
+ __vki_u32 height;
+ /* driver specific handle */
+ __vki_u32 handle;
+};
+
+struct vki_drm_mode_crtc_lut {
+ __vki_u32 crtc_id;
+ __vki_u32 gamma_size;
+
+ /* pointers to arrays */
+ __vki_u64 red;
+ __vki_u64 green;
+ __vki_u64 blue;
+};
+
+struct vki_drm_mode_crtc_page_flip {
+ __vki_u32 crtc_id;
+ __vki_u32 fb_id;
+ __vki_u32 flags;
+ __vki_u32 reserved;
+ __vki_u64 user_data;
+};
+
+/* create a dumb scanout buffer */
+struct vki_drm_mode_create_dumb {
+ __vki_u32 height;
+ __vki_u32 width;
+ __vki_u32 bpp;
+ __vki_u32 flags;
+ /* handle, pitch, size will be returned */
+ __vki_u32 handle;
+ __vki_u32 pitch;
+ __vki_u64 size;
+};
+
+/* set up for mmap of a dumb scanout buffer */
+struct vki_drm_mode_map_dumb {
+ /** Handle for the object being mapped. */
+ __vki_u32 handle;
+ __vki_u32 pad;
+ /**
+ * Fake offset to use for subsequent mmap call
+ *
+ * This is a fixed-size type for 32/64 compatibility.
+ */
+ __vki_u64 offset;
+};
+
+struct vki_drm_mode_destroy_dumb {
+ __vki_u32 handle;
+};
+
+
+// drm.h
+
+typedef unsigned int vki_drm_drawable_t;
+typedef unsigned int vki_drm_magic_t;
+
+struct vki_drm_clip_rect {
+ unsigned short x1;
+ unsigned short y1;
+ unsigned short x2;
+ unsigned short y2;
+};
+
+struct vki_drm_version {
+ int version_major; /**< Major version */
+ int version_minor; /**< Minor version */
+ int version_patchlevel; /**< Patch level */
+ vki_size_t name_len; /**< Length of name buffer */
+ char *name; /**< Name of driver */
+ vki_size_t date_len; /**< Length of date buffer */
+ char *date; /**< User-space buffer to hold date */
+ vki_size_t desc_len; /**< Length of desc buffer */
+ char *desc; /**< User-space buffer to hold desc */
+};
+
+struct vki_drm_unique {
+ vki_size_t unique_len; /**< Length of unique */
+ char *unique; /**< Unique name for driver instantiation */
+};
+
+struct vki_drm_update_draw {
+ vki_drm_drawable_t handle;
+ unsigned int type;
+ unsigned int num;
+ unsigned long long data;
+};
+
+struct vki_drm_auth {
+ vki_drm_magic_t magic;
+};
+
+struct vki_drm_irq_busid {
+ int irq; /**< IRQ number */
+ int busnum; /**< bus number */
+ int devnum; /**< device number */
+ int funcnum; /**< function number */
+};
+
+/** DRM_IOCTL_GEM_CLOSE ioctl argument type */
+struct vki_drm_gem_close {
+ /** Handle of the object to be closed. */
+ __vki_u32 handle;
+ __vki_u32 pad;
+};
+
+/** DRM_IOCTL_GEM_FLINK ioctl argument type */
+struct vki_drm_gem_flink {
+ /** Handle for the object being named */
+ __vki_u32 handle;
+
+ /** Returned global name */
+ __vki_u32 name;
+};
+
+/** DRM_IOCTL_GEM_OPEN ioctl argument type */
+struct vki_drm_gem_open {
+ /** Name of object being opened */
+ __vki_u32 name;
+
+ /** Returned handle for the object */
+ __vki_u32 handle;
+
+ /** Returned size of the object */
+ __vki_u64 size;
+};
+
+// xf86drm.h
+#define VKI_DRM_IOCTL_NR(n) _VKI_IOC_NR(n)
+#define VKI_DRM_IOC_VOID _VKI_IOC_NONE
+#define VKI_DRM_IOC_READ _VKI_IOC_READ
+#define VKI_DRM_IOC_WRITE _VKI_IOC_WRITE
+#define VKI_DRM_IOC_READWRITE _VKI_IOC_READ|_IOC_WRITE
+#define VKI_DRM_IOC(dir, group, nr, size) _VKI_IOC(dir, group, nr, size)
+
+enum vki_drm_vblank_seq_type {
+ VKI_DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
+ VKI_DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
+ VKI_DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
+ VKI_DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
+ VKI_DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
+ VKI_DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
+ VKI_DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */
+};
+
+struct vki_drm_wait_vblank_request {
+ enum vki_drm_vblank_seq_type type;
+ unsigned int sequence;
+ unsigned long signal;
+};
+
+struct vki_drm_wait_vblank_reply {
+ enum vki_drm_vblank_seq_type type;
+ unsigned int sequence;
+ long tval_sec;
+ long tval_usec;
+};
+
+/**
+ * DRM_IOCTL_WAIT_VBLANK ioctl argument type.
+ *
+ * \sa drmWaitVBlank().
+ */
+union vki_drm_wait_vblank {
+ struct vki_drm_wait_vblank_request request;
+ struct vki_drm_wait_vblank_reply reply;
+};
+
+//drm.h
+typedef unsigned int vki_drm_context_t;
+enum vki_drm_ctx_flags {
+ VKI_DRM_CONTEXT_PRESERVED = 0x01,
+ VKI_DRM_CONTEXT_2DONLY = 0x02
+};
+struct vki_drm_ctx {
+ vki_drm_context_t handle;
+ enum vki_drm_ctx_flags flags;
+};
+
+struct vki_drm_ctx_res {
+ int count;
+ struct vki_drm_ctx *contexts;
+};
+
+/* because of bug in libdrm, some of the ioctls were passed as int, so when
+ * they were casted to ulong most significant bit was extended to higher word;
+ * kernel drm sees only lower part, so nobody noticed */
+#if VG_WORDSIZE == 8
+#define VKI_DRM_IOCTL_DOUBLE(X) case (unsigned long)(int)(X): case X
+#else
+#define VKI_DRM_IOCTL_DOUBLE(X) case X
+#endif
+
+#define VKI_DRM_IOCTL_BASE 'd'
+#define VKI_DRM_IO(nr) _VKI_IO(VKI_DRM_IOCTL_BASE,nr)
+#define VKI_DRM_IOR(nr,type) _VKI_IOR(VKI_DRM_IOCTL_BASE,nr,type)
+#define VKI_DRM_IOW(nr,type) _VKI_IOW(VKI_DRM_IOCTL_BASE,nr,type)
+#define VKI_DRM_IOWR(nr,type) _VKI_IOWR(VKI_DRM_IOCTL_BASE,nr,type)
+
+#define VKI_DRM_IOCTL_VERSION VKI_DRM_IOWR(0x00, struct vki_drm_version)
+#define VKI_DRM_IOCTL_GET_UNIQUE VKI_DRM_IOWR(0x01, struct vki_drm_unique)
+#define VKI_DRM_IOCTL_GET_MAGIC VKI_DRM_IOR( 0x02, struct vki_drm_auth)
+#define VKI_DRM_IOCTL_IRQ_BUSID VKI_DRM_IOWR(0x03, struct vki_drm_irq_busid)
+//#define VKI_DRM_IOCTL_GET_MAP VKI_DRM_IOWR(0x04, struct vki_drm_map)
+//#define VKI_DRM_IOCTL_GET_CLIENT VKI_DRM_IOWR(0x05, struct vki_drm_client)
+//#define VKI_DRM_IOCTL_GET_STATS VKI_DRM_IOR( 0x06, struct vki_drm_stats)
+//#define VKI_DRM_IOCTL_SET_VERSION VKI_DRM_IOWR(0x07, struct vki_drm_set_version)
+//#define VKI_DRM_IOCTL_MODESET_CTL VKI_DRM_IOW(0x08, struct vki_drm_modeset_ctl)
+#define VKI_DRM_IOCTL_GEM_CLOSE VKI_DRM_IOW (0x09, struct vki_drm_gem_close)
+#define VKI_DRM_IOCTL_GEM_FLINK VKI_DRM_IOWR(0x0a, struct vki_drm_gem_flink)
+#define VKI_DRM_IOCTL_GEM_OPEN VKI_DRM_IOWR(0x0b, struct vki_drm_gem_open)
+//#define VKI_DRM_IOCTL_GET_CAP VKI_DRM_IOWR(0x0c, struct vki_drm_get_cap)
+
+//#define VKI_DRM_IOCTL_SET_UNIQUE VKI_DRM_IOW( 0x10, struct vki_drm_unique)
+//#define VKI_DRM_IOCTL_AUTH_MAGIC VKI_DRM_IOW( 0x11, struct vki_drm_auth)
+//#define VKI_DRM_IOCTL_BLOCK VKI_DRM_IOWR(0x12, struct vki_drm_block)
+//#define VKI_DRM_IOCTL_UNBLOCK VKI_DRM_IOWR(0x13, struct vki_drm_block)
+//#define VKI_DRM_IOCTL_CONTROL VKI_DRM_IOW( 0x14, struct vki_drm_control)
+//#define VKI_DRM_IOCTL_ADD_MAP VKI_DRM_IOWR(0x15, struct vki_drm_map)
+//#define VKI_DRM_IOCTL_ADD_BUFS VKI_DRM_IOWR(0x16, struct vki_drm_buf_desc)
+//#define VKI_DRM_IOCTL_MARK_BUFS VKI_DRM_IOW( 0x17, struct vki_drm_buf_desc)
+//#define VKI_DRM_IOCTL_INFO_BUFS VKI_DRM_IOWR(0x18, struct vki_drm_buf_info)
+//#define VKI_DRM_IOCTL_MAP_BUFS VKI_DRM_IOWR(0x19, struct vki_drm_buf_map)
+//#define VKI_DRM_IOCTL_FREE_BUFS VKI_DRM_IOW( 0x1a, struct vki_drm_buf_free)
+
+//#define VKI_DRM_IOCTL_RM_MAP VKI_DRM_IOW( 0x1b, struct vki_drm_map)
+
+//#define VKI_DRM_IOCTL_SET_SAREA_CTX VKI_DRM_IOW( 0x1c, struct vki_drm_ctx_priv_map)
+//#define VKI_DRM_IOCTL_GET_SAREA_CTX VKI_DRM_IOWR(0x1d, struct vki_drm_ctx_priv_map)
+
+#define VKI_DRM_IOCTL_SET_MASTER VKI_DRM_IO(0x1e)
+#define VKI_DRM_IOCTL_DROP_MASTER VKI_DRM_IO(0x1f)
+
+#define VKI_DRM_IOCTL_ADD_CTX VKI_DRM_IOWR(0x20, struct vki_drm_ctx)
+#define VKI_DRM_IOCTL_RM_CTX VKI_DRM_IOWR(0x21, struct vki_drm_ctx)
+#define VKI_DRM_IOCTL_MOD_CTX VKI_DRM_IOW( 0x22, struct vki_drm_ctx)
+#define VKI_DRM_IOCTL_GET_CTX VKI_DRM_IOWR(0x23, struct vki_drm_ctx)
+#define VKI_DRM_IOCTL_SWITCH_CTX VKI_DRM_IOW( 0x24, struct vki_drm_ctx)
+#define VKI_DRM_IOCTL_NEW_CTX VKI_DRM_IOW( 0x25, struct vki_drm_ctx)
+#define VKI_DRM_IOCTL_RES_CTX VKI_DRM_IOWR(0x26, struct vki_drm_ctx_res)
+//#define VKI_DRM_IOCTL_ADD_DRAW VKI_DRM_IOWR(0x27, struct vki_drm_draw)
+//#define VKI_DRM_IOCTL_RM_DRAW VKI_DRM_IOWR(0x28, struct vki_drm_draw)
+//#define VKI_DRM_IOCTL_DMA VKI_DRM_IOWR(0x29, struct vki_drm_dma)
+//#define VKI_DRM_IOCTL_LOCK VKI_DRM_IOW( 0x2a, struct vki_drm_lock)
+//#define VKI_DRM_IOCTL_UNLOCK VKI_DRM_IOW( 0x2b, struct vki_drm_lock)
+//#define VKI_DRM_IOCTL_FINISH VKI_DRM_IOW( 0x2c, struct vki_drm_lock)
+
+//#define VKI_DRM_IOCTL_AGP_ACQUIRE VKI_DRM_IO( 0x30)
+//#define VKI_DRM_IOCTL_AGP_RELEASE VKI_DRM_IO( 0x31)
+//#define VKI_DRM_IOCTL_AGP_ENABLE VKI_DRM_IOW( 0x32, struct vki_drm_agp_mode)
+//#define VKI_DRM_IOCTL_AGP_INFO VKI_DRM_IOR( 0x33, struct vki_drm_agp_info)
+//#define VKI_DRM_IOCTL_AGP_ALLOC VKI_DRM_IOWR(0x34, struct vki_drm_agp_buffer)
+//#define VKI_DRM_IOCTL_AGP_FREE VKI_DRM_IOW( 0x35, struct vki_drm_agp_buffer)
+//#define VKI_DRM_IOCTL_AGP_BIND VKI_DRM_IOW( 0x36, struct vki_drm_agp_binding)
+//#define VKI_DRM_IOCTL_AGP_UNBIND VKI_DRM_IOW( 0x37, struct vki_drm_agp_binding)
+
+//#define VKI_DRM_IOCTL_SG_ALLOC VKI_DRM_IOWR(0x38, struct vki_drm_scatter_gather)
+//#define VKI_DRM_IOCTL_SG_FREE VKI_DRM_IOW( 0x39, struct vki_drm_scatter_gather)
+
+#define VKI_DRM_IOCTL_WAIT_VBLANK VKI_DRM_IOWR(0x3a, union vki_drm_wait_vblank)
+
+#define VKI_DRM_IOCTL_UPDATE_DRAW VKI_DRM_IOW(0x3f, struct vki_drm_update_draw)
+
+#define VKI_DRM_IOCTL_MODE_GETRESOURCES VKI_DRM_IOWR(0xA0, struct vki_drm_mode_card_res)
+#define VKI_DRM_IOCTL_MODE_GETCRTC VKI_DRM_IOWR(0xA1, struct vki_drm_mode_crtc)
+#define VKI_DRM_IOCTL_MODE_SETCRTC VKI_DRM_IOWR(0xA2, struct vki_drm_mode_crtc)
+#define VKI_DRM_IOCTL_MODE_CURSOR VKI_DRM_IOWR(0xA3, struct vki_drm_mode_cursor)
+#define VKI_DRM_IOCTL_MODE_GETGAMMA VKI_DRM_IOWR(0xA4, struct vki_drm_mode_crtc_lut)
+#define VKI_DRM_IOCTL_MODE_SETGAMMA VKI_DRM_IOWR(0xA5, struct vki_drm_mode_crtc_lut)
+#define VKI_DRM_IOCTL_MODE_GETENCODER VKI_DRM_IOWR(0xA6, struct vki_drm_mode_get_encoder)
+#define VKI_DRM_IOCTL_MODE_GETCONNECTOR VKI_DRM_IOWR(0xA7, struct vki_drm_mode_get_connector)
+#define VKI_DRM_IOCTL_MODE_ATTACHMODE VKI_DRM_IOWR(0xA8, struct vki_drm_mode_mode_cmd)
+#define VKI_DRM_IOCTL_MODE_DETACHMODE VKI_DRM_IOWR(0xA9, struct vki_drm_mode_mode_cmd)
+
+#define VKI_DRM_IOCTL_MODE_GETPROPERTY VKI_DRM_IOWR(0xAA, struct vki_drm_mode_get_property)
+#define VKI_DRM_IOCTL_MODE_SETPROPERTY VKI_DRM_IOWR(0xAB, struct vki_drm_mode_connector_set_property)
+#define VKI_DRM_IOCTL_MODE_GETPROPBLOB VKI_DRM_IOWR(0xAC, struct vki_drm_mode_get_blob)
+#define VKI_DRM_IOCTL_MODE_GETFB VKI_DRM_IOWR(0xAD, struct vki_drm_mode_fb_cmd)
+#define VKI_DRM_IOCTL_MODE_ADDFB VKI_DRM_IOWR(0xAE, struct vki_drm_mode_fb_cmd)
+#define VKI_DRM_IOCTL_MODE_RMFB VKI_DRM_IOWR(0xAF, unsigned int)
+#define VKI_DRM_IOCTL_MODE_PAGE_FLIP VKI_DRM_IOWR(0xB0, struct vki_drm_mode_crtc_page_flip)
+#define VKI_DRM_IOCTL_MODE_DIRTYFB VKI_DRM_IOWR(0xB1, struct vki_drm_mode_fb_dirty_cmd)
+
+#define VKI_DRM_IOCTL_MODE_CREATE_DUMB VKI_DRM_IOWR(0xB2, struct vki_drm_mode_create_dumb)
+#define VKI_DRM_IOCTL_MODE_MAP_DUMB VKI_DRM_IOWR(0xB3, struct vki_drm_mode_map_dumb)
+#define VKI_DRM_IOCTL_MODE_DESTROY_DUMB VKI_DRM_IOWR(0xB4, struct vki_drm_mode_destroy_dumb)
+
+#define VKI_DRM_COMMAND_BASE 0x40
+//#define VKI_DRM_COMMAND_END 0xA0
+
+// xf86drm.c: drmCommandWriteRead
+#define VKI_DRM_COMMAND(dir, index, size) \
+ VKI_DRM_IOC(dir, VKI_DRM_IOCTL_BASE, VKI_DRM_COMMAND_BASE + index, size)
+
+#define VKI_DRM_COMMAND_RW(index, size) \
+ VKI_DRM_COMMAND(VKI_DRM_IOC_READ | VKI_DRM_IOC_WRITE, index, size)
+
+#define VKI_DRM_COMMAND_W(index, size) \
+ VKI_DRM_COMMAND(VKI_DRM_IOC_WRITE, index, size)
+
+#define VKI_DRM_COMMAND_R(index, size) \
+ VKI_DRM_COMMAND(VKI_DRM_IOC_READ, index, size)
+
+// nouveau_drm.h
+#define VKI_DRM_NOUVEAU_GETPARAM 0x00
+#define VKI_DRM_NOUVEAU_SETPARAM 0x01
+#define VKI_DRM_NOUVEAU_CHANNEL_ALLOC 0x02
+#define VKI_DRM_NOUVEAU_CHANNEL_FREE 0x03
+#define VKI_DRM_NOUVEAU_GROBJ_ALLOC 0x04
+#define VKI_DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05
+#define VKI_DRM_NOUVEAU_GPUOBJ_FREE 0x06
+#define VKI_DRM_NOUVEAU_GEM_NEW 0x40
+#define VKI_DRM_NOUVEAU_GEM_PUSHBUF 0x41
+#define VKI_DRM_NOUVEAU_GEM_CPU_PREP 0x42
+#define VKI_DRM_NOUVEAU_GEM_CPU_FINI 0x43
+#define VKI_DRM_NOUVEAU_GEM_INFO 0x44
+
+struct vki_drm_nouveau_channel_alloc {
+ __vki_u32 fb_ctxdma_handle;
+ __vki_u32 tt_ctxdma_handle;
+
+ int channel;
+ __vki_u32 pushbuf_domains;
+
+ /* Notifier memory */
+ __vki_u32 notifier_handle;
+
+ /* DRM-enforced subchannel assignments */
+ struct {
+ __vki_u32 handle;
+ __vki_u32 grclass;
+ } subchan[8];
+ __vki_u32 nr_subchan;
+};
+
+struct vki_drm_nouveau_channel_free {
+ int channel;
+};
+
+struct vki_drm_nouveau_grobj_alloc {
+ int channel;
+ __vki_u32 handle;
+ int class;
+};
+
+struct vki_drm_nouveau_notifierobj_alloc {
+ __vki_u32 channel;
+ __vki_u32 handle;
+ __vki_u32 size;
+ __vki_u32 offset;
+};
+
+struct vki_drm_nouveau_gpuobj_free {
+ int channel;
+ __vki_u32 handle;
+};
+
+struct vki_drm_nouveau_getparam {
+ __vki_u64 param;
+ __vki_u64 value;
+};
+
+struct vki_drm_nouveau_setparam {
+ __vki_u64 param;
+ __vki_u64 value;
+};
+
+struct vki_drm_nouveau_gem_info {
+ __vki_u32 handle;
+ __vki_u32 domain;
+ __vki_u64 size;
+ __vki_u64 offset;
+ __vki_u64 map_handle;
+ __vki_u32 tile_mode;
+ __vki_u32 tile_flags;
+};
+
+struct vki_drm_nouveau_gem_new {
+ struct vki_drm_nouveau_gem_info info;
+ __vki_u32 channel_hint;
+ __vki_u32 align;
+};
+
+
+struct vki_drm_nouveau_gem_pushbuf_bo_presumed {
+ __vki_u32 valid;
+ __vki_u32 domain;
+ __vki_u64 offset;
+};
+
+struct vki_drm_nouveau_gem_pushbuf_bo {
+ __vki_u64 user_priv;
+ __vki_u32 handle;
+ __vki_u32 read_domains;
+ __vki_u32 write_domains;
+ __vki_u32 valid_domains;
+ struct vki_drm_nouveau_gem_pushbuf_bo_presumed presumed;
+};
+
+struct vki_drm_nouveau_gem_pushbuf_push {
+ __vki_u32 bo_index;
+ __vki_u32 pad;
+ __vki_u64 offset;
+ __vki_u64 length;
+};
+
+struct vki_drm_nouveau_gem_pushbuf {
+ __vki_u32 channel;
+ __vki_u32 nr_buffers;
+ __vki_u64 buffers;
+ __vki_u32 nr_relocs;
+ __vki_u32 nr_push;
+ __vki_u64 relocs;
+ __vki_u64 push;
+ __vki_u32 suffix0;
+ __vki_u32 suffix1;
+ __vki_u64 vram_available;
+ __vki_u64 gart_available;
+};
+
+struct vki_drm_nouveau_gem_cpu_prep {
+ __vki_u32 handle;
+ __vki_u32 flags;
+};
+
+struct vki_drm_nouveau_gem_cpu_fini {
+ __vki_u32 handle;
+};
+
+#define VKI_DRM_IOCTL_NOUVEAU_GETPARAM VKI_DRM_COMMAND_RW(VKI_DRM_NOUVEAU_GETPARAM, sizeof(struct vki_drm_nouveau_getparam))
+#define VKI_DRM_IOCTL_NOUVEAU_SETPARAM VKI_DRM_COMMAND_RW(VKI_DRM_NOUVEAU_SETPARAM, sizeof(struct vki_drm_nouveau_setparam))
+#define VKI_DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC VKI_DRM_COMMAND_RW(VKI_DRM_NOUVEAU_CHANNEL_ALLOC, sizeof(struct vki_drm_nouveau_channel_alloc))
+#define VKI_DRM_IOCTL_NOUVEAU_CHANNEL_FREE VKI_DRM_COMMAND_W (VKI_DRM_NOUVEAU_CHANNEL_FREE, sizeof(struct vki_drm_nouveau_channel_free))
+#define VKI_DRM_IOCTL_NOUVEAU_GROBJ_ALLOC VKI_DRM_COMMAND_W (VKI_DRM_NOUVEAU_GROBJ_ALLOC, sizeof(struct vki_drm_nouveau_grobj_alloc))
+#define VKI_DRM_IOCTL_NOUVEAU_NOTIFIEROBJ_ALLOC VKI_DRM_COMMAND_RW(VKI_DRM_NOUVEAU_NOTIFIEROBJ_ALLOC, sizeof(struct vki_drm_nouveau_notifierobj_alloc))
+#define VKI_DRM_IOCTL_NOUVEAU_GPUOBJ_FREE VKI_DRM_COMMAND_W (VKI_DRM_NOUVEAU_GPUOBJ_FREE, sizeof(struct vki_drm_nouveau_gpuobj_free))
+#define VKI_DRM_IOCTL_NOUVEAU_GEM_NEW VKI_DRM_COMMAND_RW(VKI_DRM_NOUVEAU_GEM_NEW, sizeof(struct vki_drm_nouveau_gem_new))
+#define VKI_DRM_IOCTL_NOUVEAU_GEM_PUSHBUF VKI_DRM_COMMAND_RW(VKI_DRM_NOUVEAU_GEM_PUSHBUF, sizeof(struct vki_drm_nouveau_gem_pushbuf))
+#define VKI_DRM_IOCTL_NOUVEAU_GEM_CPU_PREP VKI_DRM_COMMAND_W (VKI_DRM_NOUVEAU_GEM_CPU_PREP, sizeof(struct vki_drm_nouveau_gem_cpu_prep))
+#define VKI_DRM_IOCTL_NOUVEAU_GEM_CPU_FINI VKI_DRM_COMMAND_W (VKI_DRM_NOUVEAU_GEM_CPU_FINI, sizeof(struct vki_drm_nouveau_gem_cpu_fini))
+#define VKI_DRM_IOCTL_NOUVEAU_GEM_INFO VKI_DRM_COMMAND_RW(VKI_DRM_NOUVEAU_GEM_INFO, sizeof(struct vki_drm_nouveau_gem_info))
+
#endif // __VKI_LINUX_H
/*--------------------------------------------------------------------*/
Index: coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-linux.c (wersja 11797)
+++ coregrind/m_syswrap/syswrap-linux.c (kopia robocza)
@@ -59,6 +59,7 @@
#include "priv_syswrap-generic.h"
#include "priv_syswrap-linux.h"
+#define max(a,b) ((a)>(b)?(a):(b))
// Run a thread from beginning to end and return the thread's
// scheduler-return-code.
@@ -4880,7 +4881,684 @@
sizeof(struct vki_sockaddr));
}
break;
+ case VKI_DRM_IOCTL_VERSION:
+ if (ARG3) {
+ struct vki_drm_version *req = (struct vki_drm_version *)ARG3;
+ PRE_FIELD_WRITE("ioctl(DRM_VERSION).version_major", req->version_major);
+ PRE_FIELD_WRITE("ioctl(DRM_VERSION).version_minor", req->version_minor);
+ PRE_FIELD_WRITE("ioctl(DRM_VERSION).version_patchlevel", req->version_patchlevel);
+
+ PRE_FIELD_READ("ioctl(DRM_VERSION).name_len", req->name_len);
+ PRE_FIELD_READ("ioctl(DRM_VERSION).date_len", req->date_len);
+ PRE_FIELD_READ("ioctl(DRM_VERSION).desc_len", req->desc_len);
+
+ PRE_MEM_WRITE("ioctl(DRM_VERSION).name[]", (Addr)req->name, req->name_len);
+ PRE_MEM_WRITE("ioctl(DRM_VERSION).date[]", (Addr)req->date, req->date_len);
+ PRE_MEM_WRITE("ioctl(DRM_VERSION).desc[]", (Addr)req->desc, req->desc_len);
+
+ PRE_FIELD_WRITE("ioctl(DRM_VERSION).name_len", req->name_len);
+ PRE_FIELD_WRITE("ioctl(DRM_VERSION).date_len", req->date_len);
+ PRE_FIELD_WRITE("ioctl(DRM_VERSION).desc_len", req->desc_len);
+ }
+ break;
+ case VKI_DRM_IOCTL_GET_UNIQUE:
+ if (ARG3) {
+ struct vki_drm_unique *req = (struct vki_drm_unique *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_UNIQUE).unique_len", req->unique_len);
+ if (req->unique_len) {
+ PRE_FIELD_READ("ioctl(DRM_UNIQUE).unique", req->unique);
+ PRE_MEM_WRITE("ioctl(DRM_UNIQUE).unique[]", (Addr)req->unique, req->unique_len);
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_UNIQUE).unique_len", req->unique_len);
+ }
+ break;
+ case VKI_DRM_IOCTL_GET_MAGIC:
+ if (ARG3) {
+ struct vki_drm_auth *req = (struct vki_drm_auth *)ARG3;
+
+ PRE_FIELD_WRITE("ioctl(DRM_GET_MAGIC).magic", req->magic);
+ }
+ break;
+ case VKI_DRM_IOCTL_IRQ_BUSID:
+ if (ARG3) {
+ struct vki_drm_irq_busid *req = (struct vki_drm_irq_busid *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_IRQ_BUSID).busnum", req->busnum);
+ PRE_FIELD_READ("ioctl(DRM_IRQ_BUSID).devnum", req->devnum);
+ PRE_FIELD_READ("ioctl(DRM_IRQ_BUSID).funcnum", req->funcnum);
+ PRE_FIELD_WRITE("ioctl(DRM_IRQ_BUSID).irq", req->irq);
+ }
+ break;
+ case VKI_DRM_IOCTL_GEM_CLOSE:
+ if (ARG3) {
+ struct vki_drm_gem_close *req = (struct vki_drm_gem_close *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_GEM_CLOSE).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_GEM_FLINK:
+ if (ARG3) {
+ struct vki_drm_gem_flink *req = (struct vki_drm_gem_flink *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_GEM_FLINK).handle", req->handle);
+ PRE_FIELD_WRITE("ioctl(DRM_GEM_FLINK).name", req->name);
+ }
+ break;
+ case VKI_DRM_IOCTL_GEM_OPEN:
+ if (ARG3) {
+ struct vki_drm_gem_open *req = (struct vki_drm_gem_open *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_GEM_OPEN).name", req->name);
+ PRE_FIELD_WRITE("ioctl(DRM_GEM_OPEN).handle", req->handle);
+ PRE_FIELD_WRITE("ioctl(DRM_GEM_OPEN).size", req->size);
+ }
+ break;
+ case VKI_DRM_IOCTL_SET_MASTER:
+ break;
+ case VKI_DRM_IOCTL_DROP_MASTER:
+ break;
+ case VKI_DRM_IOCTL_ADD_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx *req = (struct vki_drm_ctx *)ARG3;
+
+ PRE_FIELD_WRITE("ioctl(DRM_ADD_CTX).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_RM_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx *req = (struct vki_drm_ctx *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_RM_CTX).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_MOD_CTX:
+ break;
+ case VKI_DRM_IOCTL_GET_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx *req = (struct vki_drm_ctx *)ARG3;
+
+ PRE_FIELD_WRITE("ioctl(DRM_GET_CTX).flags", req->flags);
+ }
+ break;
+ case VKI_DRM_IOCTL_SWITCH_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx *req = (struct vki_drm_ctx *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_SWITCH_CTX).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_NEW_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx *req = (struct vki_drm_ctx *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NEW_CTX).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_RES_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx_res *req = (struct vki_drm_ctx_res *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_RES_CTX).count", req->count);
+ if (req->count) {
+ PRE_FIELD_READ("ioctl(DRM_RES_CTX).contexts", req->contexts);
+
+ PRE_MEM_WRITE("ioctl(DRM_RES_CTX).contexts[]", (Addr)req->contexts,
+ req->count * sizeof (req->contexts[0]));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_RES_CTX).count", req->count);
+ }
+ break;
+ case VKI_DRM_IOCTL_WAIT_VBLANK:
+ if (ARG3) {
+ union vki_drm_wait_vblank *req = (union vki_drm_wait_vblank *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_WAIT_VBLANK).request.type", req->request.type);
+ PRE_FIELD_READ("ioctl(DRM_WAIT_VBLANK).request.sequence", req->request.sequence);
+
+ if (req->request.type & VKI_DRM_VBLANK_EVENT) {
+ PRE_FIELD_READ("ioctl(DRM_WAIT_VBLANK).request.signal", req->request.signal);
+ } else {
+ PRE_FIELD_WRITE("ioctl(DRM_WAIT_VBLANK).reply.tval_sec", req->reply.tval_sec);
+ PRE_FIELD_WRITE("ioctl(DRM_WAIT_VBLANK).reply.tval_usec", req->reply.tval_usec);
+ }
+
+ PRE_FIELD_WRITE("ioctl(DRM_WAIT_VBLANK).reply.sequence", req->reply.sequence);
+ }
+ break;
+ case VKI_DRM_IOCTL_UPDATE_DRAW:
+ break;
+ case VKI_DRM_IOCTL_MODE_GETRESOURCES:
+ if (ARG3) {
+ struct vki_drm_mode_card_res *req = (struct vki_drm_mode_card_res *)ARG3;
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).min_width", req->min_width);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).max_width", req->max_width);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).min_height", req->min_height);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).max_height", req->max_height);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).count_fbs", req->count_fbs);
+ if (req->count_fbs) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).fb_id_ptr", req->fb_id_ptr);
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETRESOURCES).fb_id_ptr[]", (Addr)req->fb_id_ptr,
+ req->count_fbs * sizeof (__vki_u32));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).count_fbs", req->count_fbs);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).count_crtcs", req->count_crtcs);
+ if (req->count_crtcs) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).crtc_id_ptr", req->crtc_id_ptr);
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETRESOURCES).crtc_id_ptr[]", (Addr)req->crtc_id_ptr,
+ req->count_crtcs * sizeof (__vki_u32));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).count_crtcs", req->count_crtcs);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).count_encoders", req->count_encoders);
+ if (req->count_encoders) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).encoder_id_ptr", req->encoder_id_ptr);
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETRESOURCES).encoder_id_ptr[]", (Addr)req->encoder_id_ptr,
+ req->count_encoders * sizeof (__vki_u32));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).count_encoders", req->count_encoders);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).count_connectors", req->count_connectors);
+ if (req->count_connectors) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETRESOURCES).connector_id_ptr", req->connector_id_ptr);
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETRESOURCES).connector_id_ptr[]", (Addr)req->connector_id_ptr,
+ req->count_connectors * sizeof (__vki_u32));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETRESOURCES).count_connectors", req->count_connectors);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_GETCRTC):
+ if (ARG3) {
+ struct vki_drm_mode_crtc *req = (struct vki_drm_mode_crtc *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCRTC).crtc_id", req->crtc_id);
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).x", req->x);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).y", req->y);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).gamma_size", req->gamma_size);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).fb_id", req->fb_id);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode_valid", req->mode_valid);
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.clock", req->mode.clock);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.hdisplay", req->mode.hdisplay);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.hsync_start", req->mode.hsync_start);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.hsync_end", req->mode.hsync_end);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.htotal", req->mode.htotal);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.hskew", req->mode.hskew);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.vdisplay", req->mode.vdisplay);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.vsync_start", req->mode.vsync_start);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.vsync_end", req->mode.vsync_end);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.vtotal", req->mode.vtotal);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.vscan", req->mode.vscan);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.vrefresh", req->mode.vrefresh);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.flags", req->mode.flags);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.type", req->mode.type);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCRTC).mode.name", req->mode.name);
+
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_SETCRTC):
+ if (ARG3) {
+ struct vki_drm_mode_crtc *req = (struct vki_drm_mode_crtc *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).crtc_id", req->crtc_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode_valid", req->mode_valid);
+
+ if (req->mode_valid) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).fb_id", req->fb_id);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.clock", req->mode.clock);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.hdisplay", req->mode.hdisplay);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.hsync_start", req->mode.hsync_start);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.hsync_end", req->mode.hsync_end);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.htotal", req->mode.htotal);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.hskew", req->mode.hskew);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.vdisplay", req->mode.vdisplay);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.vsync_start", req->mode.vsync_start);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.vsync_end", req->mode.vsync_end);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.vtotal", req->mode.vtotal);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.vscan", req->mode.vscan);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.vrefresh", req->mode.vrefresh);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.flags", req->mode.flags);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.type", req->mode.type);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).mode.name", req->mode.name);
+
+ }
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).count_connectors", req->count_connectors);
+ if (req->count_connectors > 0) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).set_connectors_ptr", req->set_connectors_ptr);
+ PRE_MEM_READ("ioctl(DRM_MODE_SETCRTC).set_connectors_ptr[]",
+ (Addr)req->set_connectors_ptr, req->count_connectors * sizeof(__vki_u32));
+ }
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).x", req->x);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETCRTC).y", req->y);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_CURSOR):
+ if (ARG3) {
+ struct vki_drm_mode_cursor *req = (struct vki_drm_mode_cursor *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_CURSOR).flags", req->flags);
+ if (req->flags)
+ PRE_FIELD_READ("ioctl(DRM_MODE_CURSOR).crtc_id", req->crtc_id);
+
+ if (req->flags & VKI_DRM_MODE_CURSOR_BO) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_CURSOR).handle", req->handle);
+ PRE_FIELD_READ("ioctl(DRM_MODE_CURSOR).width", req->width);
+ PRE_FIELD_READ("ioctl(DRM_MODE_CURSOR).height", req->height);
+ }
+
+ if (req->flags & VKI_DRM_MODE_CURSOR_MOVE) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_CURSOR).x", req->x);
+ PRE_FIELD_READ("ioctl(DRM_MODE_CURSOR).y", req->y);
+ }
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_GETGAMMA):
+ if (ARG3) {
+ struct vki_drm_mode_crtc_lut *req = (struct vki_drm_mode_crtc_lut *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETGAMMA).crtc_id", req->crtc_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETGAMMA).gamma_size", req->gamma_size);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETGAMMA).red", req->red);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETGAMMA).green", req->green);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETGAMMA).blue", req->blue);
+
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETGAMMA).red[]", (Addr)req->red, req->gamma_size * sizeof(__vki_u16));
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETGAMMA).green[]", (Addr)req->green, req->gamma_size * sizeof(__vki_u16));
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETGAMMA).blue[]", (Addr)req->blue, req->gamma_size * sizeof(__vki_u16));
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_SETGAMMA):
+ if (ARG3) {
+ struct vki_drm_mode_crtc_lut *req = (struct vki_drm_mode_crtc_lut *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETGAMMA).crtc_id", req->crtc_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETGAMMA).gamma_size", req->gamma_size);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETGAMMA).red", req->red);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETGAMMA).green", req->green);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETGAMMA).blue", req->blue);
+
+ PRE_MEM_READ("ioctl(DRM_MODE_SETGAMMA).red[]", (Addr)req->red, req->gamma_size * sizeof(__vki_u16));
+ PRE_MEM_READ("ioctl(DRM_MODE_SETGAMMA).green[]", (Addr)req->green, req->gamma_size * sizeof(__vki_u16));
+ PRE_MEM_READ("ioctl(DRM_MODE_SETGAMMA).blue[]", (Addr)req->blue, req->gamma_size * sizeof(__vki_u16));
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_GETENCODER:
+ if (ARG3) {
+ struct vki_drm_mode_get_encoder *req = (struct vki_drm_mode_get_encoder *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETENCODER).encoder_id", req->encoder_id);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETENCODER).crtc_id", req->crtc_id);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETENCODER).encoder_type", req->encoder_type);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETENCODER).encoder_id", req->encoder_id);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETENCODER).possible_clones", req->possible_clones);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETENCODER).possible_crtcs", req->possible_crtcs);
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_GETCONNECTOR:
+ if (ARG3) {
+ struct vki_drm_mode_get_connector *req = (struct vki_drm_mode_get_connector *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).connector_id", req->connector_id);
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).connector_id", req->connector_id);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).connector_type", req->connector_type);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).connector_type_id", req->connector_type_id);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).mm_width", req->mm_width);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).mm_height", req->mm_height);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).subpixel", req->subpixel);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).connection", req->connection);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).encoder_id", req->encoder_id);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).count_modes", req->count_modes);
+ if (req->count_modes > 0) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).modes_ptr", req->modes_ptr);
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETCONNECTOR).modes_ptr[]", (Addr)req->modes_ptr,
+ req->count_modes * sizeof(struct vki_drm_mode_modeinfo));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).count_modes", req->count_modes);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).count_props", req->count_props);
+ if (req->count_props > 0) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).props_ptr", req->props_ptr);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).prop_values_ptr", req->prop_values_ptr);
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETCONNECTOR).props_ptr[]", (Addr)req->props_ptr,
+ req->count_props * sizeof(__vki_u32));
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETCONNECTOR).prop_values_ptr[]", (Addr)req->prop_values_ptr,
+ req->count_props * sizeof(__vki_u64));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).count_props", req->count_props);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).count_encoders", req->count_encoders);
+ if (req->count_encoders > 0) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETCONNECTOR).encoders_ptr", req->encoders_ptr);
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETCONNECTOR).encoders_ptr[]", (Addr)req->encoders_ptr,
+ req->count_encoders * sizeof(__vki_u32));
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETCONNECTOR).count_encoders", req->count_encoders);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_ATTACHMODE):
+ if (ARG3) {
+ struct vki_drm_mode_mode_cmd *req = (struct vki_drm_mode_mode_cmd *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).connector_id", req->connector_id);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.clock", req->mode.clock);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.hdisplay", req->mode.hdisplay);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.hsync_start", req->mode.hsync_start);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.hsync_end", req->mode.hsync_end);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.htotal", req->mode.htotal);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.hskew", req->mode.hskew);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.vdisplay", req->mode.vdisplay);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.vsync_start", req->mode.vsync_start);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.vsync_end", req->mode.vsync_end);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.vtotal", req->mode.vtotal);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.vscan", req->mode.vscan);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.vrefresh", req->mode.vrefresh);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.flags", req->mode.flags);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.type", req->mode.type);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ATTACHMODE).mode.name", req->mode.name);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_DETACHMODE):
+ if (ARG3) {
+ struct vki_drm_mode_mode_cmd *req = (struct vki_drm_mode_mode_cmd *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).connector_id", req->connector_id);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.clock", req->mode.clock);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.hdisplay", req->mode.hdisplay);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.hsync_start", req->mode.hsync_start);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.hsync_end", req->mode.hsync_end);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.htotal", req->mode.htotal);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.hskew", req->mode.hskew);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.vdisplay", req->mode.vdisplay);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.vsync_start", req->mode.vsync_start);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.vsync_end", req->mode.vsync_end);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.vtotal", req->mode.vtotal);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.vscan", req->mode.vscan);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.vrefresh", req->mode.vrefresh);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.flags", req->mode.flags);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.type", req->mode.type);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DETACHMODE).mode.name", req->mode.name);
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_GETPROPERTY:
+ if (ARG3) {
+ struct vki_drm_mode_get_property *req = (struct vki_drm_mode_get_property *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPERTY).prop_id", req->prop_id);
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETPROPERTY).name", req->name);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETPROPERTY).flags", req->flags);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPERTY).count_values", req->count_values);
+ // TODO: figure out how many bytes kernel is going to write, based on type of property
+ if (req->count_values)
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPERTY).values_ptr", req->values_ptr);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETPROPERTY).count_values", req->count_values);
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPERTY).count_enum_blobs", req->count_enum_blobs);
+ // TODO: as above
+ if (req->count_enum_blobs) {
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPERTY).enum_blob_ptr", req->enum_blob_ptr);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPERTY).values_ptr", req->values_ptr);
+ }
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETPROPERTY).count_enum_blobs", req->count_enum_blobs);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_SETPROPERTY):
+ if (ARG3) {
+ struct vki_drm_mode_connector_set_property *req = (struct vki_drm_mode_connector_set_property *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETPROPERTY).connector_id", req->connector_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETPROPERTY).prop_id", req->prop_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_SETPROPERTY).value", req->value);
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_GETPROPBLOB:
+ if (ARG3) {
+ struct vki_drm_mode_get_blob *req = (struct vki_drm_mode_get_blob *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPBLOB).blob_id", req->blob_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPBLOB).length", req->length);
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETPROPBLOB).data", req->data);
+
+ PRE_MEM_WRITE("ioctl(DRM_MODE_GETPROPBLOB).data[]", (Addr)req->data, req->length);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETPROPBLOB).length", req->length);
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_GETFB:
+ if (ARG3) {
+ struct vki_drm_mode_fb_cmd *req = (struct vki_drm_mode_fb_cmd *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_GETFB).fb_id", req->fb_id);
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETFB).height", req->height);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETFB).width", req->width);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETFB).depth", req->depth);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETFB).bpp", req->bpp);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETFB).pitch", req->pitch);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_GETFB).handle", req->handle);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_ADDFB):
+ if (ARG3) {
+ struct vki_drm_mode_fb_cmd *req = (struct vki_drm_mode_fb_cmd *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_ADDFB).width", req->width);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ADDFB).height", req->height);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ADDFB).handle", req->handle);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ADDFB).pitch", req->pitch);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ADDFB).bpp", req->bpp);
+ PRE_FIELD_READ("ioctl(DRM_MODE_ADDFB).depth", req->depth);
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_ADDFB).fb_id", req->fb_id);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_RMFB):
+ PRE_MEM_READ("ioctl(DRM_MODE_RMFB)", ARG3, sizeof(unsigned int));
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_PAGE_FLIP):
+ if (ARG3) {
+ struct vki_drm_mode_crtc_page_flip *req = (struct vki_drm_mode_crtc_page_flip *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_PAGE_FLIP).flags", req->flags);
+ PRE_FIELD_READ("ioctl(DRM_MODE_PAGE_FLIP).reserved", req->reserved);
+ PRE_FIELD_READ("ioctl(DRM_MODE_PAGE_FLIP).crtc_id", req->crtc_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_PAGE_FLIP).fb_id", req->fb_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_PAGE_FLIP).user_data", req->user_data);
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_DIRTYFB):
+ if (ARG3) {
+ struct vki_drm_mode_fb_dirty_cmd *req = (struct vki_drm_mode_fb_dirty_cmd *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_DIRTYFB).fb_id", req->fb_id);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DIRTYFB).num_clips", req->num_clips);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DIRTYFB).flags", req->flags);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DIRTYFB).color", req->color);
+ PRE_FIELD_READ("ioctl(DRM_MODE_DIRTYFB).clips_ptr", req->clips_ptr);
+ PRE_MEM_READ("ioctl(DRM_MODE_DIRTYFB).clips_ptr[]", (Addr)req->clips_ptr,
+ req->num_clips * sizeof(struct vki_drm_clip_rect));
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_CREATE_DUMB:
+ if (ARG3) {
+ struct vki_drm_mode_create_dumb *req = (struct vki_drm_mode_create_dumb *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_CREATE_DUMB).width", req->width);
+ PRE_FIELD_READ("ioctl(DRM_MODE_CREATE_DUMB).height", req->height);
+ PRE_FIELD_READ("ioctl(DRM_MODE_CREATE_DUMB).bpp", req->bpp);
+
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_CREATE_DUMB).pitch", req->pitch);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_CREATE_DUMB).size", req->size);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_CREATE_DUMB).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_MAP_DUMB:
+ if (ARG3) {
+ struct vki_drm_mode_map_dumb *req = (struct vki_drm_mode_map_dumb *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_MAP_DUMB).handle", req->handle);
+ PRE_FIELD_WRITE("ioctl(DRM_MODE_MAP_DUMB).offset", req->offset);
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_DESTROY_DUMB:
+ if (ARG3) {
+ struct vki_drm_mode_destroy_dumb *req = (struct vki_drm_mode_destroy_dumb *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_MODE_DESTROY_DUMB).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GETPARAM:
+ if (ARG3) {
+ struct vki_drm_nouveau_getparam *req = (struct vki_drm_nouveau_getparam *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GETPARAM).param", req->param);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GETPARAM).value", req->value);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_SETPARAM:
+ if (ARG3) {
+ struct vki_drm_nouveau_setparam *req = (struct vki_drm_nouveau_setparam *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_SETPARAM).param", req->param);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_SETPARAM).value", req->value);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC:
+ if (ARG3) {
+ struct vki_drm_nouveau_channel_alloc *req = (struct vki_drm_nouveau_channel_alloc *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).fb_ctxdma_handle", req->fb_ctxdma_handle);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).tt_ctxdma_handle", req->tt_ctxdma_handle);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).channel", req->channel);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).pushbuf_domains", req->pushbuf_domains);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).nr_subchan", req->nr_subchan);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).subchan[0].handle", req->subchan[0].handle);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).subchan[0].grclass", req->subchan[0].grclass);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_CHANNEL_ALLOC).notifier_handle", req->notifier_handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_CHANNEL_FREE:
+ if (ARG3) {
+ struct vki_drm_nouveau_channel_free *req = (struct vki_drm_nouveau_channel_free *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_CHANNEL_FREE).channel", req->channel);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GROBJ_ALLOC:
+ if (ARG3) {
+ struct vki_drm_nouveau_grobj_alloc *req = (struct vki_drm_nouveau_grobj_alloc *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GROBJ_ALLOC).handle", req->handle);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GROBJ_ALLOC).channel", req->channel);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GROBJ_ALLOC).class", req->class);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_NOTIFIEROBJ_ALLOC:
+ if (ARG3) {
+ struct vki_drm_nouveau_notifierobj_alloc *req = (struct vki_drm_nouveau_notifierobj_alloc *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_NOTIFIEROBJ_ALLOC).channel", req->channel);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_NOTIFIEROBJ_ALLOC).channel", req->handle);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_NOTIFIEROBJ_ALLOC).size", req->size);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_NOTIFIEROBJ_ALLOC).offset", req->offset);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GPUOBJ_FREE:
+ if (ARG3) {
+ struct vki_drm_nouveau_gpuobj_free *req = (struct vki_drm_nouveau_gpuobj_free *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GPUOBJ_FREE).channel", req->channel);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GPUOBJ_FREE).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GEM_NEW:
+ if (ARG3) {
+ struct vki_drm_nouveau_gem_new *req = (struct vki_drm_nouveau_gem_new *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_NEW).info.tile_flags", req->info.tile_flags);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_NEW).channel_hint", req->channel_hint);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_NEW).info.size", req->info.size);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_NEW).align", req->align);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_NEW).info.domain", req->info.domain);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_NEW).info.tile_mode", req->info.tile_mode);
+
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.domain", req->info.domain);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.size", req->info.size);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.offset", req->info.offset);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.map_handle", req->info.map_handle);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.map_handle", req->info.tile_mode);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.tile_flags", req->info.tile_flags);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.handle", req->info.handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GEM_PUSHBUF:
+ if (ARG3) {
+ struct vki_drm_nouveau_gem_pushbuf *req = (struct vki_drm_nouveau_gem_pushbuf *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).channel", req->channel);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).nr_push", req->nr_push);
+ if (req->nr_push) {
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).push", req->push);
+ PRE_MEM_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).push[]", (Addr)req->push,
+ req->nr_push * sizeof(struct vki_drm_nouveau_gem_pushbuf_push));
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).nr_buffers", req->nr_buffers);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).buffers", req->buffers);
+ if (req->nr_buffers)
+ PRE_MEM_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).buffers[]", (Addr)req->buffers,
+ req->nr_buffers * sizeof(struct vki_drm_nouveau_gem_pushbuf_bo));
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).suffix0", req->suffix0);
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).nr_relocs", req->nr_relocs);
+ }
+
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).vram_available", req->vram_available);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).gart_available", req->gart_available);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).suffix0", req->suffix0);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_PUSHBUF).suffix1", req->suffix1);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GEM_CPU_PREP:
+ if (ARG3) {
+ struct vki_drm_nouveau_gem_cpu_prep *req = (struct vki_drm_nouveau_gem_cpu_prep *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_CPU_PREP).flags", req->flags);
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_CPU_PREP).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GEM_CPU_FINI:
+ if (ARG3) {
+ struct vki_drm_nouveau_gem_cpu_fini *req = (struct vki_drm_nouveau_gem_cpu_fini *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_CPU_FINI).handle", req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_NOUVEAU_GEM_INFO:
+ if (ARG3) {
+ struct vki_drm_nouveau_gem_new *req = (struct vki_drm_nouveau_gem_new *)ARG3;
+
+ PRE_FIELD_READ("ioctl(DRM_NOUVEAU_GEM_NEW).info.handle", req->info.handle);
+
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.domain", req->info.domain);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.size", req->info.size);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.offset", req->info.offset);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.map_handle", req->info.map_handle);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.map_handle", req->info.tile_mode);
+ PRE_FIELD_WRITE("ioctl(DRM_NOUVEAU_GEM_NEW).info.tile_flags", req->info.tile_flags);
+ }
+ break;
+
default:
/* EVIOC* are variable length and return size written on success */
switch (ARG2 & ~(_VKI_IOC_SIZEMASK << _VKI_IOC_SIZESHIFT)) {
@@ -5692,7 +6370,395 @@
sizeof(struct vki_sockaddr));
}
break;
+ case VKI_DRM_IOCTL_VERSION:
+ if (ARG3) {
+ struct vki_drm_version *req = (struct vki_drm_version *)ARG3;
+ POST_FIELD_WRITE(req->version_major);
+ POST_FIELD_WRITE(req->version_minor);
+ POST_FIELD_WRITE(req->version_patchlevel);
+
+ if (req->name_len && req->name)
+ POST_MEM_WRITE((Addr)req->name, req->name_len);
+ if (req->date_len && req->date)
+ POST_MEM_WRITE((Addr)req->date, req->date_len);
+ if (req->desc_len && req->desc)
+ POST_MEM_WRITE((Addr)req->desc, req->desc_len);
+
+ POST_FIELD_WRITE(req->name_len);
+ POST_FIELD_WRITE(req->date_len);
+ POST_FIELD_WRITE(req->desc_len);
+ }
+ break;
+ case VKI_DRM_IOCTL_GET_UNIQUE:
+ if (ARG3) {
+ struct vki_drm_unique *req = (struct vki_drm_unique *)ARG3;
+
+ if (req->unique_len && req->unique)
+ POST_MEM_WRITE((Addr)req->unique, req->unique_len);
+ POST_FIELD_WRITE(req->unique_len);
+ }
+ break;
+ case VKI_DRM_IOCTL_GET_MAGIC:
+ if (ARG3) {
+ struct vki_drm_auth *req = (struct vki_drm_auth *)ARG3;
+
+ POST_FIELD_WRITE(req->magic);
+ }
+ break;
+ case VKI_DRM_IOCTL_IRQ_BUSID:
+ if (ARG3) {
+ struct vki_drm_irq_busid *req = (struct vki_drm_irq_busid *)ARG3;
+
+ POST_FIELD_WRITE(req->irq);
+ }
+ break;
+ case VKI_DRM_IOCTL_GEM_CLOSE:
+ break;
+ case VKI_DRM_IOCTL_GEM_FLINK:
+ if (ARG3) {
+ struct vki_drm_gem_flink *req = (struct vki_drm_gem_flink *)ARG3;
+
+ POST_FIELD_WRITE(req->name);
+ }
+ break;
+ case VKI_DRM_IOCTL_GEM_OPEN:
+ if (ARG3) {
+ struct vki_drm_gem_open *req = (struct vki_drm_gem_open *)ARG3;
+
+ POST_FIELD_WRITE(req->handle);
+ POST_FIELD_WRITE(req->size);
+ }
+ break;
+ case VKI_DRM_IOCTL_SET_MASTER:
+ break;
+ case VKI_DRM_IOCTL_DROP_MASTER:
+ break;
+ case VKI_DRM_IOCTL_ADD_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx *req = (struct vki_drm_ctx *)ARG3;
+
+ POST_FIELD_WRITE(req->handle);
+ }
+ break;
+ case VKI_DRM_IOCTL_RM_CTX:
+ break;
+ case VKI_DRM_IOCTL_MOD_CTX:
+ break;
+ case VKI_DRM_IOCTL_GET_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx *req = (struct vki_drm_ctx *)ARG3;
+
+ POST_FIELD_WRITE(req->flags);
+ }
+ break;
+ case VKI_DRM_IOCTL_SWITCH_CTX:
+ break;
+ case VKI_DRM_IOCTL_NEW_CTX:
+ break;
+ case VKI_DRM_IOCTL_RES_CTX:
+ if (ARG3) {
+ struct vki_drm_ctx_res *req = (struct vki_drm_ctx_res *)ARG3;
+
+ if (req->count && req->contexts) {
+ POST_MEM_WRITE((Addr)req->contexts,
+ req->count * sizeof (req->contexts[0]));
+ }
+ POST_FIELD_WRITE(req->count);
+ }
+ break;
+ case VKI_DRM_IOCTL_WAIT_VBLANK:
+ if (ARG3) {
+ union vki_drm_wait_vblank *req = (union vki_drm_wait_vblank *)ARG3;
+
+ if (!(req->request.type & VKI_DRM_VBLANK_EVENT)) {
+ POST_FIELD_WRITE(req->reply.tval_sec);
+ POST_FIELD_WRITE(req->reply.tval_usec);
+ }
+
+ POST_FIELD_WRITE(req->reply.sequence);
+ }
+ break;
+ case VKI_DRM_IOCTL_UPDATE_DRAW:
+ break;
+ case VKI_DRM_IOCTL_MODE_GETRESOURCES:
+ if (ARG3) {
+ struct vki_drm_mode_card_res *req = (struct vki_drm_mode_card_res *)ARG3;
+
+ POST_FIELD_WRITE(req->min_width);
+ POST_FIELD_WRITE(req->max_width);
+ POST_FIELD_WRITE(req->min_height);
+ POST_FIELD_WRITE(req->max_height);
+
+ // everything below is not quite true - kernel always writes to
+ // count_*, but writes to *_ptr only if initial count_* is bigger
+ // than needed; we don't have initial count_* in POST ioctl, so it's
+ // impossible to tell whether kernel wrote to *_ptr or not;
+ // so assume "null *_ptr" means "query count_*"
+ POST_FIELD_WRITE(req->count_fbs);
+ if (req->count_fbs && req->fb_id_ptr)
+ POST_MEM_WRITE((Addr)req->fb_id_ptr, req->count_fbs * sizeof (__vki_u32));
+
+ POST_FIELD_WRITE(req->count_crtcs);
+ if (req->count_crtcs && req->crtc_id_ptr)
+ POST_MEM_WRITE((Addr)req->crtc_id_ptr, req->count_crtcs * sizeof (__vki_u32));
+
+ POST_FIELD_WRITE(req->count_encoders);
+ if (req->count_encoders && req->encoder_id_ptr)
+ POST_MEM_WRITE((Addr)req->encoder_id_ptr, req->count_encoders * sizeof (__vki_u32));
+
+ POST_FIELD_WRITE(req->count_connectors);
+ if (req->count_connectors && req->connector_id_ptr)
+ POST_MEM_WRITE((Addr)req->connector_id_ptr, req->count_connectors * sizeof (__vki_u32));
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_GETCRTC):
+ if (ARG3) {
+ struct vki_drm_mode_crtc *req = (struct vki_drm_mode_crtc *)ARG3;
+
+ POST_FIELD_WRITE(req->x);
+ POST_FIELD_WRITE(req->y);
+ POST_FIELD_WRITE(req->gamma_size);
+ POST_FIELD_WRITE(req->fb_id);
+ POST_FIELD_WRITE(req->mode_valid);
+
+ if (req->mode_valid) {
+ POST_FIELD_WRITE(req->mode.clock);
+ POST_FIELD_WRITE(req->mode.hdisplay);
+ POST_FIELD_WRITE(req->mode.clock);
+ POST_FIELD_WRITE(req->mode.hsync_end);
+ POST_FIELD_WRITE(req->mode.htotal);
+ POST_FIELD_WRITE(req->mode.hskew);
+ POST_FIELD_WRITE(req->mode.vdisplay);
+ POST_FIELD_WRITE(req->mode.vsync_start);
+ POST_FIELD_WRITE(req->mode.vsync_end);
+ POST_FIELD_WRITE(req->mode.vtotal);
+ POST_FIELD_WRITE(req->mode.vscan);
+ POST_FIELD_WRITE(req->mode.vrefresh);
+ POST_FIELD_WRITE(req->mode.flags);
+ POST_FIELD_WRITE(req->mode.type);
+ POST_FIELD_WRITE(req->mode.name);
+ }
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_SETCRTC):
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_CURSOR):
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_GETGAMMA):
+ if (ARG3) {
+ struct vki_drm_mode_crtc_lut *req = (struct vki_drm_mode_crtc_lut *)ARG3;
+
+ POST_MEM_WRITE((Addr)req->red, req->gamma_size * sizeof(__vki_u16));
+ POST_MEM_WRITE((Addr)req->green, req->gamma_size * sizeof(__vki_u16));
+ POST_MEM_WRITE((Addr)req->blue, req->gamma_size * sizeof(__vki_u16));
+ }
+ break;
+ VKI_DRM_IOCTL_DOUBLE(VKI_DRM_IOCTL_MODE_SETGAMMA):
+ break;
+ case VKI_DRM_IOCTL_MODE_GETENCODER:
+ if (ARG3) {
+ struct vki_drm_mode_get_encoder *req = (struct vki_drm_mode_get_encoder *)ARG3;
+
+ POST_FIELD_WRITE(req->crtc_id);
+ POST_FIELD_WRITE(req->encoder_type);
+ POST_FIELD_WRITE(req->encoder_id);
+ POST_FIELD_WRITE(req->possible_clones);
+ POST_FIELD_WRITE(req->possible_crtcs);
+ }
+ break;
+ case VKI_DRM_IOCTL_MODE_GETCONNECTOR:
+ if (ARG3) {
+ struct vki_drm_mode_get_connector *req = (struct vki_drm_mode_get_connector *)ARG3;
+
+ POST_FIELD_WRITE(req->connector_id);
+ POST_FIELD_WRITE(req->connector_type);
+ POST_FIELD_WRITE(req->connector_type_id);
+ POST_FIELD_WRITE(req->mm_width);
+ POST_FIELD_WRITE(req->mm_height);
+ POST_FIELD_WRITE(req->subpixel);
+ POST_FIELD_WRITE(req->connection);
+ POST_FIELD_WRITE(req->encoder_id);
+ POST_FIELD_WRITE(req->count_modes);
+ POST_FIELD_WRITE(req->count_props);
+ POST_FIELD_WRITE(req->count_encoders);
+
+ // see comment near VKI_DRM_IOCTL_MODE_GETRESOURCES
+ if (req->count_modes > 0 && req->modes_ptr)
+ POST_MEM_WRITE((Addr)req->modes_ptr, req->count_m...
[truncated message content] |
|
From: <sv...@va...> - 2011-06-05 18:00:54
|
Author: sewardj
Date: 2011-06-05 18:56:03 +0100 (Sun, 05 Jun 2011)
New Revision: 2156
Log:
Improvements to code generation for 32 bit instructions. When
appropriate, generate 32 bit add/sub/and/or/xor/cmp, so as to avoid a
bunch of cases where previously values would have been widened to 64
bits, or shifted left 32 bits, before being used. Reduces the size of
the generated code by up to 2.8%.
Modified:
trunk/priv/guest_amd64_helpers.c
trunk/priv/host_amd64_defs.c
trunk/priv/host_amd64_defs.h
trunk/priv/host_amd64_isel.c
Modified: trunk/priv/guest_amd64_helpers.c
===================================================================
--- trunk/priv/guest_amd64_helpers.c 2011-05-29 09:29:18 UTC (rev 2155)
+++ trunk/priv/guest_amd64_helpers.c 2011-06-05 17:56:03 UTC (rev 2156)
@@ -877,6 +877,7 @@
# define unop(_op,_a1) IRExpr_Unop((_op),(_a1))
# define binop(_op,_a1,_a2) IRExpr_Binop((_op),(_a1),(_a2))
# define mkU64(_n) IRExpr_Const(IRConst_U64(_n))
+# define mkU32(_n) IRExpr_Const(IRConst_U32(_n))
# define mkU8(_n) IRExpr_Const(IRConst_U8(_n))
Int i, arity = 0;
@@ -959,34 +960,34 @@
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondZ)) {
/* long sub/cmp, then Z --> test dst==src */
return unop(Iop_1Uto64,
- binop(Iop_CmpEQ64,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- binop(Iop_Shl64,cc_dep2,mkU8(32))));
+ binop(Iop_CmpEQ32,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)));
}
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondNZ)) {
/* long sub/cmp, then NZ --> test dst!=src */
return unop(Iop_1Uto64,
- binop(Iop_CmpNE64,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- binop(Iop_Shl64,cc_dep2,mkU8(32))));
+ binop(Iop_CmpNE32,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)));
}
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondL)) {
/* long sub/cmp, then L (signed less than)
--> test dst <s src */
return unop(Iop_1Uto64,
- binop(Iop_CmpLT64S,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- binop(Iop_Shl64,cc_dep2,mkU8(32))));
+ binop(Iop_CmpLT32S,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)));
}
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondLE)) {
/* long sub/cmp, then LE (signed less than or equal)
--> test dst <=s src */
return unop(Iop_1Uto64,
- binop(Iop_CmpLE64S,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- binop(Iop_Shl64,cc_dep2,mkU8(32))));
+ binop(Iop_CmpLE32S,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)));
}
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondNLE)) {
@@ -995,9 +996,9 @@
--> test (dst >s src)
--> test (src <s dst) */
return unop(Iop_1Uto64,
- binop(Iop_CmpLT64S,
- binop(Iop_Shl64,cc_dep2,mkU8(32)),
- binop(Iop_Shl64,cc_dep1,mkU8(32))));
+ binop(Iop_CmpLT32S,
+ unop(Iop_64to32, cc_dep2),
+ unop(Iop_64to32, cc_dep1)));
}
@@ -1005,28 +1006,28 @@
/* long sub/cmp, then BE (unsigned less than or equal)
--> test dst <=u src */
return unop(Iop_1Uto64,
- binop(Iop_CmpLE64U,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- binop(Iop_Shl64,cc_dep2,mkU8(32))));
+ binop(Iop_CmpLE32U,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)));
}
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondNBE)) {
/* long sub/cmp, then NBE (unsigned greater than)
--> test src <u dst */
/* Note, args are opposite way round from the usual */
return unop(Iop_1Uto64,
- binop(Iop_CmpLT64U,
- binop(Iop_Shl64,cc_dep2,mkU8(32)),
- binop(Iop_Shl64,cc_dep1,mkU8(32))));
+ binop(Iop_CmpLT32U,
+ unop(Iop_64to32, cc_dep2),
+ unop(Iop_64to32, cc_dep1)));
}
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondS)) {
/* long sub/cmp, then S (negative) --> test (dst-src <s 0) */
return unop(Iop_1Uto64,
- binop(Iop_CmpLT64S,
- binop(Iop_Sub64,
- binop(Iop_Shl64, cc_dep1, mkU8(32)),
- binop(Iop_Shl64, cc_dep2, mkU8(32))),
- mkU64(0)));
+ binop(Iop_CmpLT32S,
+ binop(Iop_Sub32,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)),
+ mkU32(0)));
}
/*---------------- SUBW ----------------*/
@@ -1126,17 +1127,17 @@
if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondZ)) {
/* long and/or/xor, then Z --> test dst==0 */
return unop(Iop_1Uto64,
- binop(Iop_CmpEQ64,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- mkU64(0)));
+ binop(Iop_CmpEQ32,
+ unop(Iop_64to32, cc_dep1),
+ mkU32(0)));
}
if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondNZ)) {
/* long and/or/xor, then NZ --> test dst!=0 */
return unop(Iop_1Uto64,
- binop(Iop_CmpNE64,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- mkU64(0)));
+ binop(Iop_CmpNE32,
+ unop(Iop_64to32, cc_dep1),
+ mkU32(0)));
}
if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondLE)) {
@@ -1147,9 +1148,9 @@
the result is <=signed 0. Hence ...
*/
return unop(Iop_1Uto64,
- binop(Iop_CmpLE64S,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- mkU64(0)));
+ binop(Iop_CmpLE32S,
+ unop(Iop_64to32, cc_dep1),
+ mkU32(0)));
}
/*---------------- LOGICB ----------------*/
@@ -1214,9 +1215,9 @@
if (isU64(cc_op, AMD64G_CC_OP_DECL) && isU64(cond, AMD64CondZ)) {
/* dec L, then Z --> test dst == 0 */
return unop(Iop_1Uto64,
- binop(Iop_CmpEQ64,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- mkU64(0)));
+ binop(Iop_CmpEQ32,
+ unop(Iop_64to32, cc_dep1),
+ mkU32(0)));
}
/*---------------- DECW ----------------*/
@@ -1337,9 +1338,9 @@
if (isU64(cc_op, AMD64G_CC_OP_SUBL)) {
/* C after sub denotes unsigned less than */
return unop(Iop_1Uto64,
- binop(Iop_CmpLT64U,
- binop(Iop_Shl64,cc_dep1,mkU8(32)),
- binop(Iop_Shl64,cc_dep2,mkU8(32))));
+ binop(Iop_CmpLT32U,
+ unop(Iop_64to32, cc_dep1),
+ unop(Iop_64to32, cc_dep2)));
}
if (isU64(cc_op, AMD64G_CC_OP_SUBB)) {
/* C after sub denotes unsigned less than */
@@ -1373,6 +1374,7 @@
# undef unop
# undef binop
# undef mkU64
+# undef mkU32
# undef mkU8
return NULL;
Modified: trunk/priv/host_amd64_defs.c
===================================================================
--- trunk/priv/host_amd64_defs.c 2011-05-29 09:29:18 UTC (rev 2155)
+++ trunk/priv/host_amd64_defs.c 2011-06-05 17:56:03 UTC (rev 2156)
@@ -314,13 +314,16 @@
return op;
}
-void ppAMD64RMI ( AMD64RMI* op ) {
+static void ppAMD64RMI_wrk ( AMD64RMI* op, Bool lo32 ) {
switch (op->tag) {
case Armi_Imm:
vex_printf("$0x%x", op->Armi.Imm.imm32);
return;
- case Armi_Reg:
- ppHRegAMD64(op->Armi.Reg.reg);
+ case Armi_Reg:
+ if (lo32)
+ ppHRegAMD64_lo32(op->Armi.Reg.reg);
+ else
+ ppHRegAMD64(op->Armi.Reg.reg);
return;
case Armi_Mem:
ppAMD64AMode(op->Armi.Mem.am);
@@ -329,6 +332,12 @@
vpanic("ppAMD64RMI");
}
}
+void ppAMD64RMI ( AMD64RMI* op ) {
+ ppAMD64RMI_wrk(op, False/*!lo32*/);
+}
+void ppAMD64RMI_lo32 ( AMD64RMI* op ) {
+ ppAMD64RMI_wrk(op, True/*lo32*/);
+}
/* An AMD64RMI can only be used in a "read" context (what would it mean
to write or modify a literal?) and so we enumerate its registers
@@ -679,6 +688,19 @@
i->Ain.Lea64.dst = dst;
return i;
}
+AMD64Instr* AMD64Instr_Alu32R ( AMD64AluOp op, AMD64RMI* src, HReg dst ) {
+ AMD64Instr* i = LibVEX_Alloc(sizeof(AMD64Instr));
+ i->tag = Ain_Alu32R;
+ i->Ain.Alu32R.op = op;
+ i->Ain.Alu32R.src = src;
+ i->Ain.Alu32R.dst = dst;
+ switch (op) {
+ case Aalu_ADD: case Aalu_SUB: case Aalu_CMP:
+ case Aalu_AND: case Aalu_OR: case Aalu_XOR: break;
+ default: vassert(0);
+ }
+ return i;
+}
AMD64Instr* AMD64Instr_MulL ( Bool syned, AMD64RM* src ) {
AMD64Instr* i = LibVEX_Alloc(sizeof(AMD64Instr));
i->tag = Ain_MulL;
@@ -1083,6 +1105,12 @@
vex_printf(",");
ppHRegAMD64(i->Ain.Lea64.dst);
return;
+ case Ain_Alu32R:
+ vex_printf("%sl ", showAMD64AluOp(i->Ain.Alu32R.op));
+ ppAMD64RMI_lo32(i->Ain.Alu32R.src);
+ vex_printf(",");
+ ppHRegAMD64_lo32(i->Ain.Alu32R.dst);
+ return;
case Ain_MulL:
vex_printf("%cmulq ", i->Ain.MulL.syned ? 's' : 'u');
ppAMD64RM(i->Ain.MulL.src);
@@ -1423,6 +1451,15 @@
addRegUsage_AMD64AMode(u, i->Ain.Lea64.am);
addHRegUse(u, HRmWrite, i->Ain.Lea64.dst);
return;
+ case Ain_Alu32R:
+ vassert(i->Ain.Alu32R.op != Aalu_MOV);
+ addRegUsage_AMD64RMI(u, i->Ain.Alu32R.src);
+ if (i->Ain.Alu32R.op == Aalu_CMP) {
+ addHRegUse(u, HRmRead, i->Ain.Alu32R.dst);
+ return;
+ }
+ addHRegUse(u, HRmModify, i->Ain.Alu32R.dst);
+ return;
case Ain_MulL:
addRegUsage_AMD64RM(u, i->Ain.MulL.src, HRmRead);
addHRegUse(u, HRmModify, hregAMD64_RAX());
@@ -1719,6 +1756,10 @@
mapRegs_AMD64AMode(m, i->Ain.Lea64.am);
mapReg(m, &i->Ain.Lea64.dst);
return;
+ case Ain_Alu32R:
+ mapRegs_AMD64RMI(m, i->Ain.Alu32R.src);
+ mapReg(m, &i->Ain.Alu32R.dst);
+ return;
case Ain_MulL:
mapRegs_AMD64RM(m, i->Ain.MulL.src);
return;
@@ -2586,6 +2627,69 @@
p = doAMode_M(p, i->Ain.Lea64.dst, i->Ain.Lea64.am);
goto done;
+ case Ain_Alu32R:
+ /* ADD/SUB/AND/OR/XOR/CMP */
+ opc = opc_rr = subopc_imm = opc_imma = 0;
+ switch (i->Ain.Alu32R.op) {
+ case Aalu_ADD: opc = 0x03; opc_rr = 0x01;
+ subopc_imm = 0; opc_imma = 0x05; break;
+ case Aalu_SUB: opc = 0x2B; opc_rr = 0x29;
+ subopc_imm = 5; opc_imma = 0x2D; break;
+ case Aalu_AND: opc = 0x23; opc_rr = 0x21;
+ subopc_imm = 4; opc_imma = 0x25; break;
+ case Aalu_XOR: opc = 0x33; opc_rr = 0x31;
+ subopc_imm = 6; opc_imma = 0x35; break;
+ case Aalu_OR: opc = 0x0B; opc_rr = 0x09;
+ subopc_imm = 1; opc_imma = 0x0D; break;
+ case Aalu_CMP: opc = 0x3B; opc_rr = 0x39;
+ subopc_imm = 7; opc_imma = 0x3D; break;
+ default: goto bad;
+ }
+ switch (i->Ain.Alu32R.src->tag) {
+ case Armi_Imm:
+ if (i->Ain.Alu32R.dst == hregAMD64_RAX()
+ && !fits8bits(i->Ain.Alu32R.src->Armi.Imm.imm32)) {
+ goto bad; /* FIXME: awaiting test case */
+ *p++ = toUChar(opc_imma);
+ p = emit32(p, i->Ain.Alu32R.src->Armi.Imm.imm32);
+ } else
+ if (fits8bits(i->Ain.Alu32R.src->Armi.Imm.imm32)) {
+ rex = clearWBit( rexAMode_R( fake(0), i->Ain.Alu32R.dst ) );
+ if (rex != 0x40) *p++ = rex;
+ *p++ = 0x83;
+ p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu32R.dst);
+ *p++ = toUChar(0xFF & i->Ain.Alu32R.src->Armi.Imm.imm32);
+ } else {
+ rex = clearWBit( rexAMode_R( fake(0), i->Ain.Alu32R.dst) );
+ if (rex != 0x40) *p++ = rex;
+ *p++ = 0x81;
+ p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu32R.dst);
+ p = emit32(p, i->Ain.Alu32R.src->Armi.Imm.imm32);
+ }
+ goto done;
+ case Armi_Reg:
+ rex = clearWBit(
+ rexAMode_R( i->Ain.Alu32R.src->Armi.Reg.reg,
+ i->Ain.Alu32R.dst) );
+ if (rex != 0x40) *p++ = rex;
+ *p++ = toUChar(opc_rr);
+ p = doAMode_R(p, i->Ain.Alu32R.src->Armi.Reg.reg,
+ i->Ain.Alu32R.dst);
+ goto done;
+ case Armi_Mem:
+ rex = clearWBit(
+ rexAMode_M( i->Ain.Alu32R.dst,
+ i->Ain.Alu32R.src->Armi.Mem.am) );
+ if (rex != 0x40) *p++ = rex;
+ *p++ = toUChar(opc);
+ p = doAMode_M(p, i->Ain.Alu32R.dst,
+ i->Ain.Alu32R.src->Armi.Mem.am);
+ goto done;
+ default:
+ goto bad;
+ }
+ break;
+
case Ain_MulL:
subopc = i->Ain.MulL.syned ? 5 : 4;
switch (i->Ain.MulL.src->tag) {
Modified: trunk/priv/host_amd64_defs.h
===================================================================
--- trunk/priv/host_amd64_defs.h 2011-05-29 09:29:18 UTC (rev 2155)
+++ trunk/priv/host_amd64_defs.h 2011-06-05 17:56:03 UTC (rev 2156)
@@ -189,7 +189,8 @@
extern AMD64RMI* AMD64RMI_Reg ( HReg );
extern AMD64RMI* AMD64RMI_Mem ( AMD64AMode* );
-extern void ppAMD64RMI ( AMD64RMI* );
+extern void ppAMD64RMI ( AMD64RMI* );
+extern void ppAMD64RMI_lo32 ( AMD64RMI* );
/* --------- Operand, which can be reg or immediate only. --------- */
@@ -359,6 +360,7 @@
Ain_Test64, /* 64-bit test (AND, set flags, discard result) */
Ain_Unary64, /* 64-bit not and neg */
Ain_Lea64, /* 64-bit compute EA into a reg */
+ Ain_Alu32R, /* 32-bit add/sub/and/or/xor/cmp, dst=REG (a la Alu64R) */
Ain_MulL, /* widening multiply */
Ain_Div, /* div and mod */
//.. Xin_Sh3232, /* shldl or shrdl */
@@ -449,6 +451,12 @@
AMD64AMode* am;
HReg dst;
} Lea64;
+ /* 32-bit add/sub/and/or/xor/cmp, dst=REG (a la Alu64R) */
+ struct {
+ AMD64AluOp op;
+ AMD64RMI* src;
+ HReg dst;
+ } Alu32R;
/* 64 x 64 -> 128 bit widening multiply: RDX:RAX = RAX *s/u
r/m64 */
struct {
@@ -676,6 +684,7 @@
extern AMD64Instr* AMD64Instr_Alu64M ( AMD64AluOp, AMD64RI*, AMD64AMode* );
extern AMD64Instr* AMD64Instr_Unary64 ( AMD64UnaryOp op, HReg dst );
extern AMD64Instr* AMD64Instr_Lea64 ( AMD64AMode* am, HReg dst );
+extern AMD64Instr* AMD64Instr_Alu32R ( AMD64AluOp, AMD64RMI*, HReg );
extern AMD64Instr* AMD64Instr_Sh64 ( AMD64ShiftOp, UInt, HReg );
extern AMD64Instr* AMD64Instr_Test64 ( UInt imm32, HReg dst );
extern AMD64Instr* AMD64Instr_MulL ( Bool syned, AMD64RM* );
Modified: trunk/priv/host_amd64_isel.c
===================================================================
--- trunk/priv/host_amd64_isel.c 2011-05-29 09:29:18 UTC (rev 2155)
+++ trunk/priv/host_amd64_isel.c 2011-06-05 17:56:03 UTC (rev 2156)
@@ -1173,19 +1173,11 @@
/* Handle misc other ops. */
if (e->Iex.Binop.op == Iop_Max32U) {
- /* This generates a truly rotten piece of code. Just as well
- it doesn't happen very often. */
- HReg src1 = iselIntExpr_R(env, e->Iex.Binop.arg1);
- HReg src1L = newVRegI(env);
- HReg src2 = iselIntExpr_R(env, e->Iex.Binop.arg2);
- HReg src2L = newVRegI(env);
- HReg dst = newVRegI(env);
- addInstr(env, mk_iMOVsd_RR(src1,dst));
- addInstr(env, mk_iMOVsd_RR(src1,src1L));
- addInstr(env, AMD64Instr_Sh64(Ash_SHL, 32, src1L));
- addInstr(env, mk_iMOVsd_RR(src2,src2L));
- addInstr(env, AMD64Instr_Sh64(Ash_SHL, 32, src2L));
- addInstr(env, AMD64Instr_Alu64R(Aalu_CMP, AMD64RMI_Reg(src2L), src1L));
+ HReg src1 = iselIntExpr_R(env, e->Iex.Binop.arg1);
+ HReg dst = newVRegI(env);
+ HReg src2 = iselIntExpr_R(env, e->Iex.Binop.arg2);
+ addInstr(env, mk_iMOVsd_RR(src1, dst));
+ addInstr(env, AMD64Instr_Alu32R(Aalu_CMP, AMD64RMI_Reg(src2), dst));
addInstr(env, AMD64Instr_CMov64(Acc_B, AMD64RM_Reg(src2), dst));
return dst;
}
@@ -1422,6 +1414,36 @@
}
}
+ /* 32Uto64( Add32/Sub32/And32/Or32/Xor32(expr32, expr32) )
+ Use 32 bit arithmetic and let the default zero-extend rule
+ do the 32Uto64 for free. */
+ if (e->Iex.Unop.op == Iop_32Uto64 && e->Iex.Unop.arg->tag == Iex_Binop) {
+ IROp opi = e->Iex.Unop.arg->Iex.Binop.op; /* inner op */
+ IRExpr* argL = e->Iex.Unop.arg->Iex.Binop.arg1;
+ IRExpr* argR = e->Iex.Unop.arg->Iex.Binop.arg2;
+ AMD64AluOp aluOp = Aalu_INVALID;
+ switch (opi) {
+ case Iop_Add32: aluOp = Aalu_ADD; break;
+ case Iop_Sub32: aluOp = Aalu_SUB; break;
+ case Iop_And32: aluOp = Aalu_AND; break;
+ case Iop_Or32: aluOp = Aalu_OR; break;
+ case Iop_Xor32: aluOp = Aalu_XOR; break;
+ default: break;
+ }
+ if (aluOp != Aalu_INVALID) {
+ /* For commutative ops we assume any literal values are on
+ the second operand. */
+ HReg dst = newVRegI(env);
+ HReg reg = iselIntExpr_R(env, argL);
+ AMD64RMI* rmi = iselIntExpr_RMI(env, argR);
+ addInstr(env, mk_iMOVsd_RR(reg,dst));
+ addInstr(env, AMD64Instr_Alu32R(aluOp, rmi, dst));
+ return dst;
+ }
+ /* just fall through to normal handling for Iop_32Uto64 */
+ }
+
+ /* Fallback cases */
switch (e->Iex.Unop.op) {
case Iop_32Uto64:
case Iop_32Sto64: {
@@ -2176,10 +2198,8 @@
if (e->tag == Iex_Unop
&& e->Iex.Unop.op == Iop_CmpNEZ32) {
HReg r1 = iselIntExpr_R(env, e->Iex.Unop.arg);
- HReg tmp = newVRegI(env);
AMD64RMI* rmi2 = AMD64RMI_Imm(0);
- addInstr(env, AMD64Instr_MovxLQ(False, r1, tmp));
- addInstr(env, AMD64Instr_Alu64R(Aalu_CMP,rmi2,tmp));
+ addInstr(env, AMD64Instr_Alu32R(Aalu_CMP,rmi2,r1));
return Acc_NZ;
}
@@ -2249,25 +2269,6 @@
}
}
- /* CmpEQ32 / CmpNE32 */
- if (e->tag == Iex_Binop
- && (e->Iex.Binop.op == Iop_CmpEQ32
- || e->Iex.Binop.op == Iop_CmpNE32
- || e->Iex.Binop.op == Iop_CasCmpEQ32
- || e->Iex.Binop.op == Iop_CasCmpNE32)) {
- HReg r1 = iselIntExpr_R(env, e->Iex.Binop.arg1);
- AMD64RMI* rmi2 = iselIntExpr_RMI(env, e->Iex.Binop.arg2);
- HReg r = newVRegI(env);
- addInstr(env, mk_iMOVsd_RR(r1,r));
- addInstr(env, AMD64Instr_Alu64R(Aalu_XOR,rmi2,r));
- addInstr(env, AMD64Instr_Sh64(Ash_SHL, 32, r));
- switch (e->Iex.Binop.op) {
- case Iop_CmpEQ32: case Iop_CasCmpEQ32: return Acc_Z;
- case Iop_CmpNE32: case Iop_CasCmpNE32: return Acc_NZ;
- default: vpanic("iselCondCode(amd64): CmpXX32");
- }
- }
-
/* CmpNE64(ccall, 64-bit constant) (--smc-check=all optimisation).
Saves a "movq %rax, %tmp" compared to the default route. */
if (e->tag == Iex_Binop
@@ -2312,6 +2313,30 @@
}
}
+ /* Cmp*32*(x,y) */
+ if (e->tag == Iex_Binop
+ && (e->Iex.Binop.op == Iop_CmpEQ32
+ || e->Iex.Binop.op == Iop_CmpNE32
+ || e->Iex.Binop.op == Iop_CmpLT32S
+ || e->Iex.Binop.op == Iop_CmpLT32U
+ || e->Iex.Binop.op == Iop_CmpLE32S
+ || e->Iex.Binop.op == Iop_CmpLE32U
+ || e->Iex.Binop.op == Iop_CasCmpEQ32
+ || e->Iex.Binop.op == Iop_CasCmpNE32)) {
+ HReg r1 = iselIntExpr_R(env, e->Iex.Binop.arg1);
+ AMD64RMI* rmi2 = iselIntExpr_RMI(env, e->Iex.Binop.arg2);
+ addInstr(env, AMD64Instr_Alu32R(Aalu_CMP,rmi2,r1));
+ switch (e->Iex.Binop.op) {
+ case Iop_CmpEQ32: case Iop_CasCmpEQ32: return Acc_Z;
+ case Iop_CmpNE32: case Iop_CasCmpNE32: return Acc_NZ;
+ case Iop_CmpLT32S: return Acc_L;
+ case Iop_CmpLT32U: return Acc_B;
+ case Iop_CmpLE32S: return Acc_LE;
+ case Iop_CmpLE32U: return Acc_BE;
+ default: vpanic("iselCondCode(amd64): CmpXX32");
+ }
+ }
+
ppIRExpr(e);
vpanic("iselCondCode(amd64)");
}
|
|
From: Josef W. <Jos...@gm...> - 2011-06-05 17:09:03
|
On Friday 03 June 2011, Julian Seward wrote: > On Friday, June 03, 2011, Josef Weidendorfer wrote: > > > In real hardware, instead of modulo (which obviously takes a lot of time), > > you probably would do some hashing of a subset of address bits. > > > > We probably need to do something similar. And make this a special case only > > if needed. > > Do you have any suggestion for how to implement such a hash fn? Hmm. It should approximate "<memory block> % sets", perhaps using a precalculated 256-byte lookup table "set[<memory block> & 255]", or "<memory block> - sets * int(<memory block> * 1/sets)". And do "* 1/sets" with "*(256/sets) >>8" or by converting to float and back again? I'll have to check what is fastest. The only thing is that our approximation for sure will not be the same as what some HW does in that case. > One good thing is that these strange caches generally appear only > at L3 or LL, Yes. In HW, it also adds latency to a critical path, so I suppose it is done only for shared last-level caches. I suppose it is needed there to be flexible on the number of LL cache partitions (when you have a tile-based die layout, a L3 partition would be part of a tile). So if you have a chip with 6 cores, you would have 6 L3 cache partitions, and get a multiple of 6 of total sets even if one L3 partition has a power-of-2 number of sets. This strange number of sets has the benefit that getting an access stream which always competes for the same set (with lots of conflict cases) is less probably. > and so the number of references we'd have to process > is relatively small compared to (eg) D1 or I1. That makes the > extra costs not so bad. Probably. I still think we want to fall back to the fast way if we have a power-of-2 even in LL. The best way is to instrument different handler calls depending on the LL cache configuration, ie. a duplication of all the log_ handlers? > re my earlier suggestion about kludging this by simulating a different > associativity .. > > If I remember Hennessy & Patterson correctly, associativity above 4 makes > very little difference to the hit rate. That's why I suggested it. eg > > > L3: 12MB, 16-way, 64B lines (12288 sets) > > If we instead pretended it was 12-way, then there would be 16384 sets. Perhaps this indeed is the best default behavior. To actually be able to check this, it would be nice to still enforce 12288 sets if requested. > I would be happy with such an approximation. I don't know if it's > always possible though -- need to think about the address arithmetic > more. In general, for sure not. But for practical numbers, it could work out. Josef > Any preferences (or other proposals) ? I don't mind either way. I only > care that the performance hit is minimal. > > J > > |
|
From: <sv...@va...> - 2011-06-05 10:06:40
|
Author: bart
Date: 2011-06-05 11:01:48 +0100 (Sun, 05 Jun 2011)
New Revision: 11797
Log:
Mention the "3.x" Linux kernel version explicitly in the kernel version configure message
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2011-06-05 08:51:47 UTC (rev 11796)
+++ trunk/configure.in 2011-06-05 10:01:48 UTC (rev 11797)
@@ -226,8 +226,8 @@
case "${kernel}" in
2.6.*|3.*)
- AC_MSG_RESULT([2.6 family (${kernel})])
- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
+ AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
+ AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
;;
2.4.*)
|
|
From: Tom H. <to...@co...> - 2011-06-05 09:59:17
|
On 05/06/11 09:51, sv...@va... wrote: > Make Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official > statement that the Linux kernel 3.0 API and ABI is compatible with Linux kernel > 2.6 can be found here: http://lkml.org/lkml/2011/5/29/204. I'm not sure that having configure print "2.6 family" is a good idea. I know the ABI is the same but it will likely cause confusion. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: <sv...@va...> - 2011-06-05 08:56:38
|
Author: bart Date: 2011-06-05 09:51:47 +0100 (Sun, 05 Jun 2011) New Revision: 11796 Log: Make Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official statement that the Linux kernel 3.0 API and ABI is compatible with Linux kernel 2.6 can be found here: http://lkml.org/lkml/2011/5/29/204. Modified: trunk/configure.in Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2011-06-03 23:27:39 UTC (rev 11795) +++ trunk/configure.in 2011-06-05 08:51:47 UTC (rev 11796) @@ -225,7 +225,7 @@ kernel=`uname -r` case "${kernel}" in - 2.6.*) + 2.6.*|3.*) AC_MSG_RESULT([2.6 family (${kernel})]) AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x]) ;; |
|
From: Christian B. <bor...@de...> - 2011-06-04 20:39:24
|
Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP1 gcc 4.3.4 on z196 (s390x) ) Started at 2011-06-04 22:10:01 CEST Ended at 2011-06-04 22:39:05 CEST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 476 tests, 6 stderr failures, 0 stdout failures, 3 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcbreak (stderrB) gdbserver_tests/mcclean_after_fork (stderrB) gdbserver_tests/mssnapshot (stderrB) none/tests/faultstatus (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) |
|
From: Christian B. <bor...@de...> - 2011-06-04 20:34:04
|
Nightly build on fedora390 ( Fedora 13/14/15 mix with gcc 3.5.3 on z196 (s390x) ) Started at 2011-06-04 22:10:01 CEST Ended at 2011-06-04 22:33:17 CEST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 476 tests, 6 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) |
|
From: Bart V. A. <bva...@ac...> - 2011-06-04 08:34:30
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2011-06-04 02:52:51 EDT Ended at 2011-06-04 04:34:14 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 460 tests, 19 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/addressable (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/deep_templates (stdout) memcheck/tests/describe-block (stderr) memcheck/tests/mempool (stderr) memcheck/tests/mempool2 (stderr) memcheck/tests/origin1-yes (stderr) memcheck/tests/origin3-no (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) callgrind/tests/simwork-both (stdout) callgrind/tests/simwork-both (stderr) callgrind/tests/simwork-branch (stdout) callgrind/tests/simwork-branch (stderr) none/tests/empty-exe (stderr) none/tests/faultstatus (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |