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
(14) |
2
(12) |
3
(14) |
4
(12) |
5
(15) |
6
(12) |
7
(20) |
|
8
(10) |
9
(2) |
10
(8) |
11
(12) |
12
(20) |
13
(12) |
14
(15) |
|
15
(12) |
16
(17) |
17
(16) |
18
(10) |
19
(7) |
20
(7) |
21
(9) |
|
22
(4) |
23
(8) |
24
(4) |
25
|
26
(8) |
27
(5) |
28
(10) |
|
29
(6) |
30
(20) |
31
(9) |
|
|
|
|
|
From: <sv...@va...> - 2015-03-26 22:12:47
|
Author: philippe
Date: Thu Mar 26 22:12:40 2015
New Revision: 15041
Log:
Improve --stats=yes:
* give the avg nr of IPs per execontext
* use the newly introduced %f in m_transtab.c ratio
and in the avg nr of execontext per list
Modified:
trunk/coregrind/m_execontext.c
trunk/coregrind/m_transtab.c
Modified: trunk/coregrind/m_execontext.c
==============================================================================
--- trunk/coregrind/m_execontext.c (original)
+++ trunk/coregrind/m_execontext.c Thu Mar 26 22:12:40 2015
@@ -159,11 +159,13 @@
/* Print stats. */
void VG_(print_ExeContext_stats) ( Bool with_stacktraces )
{
+ Int i;
+ ULong total_n_ips;
+ ExeContext* ec;
+
init_ExeContext_storage();
if (with_stacktraces) {
- Int i;
- ExeContext* ec;
VG_(message)(Vg_DebugMsg, " exectx: Printing contexts stacktraces\n");
for (i = 0; i < ec_htab_size; i++) {
for (ec = ec_htab[i]; ec; ec = ec->chain) {
@@ -176,10 +178,17 @@
" exectx: Printed %'llu contexts stacktraces\n",
ec_totstored);
}
-
+
+ total_n_ips = 0;
+ for (i = 0; i < ec_htab_size; i++) {
+ for (ec = ec_htab[i]; ec; ec = ec->chain)
+ total_n_ips += ec->n_ips;
+ }
VG_(message)(Vg_DebugMsg,
- " exectx: %'lu lists, %'llu contexts (avg %'llu per list)\n",
- ec_htab_size, ec_totstored, ec_totstored / (ULong)ec_htab_size
+ " exectx: %'lu lists, %'llu contexts (avg %3.2f per list)"
+ " (avg %3.2f IP per context)\n",
+ ec_htab_size, ec_totstored, (Double)ec_totstored / (Double)ec_htab_size,
+ (Double)total_n_ips / (Double)ec_htab_size
);
VG_(message)(Vg_DebugMsg,
" exectx: %'llu searches, %'llu full compares (%'llu per 1000)\n",
Modified: trunk/coregrind/m_transtab.c
==============================================================================
--- trunk/coregrind/m_transtab.c (original)
+++ trunk/coregrind/m_transtab.c Thu Mar 26 22:12:40 2015
@@ -2384,9 +2384,9 @@
/*--- Printing out statistics. ---*/
/*------------------------------------------------------------*/
-static ULong safe_idiv( ULong a, ULong b )
+static Double safe_idiv( ULong a, ULong b )
{
- return (b == 0 ? 0 : a / b);
+ return (b == 0 ? 0 : (Double)a / (Double)b);
}
UInt VG_(get_bbs_translated) ( void )
@@ -2405,10 +2405,10 @@
VG_(message)(Vg_DebugMsg,
" transtab: new %'lld "
- "(%'llu -> %'llu; ratio %'llu:10) [%'llu scs] "
+ "(%'llu -> %'llu; ratio %3.1f) [%'llu scs] "
"avg tce size %d\n",
n_in_count, n_in_osize, n_in_tsize,
- safe_idiv(10*n_in_tsize, n_in_osize),
+ safe_idiv(n_in_tsize, n_in_osize),
n_in_sc_count,
(int) (n_in_tsize / (n_in_count ? n_in_count : 1)));
VG_(message)(Vg_DebugMsg,
|
|
From: <sv...@va...> - 2015-03-26 21:55:07
|
Author: florian
Date: Thu Mar 26 21:55:00 2015
New Revision: 15040
Log:
Add function VG_(am_is_valid_for_aspacem_minAddr) so that the parser
for command line options does not need to know what addresses are valid
for aspacem_minAddr.
That information should be hidden in the address space manager.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_main.c
trunk/coregrind/pub_core_aspacemgr.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Thu Mar 26 21:55:00 2015
@@ -1603,6 +1603,30 @@
add_segment( &seg );
}
+Bool
+VG_(am_is_valid_for_aspacem_minAddr)( Addr addr, const HChar **errmsg )
+{
+ const Addr min = 0x1000; // 1 page FIXME: VKI_PAGE_SIZE ?
+#if VG_WORDSIZE == 4
+ const Addr max = 0x40000000; // 1Gb
+#else
+ const Addr max = 0x200000000; // 8Gb
+#endif
+ Bool ok = VG_IS_PAGE_ALIGNED(addr) && addr >= min && addr <= max;
+
+ if (errmsg) {
+ *errmsg = "";
+ if (! ok) {
+ const HChar fmt[] = "Must be a page aligned address between "
+ "0x%lx and 0x%lx";
+ static HChar buf[sizeof fmt + 2 * 16]; // large enough
+ ML_(am_sprintf)(buf, fmt, min, max);
+ *errmsg = buf;
+ }
+ }
+ return ok;
+}
+
/* See description in pub_core_aspacemgr.h */
Addr VG_(am_startup) ( Addr sp_at_startup )
{
Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Thu Mar 26 21:55:00 2015
@@ -1666,21 +1666,13 @@
if VG_BINT_CLO(argv[i], "--redzone-size", VG_(clo_redzone_size),
0, MAX_CLO_REDZONE_SZB) {}
if VG_STR_CLO(argv[i], "--aspace-minaddr", tmp_str) {
-# if VG_WORDSIZE == 4
- const Addr max = (Addr) 0x40000000; // 1Gb
-# else
- const Addr max = (Addr) 0x200000000; // 8Gb
-# endif
Bool ok = VG_(parse_Addr) (&tmp_str, &VG_(clo_aspacem_minAddr));
if (!ok)
VG_(fmsg_bad_option)(argv[i], "Invalid address\n");
-
- if (!VG_IS_PAGE_ALIGNED(VG_(clo_aspacem_minAddr))
- || VG_(clo_aspacem_minAddr) < (Addr) 0x1000
- || VG_(clo_aspacem_minAddr) > max) // 1Gb
- VG_(fmsg_bad_option)(argv[i],
- "Must be a page aligned address between "
- "0x1000 and 0x%lx\n", max);
+ const HChar *errmsg;
+ if (!VG_(am_is_valid_for_aspacem_minAddr)(VG_(clo_aspacem_minAddr),
+ &errmsg))
+ VG_(fmsg_bad_option)(argv[i], "%s\n", errmsg);
}
}
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Thu Mar 26 21:55:00 2015
@@ -61,6 +61,10 @@
suggested end address (highest addressable byte) for the client's stack. */
extern Addr VG_(am_startup) ( Addr sp_at_startup );
+/* Check whether ADDR is OK to be used as aspacem_minAddr. If not, *ERRMSG
+ will be set to identify what's wrong. ERRMSG may be NULL. */
+extern Bool VG_(am_is_valid_for_aspacem_minAddr)( Addr addr,
+ const HChar **errmsg );
//--------------------------------------------------------------
// Querying current status
|
|
From: <sv...@va...> - 2015-03-26 21:32:11
|
Author: philippe
Date: Thu Mar 26 21:32:03 2015
New Revision: 15039
Log:
Have the very detailed gdbsrv debuglog (e.g. exchange of packets
between GDB and V gdbsrv, fetching/setting registers, ...) done
at debuglog level 3 instead of 1.
This allows to do gdbsrv commands at debuglog level 2
without seeing too much trace.
Modified:
trunk/coregrind/m_gdbserver/remote-utils.c
trunk/coregrind/m_gdbserver/server.c
trunk/coregrind/m_gdbserver/target.c
Modified: trunk/coregrind/m_gdbserver/remote-utils.c
==============================================================================
--- trunk/coregrind/m_gdbserver/remote-utils.c (original)
+++ trunk/coregrind/m_gdbserver/remote-utils.c Thu Mar 26 21:32:03 2015
@@ -852,16 +852,16 @@
}
if (noack_mode)
- dlog(1, "putpkt (\"%s\"); [no ack]\n", buf2);
+ dlog(3, "putpkt (\"%s\"); [no ack]\n", buf2);
else
- dlog(1,"putpkt (\"%s\"); [looking for ack]\n", buf2);
+ dlog(3,"putpkt (\"%s\"); [looking for ack]\n", buf2);
if (noack_mode)
break;
cc = readchar (1);
if (cc > 0)
- dlog(1, "[received '%c' (0x%x)]\n", cc, cc);
+ dlog(3, "[received '%c' (0x%x)]\n", cc, cc);
if (cc <= 0) {
if (cc == 0)
@@ -997,7 +997,7 @@
c = readchar (0);
if (c == '$')
break;
- dlog(1, "[getpkt: discarding char '%c']\n", c);
+ dlog(3, "[getpkt: discarding char '%c']\n", c);
if (c < 0)
return -1;
}
@@ -1029,16 +1029,16 @@
}
if (noack_mode)
- dlog(1, "getpkt (\"%s\"); [no ack] \n", buf);
+ dlog(3, "getpkt (\"%s\"); [no ack] \n", buf);
else
- dlog(1, "getpkt (\"%s\"); [sending ack] \n", buf);
+ dlog(3, "getpkt (\"%s\"); [sending ack] \n", buf);
if (!noack_mode) {
if (!ensure_write_remote_desc()) {
dlog(1, "getpkt(write ack) no write_remote_desc");
}
VG_(write) (write_remote_desc, "+", 1);
- dlog(1, "[sent ack]\n");
+ dlog(3, "[sent ack]\n");
}
return bp - buf;
Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Thu Mar 26 21:32:03 2015
@@ -618,7 +618,7 @@
if (to == NULL) to = end;
decode_address (&sig, from, to - from);
pass_signals[(int)sig] = 1;
- dlog(1, "pass_signal gdb_nr %d %s\n",
+ dlog(3, "pass_signal gdb_nr %d %s\n",
(int)sig, target_signal_to_name(sig));
from = to;
if (*from == ';') from++;
Modified: trunk/coregrind/m_gdbserver/target.c
==============================================================================
--- trunk/coregrind/m_gdbserver/target.c (original)
+++ trunk/coregrind/m_gdbserver/target.c Thu Mar 26 21:32:03 2015
@@ -339,7 +339,7 @@
if (mod && VG_(debugLog_getLevel)() > 1) {
char bufimage [2*size + 1];
heximage (bufimage, buf, size);
- dlog(2, "fetched register %d size %d name %s value %s tid %d status %s\n",
+ dlog(3, "fetched register %d size %d name %s value %s tid %d status %s\n",
regno, size, the_low_target.reg_defs[regno].name, bufimage,
tid, VG_(name_of_ThreadStatus) (tst->status));
}
@@ -449,7 +449,7 @@
int valgrind_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
{
const void *sourceaddr = C2v (memaddr);
- dlog(2, "reading memory %p size %d\n", sourceaddr, len);
+ dlog(3, "reading memory %p size %d\n", sourceaddr, len);
if (VG_(am_is_valid_for_client) ((Addr) sourceaddr,
len, VKI_PROT_READ)
|| (hostvisibility
@@ -463,11 +463,12 @@
}
}
-int valgrind_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
+int valgrind_write_memory (CORE_ADDR memaddr,
+ const unsigned char *myaddr, int len)
{
Bool is_valid_client_memory;
void *targetaddr = C2v (memaddr);
- dlog(2, "writing memory %p size %d\n", targetaddr, len);
+ dlog(3, "writing memory %p size %d\n", targetaddr, len);
is_valid_client_memory
= VG_(am_is_valid_for_client) ((Addr)targetaddr, len, VKI_PROT_WRITE);
if (is_valid_client_memory
|
|
From: Crestez D. L. <cdl...@gm...> - 2015-03-26 13:28:25
|
Hello,
I'm attempting to run valgrind 3.10.1 from the official release on mips64 (cavium octeon2 hardware). I'm using a cavium-provided toolchain and kernel patches.
One of the issues I encountered is that anything to do with TLS fails immediately (somewhere in early glibc init). It seems that this is because the cavium-provided toolchain expects the TLS pointer in the $k0 register. Normally the k0 and k1 registers are reserved for use by the OS kernel and userspace is not supposed to do anything with it. The cavium kernel includes a patch which always sets the k0 register right before returning from any syscall. That patch is not in linux upstream and the implementation is probably not portable to non-cavium processors.
I was able to get some simple programs to run (including C++ stuff) with the following valgrind patch:
--- coregrind/m_syswrap/syswrap-main.c
+++ coregrind/m_syswrap/syswrap-main.c
@@ -1127,6 +1127,9 @@ void putSyscallStatusIntoGuestState ( /*IN*/ ThreadId tid,
gst->guest_r3 = sr_ResEx(canonical->sres);
gst->guest_r7 = (Int)sr_Err(canonical->sres);
}
+ /* HACK for cavium k0 TLS */
+ gst->guest_r26 = gst->guest_ULR;
+
VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
OFFSET_mips64_r2, sizeof(UWord) );
VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
@@ -1134,6 +1137,10 @@ void putSyscallStatusIntoGuestState ( /*IN*/ ThreadId tid,
VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
OFFSET_mips64_r7, sizeof(UWord) );
+ /* HACK for cavium k0 TLS */
+ VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
+ OFFSET_mips64_r26, sizeof(UWord) );
+
# else
# error "putSyscallStatusIntoGuestState: unknown arch"
# endif
This is clearly a hack for a non-standard ABI. However since AFAIK the mips architecture leaves k0 effectively undefined for userspace this patch shouldn't hurt any other mips users. Presumably the same thing should be done for mips32 as well.
If you think that this sort of patch is acceptable the next step would be to post a bug in the tracker, right?
More complex programs failed to link libraries found in /usr/lib. That can be fixed by applying the patch from https://bugs.kde.org/show_bug.cgi?id=341997 . Otherwise some code in ld.so behaves incorrectly (it a legit asm interpretation error). That patch is a few months old and it has not been applied. I can confirm that it does fix something for me (for whatever that's worth).
Regards,
Leonard
|
|
From: <sv...@va...> - 2015-03-26 10:14:32
|
Author: rhyskidd
Date: Thu Mar 26 10:14:25 2015
New Revision: 15038
Log:
Further fixes for bz#345394 specifically for OS X 10.10
Modified:
trunk/memcheck/tests/filter_strchr
trunk/shared/vg_replace_strmem.c
Modified: trunk/memcheck/tests/filter_strchr
==============================================================================
--- trunk/memcheck/tests/filter_strchr (original)
+++ trunk/memcheck/tests/filter_strchr Thu Mar 26 10:14:25 2015
@@ -4,4 +4,5 @@
./filter_stderr "$@" |
sed -e "s/: strchr (vg_replace_strmem.c:/: index (vg_replace_strmem.c:/;
s/: _platform_strchr (vg_replace_strmem.c:/: index (vg_replace_strmem.c:/;
+ s/: _platform_strchr\$VARIANT\$Generic (vg_replace_strmem.c:/: index (vg_replace_strmem.c:/;
s/: strrchr (vg_replace_strmem.c:/: rindex (vg_replace_strmem.c:/"
Modified: trunk/shared/vg_replace_strmem.c
==============================================================================
--- trunk/shared/vg_replace_strmem.c (original)
+++ trunk/shared/vg_replace_strmem.c Thu Mar 26 10:14:25 2015
@@ -204,7 +204,7 @@
//STRRCHR(VG_Z_DYLD, strrchr)
//STRRCHR(VG_Z_DYLD, rindex)
STRRCHR(VG_Z_LIBC_SONAME, strrchr)
-# if DARWIN_VERS == DARWIN_10_9
+# if DARWIN_VERS == DARWIN_10_9 || DARWIN_VERS == DARWIN_10_10
STRRCHR(libsystemZucZddylib, strrchr)
# endif
@@ -245,6 +245,10 @@
# if DARWIN_VERS == DARWIN_10_9
STRCHR(libsystemZuplatformZddylib, _platform_strchr)
# endif
+# if DARWIN_VERS == DARWIN_10_10
+ /* _platform_strchr$VARIANT$Generic */
+ STRCHR(libsystemZuplatformZddylib, _platform_strchr$VARIANT$Generic)
+# endif
#endif
|
|
From: <sv...@va...> - 2015-03-26 07:18:45
|
Author: sewardj
Date: Thu Mar 26 07:18:32 2015
New Revision: 3107
Log:
Bug 345215 - Performance improvements for the register allocator
The basic idea is to change the representation of registers (HReg) so
as to give Real registers a unique integer index starting from 0, with
the registers available for allocation numbered consectively from zero
upwards. This allows the register allocator to index into its primary
data structure -- a table tracking the status of each available
register -- using normal array index instead of having to search
sequentially through the table, as now.
It also allows an efficient bitmap-based representation for "set of
Real registers", which is important for the NCODE work.
There are various other perf improvements, most notably in calling
getRegUsage once rather than twice per instruction.
Cost of register allocation is reduced to around 65% ish of what it
previously was. This translates in to speedups close to zero for
compute intensive code up to around 7% for JITing intensive
situations, eg "time perl tests/vg_regtest memcheck/tests/amd64".
Modified:
trunk/priv/host_amd64_defs.c
trunk/priv/host_amd64_defs.h
trunk/priv/host_amd64_isel.c
trunk/priv/host_arm64_defs.c
trunk/priv/host_arm64_defs.h
trunk/priv/host_arm64_isel.c
trunk/priv/host_arm_defs.c
trunk/priv/host_arm_defs.h
trunk/priv/host_arm_isel.c
trunk/priv/host_generic_reg_alloc2.c
trunk/priv/host_generic_regs.c
trunk/priv/host_generic_regs.h
trunk/priv/host_mips_defs.c
trunk/priv/host_mips_defs.h
trunk/priv/host_mips_isel.c
trunk/priv/host_ppc_defs.c
trunk/priv/host_ppc_defs.h
trunk/priv/host_ppc_isel.c
trunk/priv/host_s390_defs.c
trunk/priv/host_s390_defs.h
trunk/priv/host_s390_isel.c
trunk/priv/host_x86_defs.c
trunk/priv/host_x86_defs.h
trunk/priv/host_x86_isel.c
trunk/priv/main_main.c
Modified: trunk/priv/host_amd64_defs.c
==============================================================================
--- trunk/priv/host_amd64_defs.c (original)
+++ trunk/priv/host_amd64_defs.c Thu Mar 26 07:18:32 2015
@@ -44,6 +44,63 @@
/* --------- Registers. --------- */
+const RRegUniverse* getRRegUniverse_AMD64 ( void )
+{
+ /* The real-register universe is a big constant, so we just want to
+ initialise it once. */
+ static RRegUniverse rRegUniverse_AMD64;
+ static Bool rRegUniverse_AMD64_initted = False;
+
+ /* Handy shorthand, nothing more */
+ RRegUniverse* ru = &rRegUniverse_AMD64;
+
+ /* This isn't thread-safe. Sigh. */
+ if (LIKELY(rRegUniverse_AMD64_initted))
+ return ru;
+
+ RRegUniverse__init(ru);
+
+ /* Add the registers. The initial segment of this array must be
+ those available for allocation by reg-alloc, and those that
+ follow are not available for allocation. */
+ ru->regs[ru->size++] = hregAMD64_RSI();
+ ru->regs[ru->size++] = hregAMD64_RDI();
+ ru->regs[ru->size++] = hregAMD64_R8();
+ ru->regs[ru->size++] = hregAMD64_R9();
+ ru->regs[ru->size++] = hregAMD64_R12();
+ ru->regs[ru->size++] = hregAMD64_R13();
+ ru->regs[ru->size++] = hregAMD64_R14();
+ ru->regs[ru->size++] = hregAMD64_R15();
+ ru->regs[ru->size++] = hregAMD64_RBX();
+ ru->regs[ru->size++] = hregAMD64_XMM3();
+ ru->regs[ru->size++] = hregAMD64_XMM4();
+ ru->regs[ru->size++] = hregAMD64_XMM5();
+ ru->regs[ru->size++] = hregAMD64_XMM6();
+ ru->regs[ru->size++] = hregAMD64_XMM7();
+ ru->regs[ru->size++] = hregAMD64_XMM8();
+ ru->regs[ru->size++] = hregAMD64_XMM9();
+ ru->regs[ru->size++] = hregAMD64_XMM10();
+ ru->regs[ru->size++] = hregAMD64_XMM11();
+ ru->regs[ru->size++] = hregAMD64_XMM12();
+ ru->regs[ru->size++] = hregAMD64_R10();
+ ru->allocable = ru->size;
+ /* And other regs, not available to the allocator. */
+ ru->regs[ru->size++] = hregAMD64_RAX();
+ ru->regs[ru->size++] = hregAMD64_RCX();
+ ru->regs[ru->size++] = hregAMD64_RDX();
+ ru->regs[ru->size++] = hregAMD64_RSP();
+ ru->regs[ru->size++] = hregAMD64_RBP();
+ ru->regs[ru->size++] = hregAMD64_R11();
+ ru->regs[ru->size++] = hregAMD64_XMM0();
+ ru->regs[ru->size++] = hregAMD64_XMM1();
+
+ rRegUniverse_AMD64_initted = True;
+
+ RRegUniverse__check_is_sane(ru);
+ return ru;
+}
+
+
void ppHRegAMD64 ( HReg reg )
{
Int r;
@@ -58,17 +115,12 @@
/* But specific for real regs. */
switch (hregClass(reg)) {
case HRcInt64:
- r = hregNumber(reg);
+ r = hregEncoding(reg);
vassert(r >= 0 && r < 16);
vex_printf("%s", ireg64_names[r]);
return;
- case HRcFlt64:
- r = hregNumber(reg);
- vassert(r >= 0 && r < 6);
- vex_printf("%%fake%d", r);
- return;
case HRcVec128:
- r = hregNumber(reg);
+ r = hregEncoding(reg);
vassert(r >= 0 && r < 16);
vex_printf("%%xmm%d", r);
return;
@@ -81,8 +133,8 @@
{
Int r;
static const HChar* ireg32_names[16]
- = { "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
- "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d" };
+ = { "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
+ "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d" };
/* Be generic for all virtual regs. */
if (hregIsVirtual(reg)) {
ppHReg(reg);
@@ -92,7 +144,7 @@
/* But specific for real regs. */
switch (hregClass(reg)) {
case HRcInt64:
- r = hregNumber(reg);
+ r = hregEncoding(reg);
vassert(r >= 0 && r < 16);
vex_printf("%s", ireg32_names[r]);
return;
@@ -101,77 +153,6 @@
}
}
-HReg hregAMD64_RAX ( void ) { return mkHReg( 0, HRcInt64, False); }
-HReg hregAMD64_RCX ( void ) { return mkHReg( 1, HRcInt64, False); }
-HReg hregAMD64_RDX ( void ) { return mkHReg( 2, HRcInt64, False); }
-HReg hregAMD64_RBX ( void ) { return mkHReg( 3, HRcInt64, False); }
-HReg hregAMD64_RSP ( void ) { return mkHReg( 4, HRcInt64, False); }
-HReg hregAMD64_RBP ( void ) { return mkHReg( 5, HRcInt64, False); }
-HReg hregAMD64_RSI ( void ) { return mkHReg( 6, HRcInt64, False); }
-HReg hregAMD64_RDI ( void ) { return mkHReg( 7, HRcInt64, False); }
-HReg hregAMD64_R8 ( void ) { return mkHReg( 8, HRcInt64, False); }
-HReg hregAMD64_R9 ( void ) { return mkHReg( 9, HRcInt64, False); }
-HReg hregAMD64_R10 ( void ) { return mkHReg(10, HRcInt64, False); }
-HReg hregAMD64_R11 ( void ) { return mkHReg(11, HRcInt64, False); }
-HReg hregAMD64_R12 ( void ) { return mkHReg(12, HRcInt64, False); }
-HReg hregAMD64_R13 ( void ) { return mkHReg(13, HRcInt64, False); }
-HReg hregAMD64_R14 ( void ) { return mkHReg(14, HRcInt64, False); }
-HReg hregAMD64_R15 ( void ) { return mkHReg(15, HRcInt64, False); }
-
-HReg hregAMD64_XMM0 ( void ) { return mkHReg( 0, HRcVec128, False); }
-HReg hregAMD64_XMM1 ( void ) { return mkHReg( 1, HRcVec128, False); }
-HReg hregAMD64_XMM3 ( void ) { return mkHReg( 3, HRcVec128, False); }
-HReg hregAMD64_XMM4 ( void ) { return mkHReg( 4, HRcVec128, False); }
-HReg hregAMD64_XMM5 ( void ) { return mkHReg( 5, HRcVec128, False); }
-HReg hregAMD64_XMM6 ( void ) { return mkHReg( 6, HRcVec128, False); }
-HReg hregAMD64_XMM7 ( void ) { return mkHReg( 7, HRcVec128, False); }
-HReg hregAMD64_XMM8 ( void ) { return mkHReg( 8, HRcVec128, False); }
-HReg hregAMD64_XMM9 ( void ) { return mkHReg( 9, HRcVec128, False); }
-HReg hregAMD64_XMM10 ( void ) { return mkHReg(10, HRcVec128, False); }
-HReg hregAMD64_XMM11 ( void ) { return mkHReg(11, HRcVec128, False); }
-HReg hregAMD64_XMM12 ( void ) { return mkHReg(12, HRcVec128, False); }
-
-
-void getAllocableRegs_AMD64 ( Int* nregs, HReg** arr )
-{
-#if 0
- *nregs = 6;
- *arr = LibVEX_Alloc_inline(*nregs * sizeof(HReg));
- (*arr)[ 0] = hregAMD64_RSI();
- (*arr)[ 1] = hregAMD64_RDI();
- (*arr)[ 2] = hregAMD64_RBX();
-
- (*arr)[ 3] = hregAMD64_XMM7();
- (*arr)[ 4] = hregAMD64_XMM8();
- (*arr)[ 5] = hregAMD64_XMM9();
-#endif
-#if 1
- *nregs = 20;
- *arr = LibVEX_Alloc_inline(*nregs * sizeof(HReg));
- (*arr)[ 0] = hregAMD64_RSI();
- (*arr)[ 1] = hregAMD64_RDI();
- (*arr)[ 2] = hregAMD64_R8();
- (*arr)[ 3] = hregAMD64_R9();
- (*arr)[ 4] = hregAMD64_R12();
- (*arr)[ 5] = hregAMD64_R13();
- (*arr)[ 6] = hregAMD64_R14();
- (*arr)[ 7] = hregAMD64_R15();
- (*arr)[ 8] = hregAMD64_RBX();
-
- (*arr)[ 9] = hregAMD64_XMM3();
- (*arr)[10] = hregAMD64_XMM4();
- (*arr)[11] = hregAMD64_XMM5();
- (*arr)[12] = hregAMD64_XMM6();
- (*arr)[13] = hregAMD64_XMM7();
- (*arr)[14] = hregAMD64_XMM8();
- (*arr)[15] = hregAMD64_XMM9();
- (*arr)[16] = hregAMD64_XMM10();
- (*arr)[17] = hregAMD64_XMM11();
- (*arr)[18] = hregAMD64_XMM12();
- (*arr)[19] = hregAMD64_R10();
-#endif
-}
-
/* --------- Condition codes, Intel encoding. --------- */
@@ -1962,80 +1943,61 @@
/* --------- The amd64 assembler (bleh.) --------- */
/* Produce the low three bits of an integer register number. */
-static UChar iregBits210 ( HReg r )
+inline static UInt iregEnc210 ( HReg r )
{
UInt n;
vassert(hregClass(r) == HRcInt64);
vassert(!hregIsVirtual(r));
- n = hregNumber(r);
+ n = hregEncoding(r);
vassert(n <= 15);
- return toUChar(n & 7);
+ return n & 7;
}
/* Produce bit 3 of an integer register number. */
-static UChar iregBit3 ( HReg r )
+inline static UInt iregEnc3 ( HReg r )
{
UInt n;
vassert(hregClass(r) == HRcInt64);
vassert(!hregIsVirtual(r));
- n = hregNumber(r);
+ n = hregEncoding(r);
vassert(n <= 15);
- return toUChar((n >> 3) & 1);
+ return (n >> 3) & 1;
}
/* Produce a complete 4-bit integer register number. */
-static UChar iregBits3210 ( HReg r )
+inline static UInt iregEnc3210 ( HReg r )
{
UInt n;
vassert(hregClass(r) == HRcInt64);
vassert(!hregIsVirtual(r));
- n = hregNumber(r);
+ n = hregEncoding(r);
vassert(n <= 15);
- return toUChar(n);
+ return n;
}
-/* Given an xmm (128bit V-class) register number, produce the
- equivalent numbered register in 64-bit I-class. This is a bit of
- fakery which facilitates using functions that work on integer
- register numbers to be used when assembling SSE instructions
- too. */
-static HReg vreg2ireg ( HReg r )
+/* Produce a complete 4-bit integer register number. */
+inline static UInt vregEnc3210 ( HReg r )
{
UInt n;
vassert(hregClass(r) == HRcVec128);
vassert(!hregIsVirtual(r));
- n = hregNumber(r);
+ n = hregEncoding(r);
vassert(n <= 15);
- return mkHReg(n, HRcInt64, False);
+ return n;
}
-//uu /* Ditto for ymm regs. */
-//uu static HReg dvreg2ireg ( HReg r )
-//uu {
-//uu UInt n;
-//uu vassert(hregClass(r) == HRcVec256);
-//uu vassert(!hregIsVirtual(r));
-//uu n = hregNumber(r);
-//uu vassert(n <= 15);
-//uu return mkHReg(n, HRcInt64, False);
-//uu }
-
-static UChar mkModRegRM ( UInt mod, UInt reg, UInt regmem )
+inline static UChar mkModRegRM ( UInt mod, UInt reg, UInt regmem )
{
vassert(mod < 4);
vassert((reg|regmem) < 8);
- return toUChar( ((mod & 3) << 6)
- | ((reg & 7) << 3)
- | (regmem & 7) );
+ return (UChar)( ((mod & 3) << 6) | ((reg & 7) << 3) | (regmem & 7) );
}
-static UChar mkSIB ( UInt shift, UInt regindex, UInt regbase )
+inline static UChar mkSIB ( UInt shift, UInt regindex, UInt regbase )
{
vassert(shift < 4);
vassert((regindex|regbase) < 8);
- return toUChar( ((shift & 3) << 6)
- | ((regindex & 7) << 3)
- | (regbase & 7) );
+ return (UChar)( ((shift & 3) << 6) | ((regindex & 7) << 3) | (regbase & 7) );
}
static UChar* emit32 ( UChar* p, UInt w32 )
@@ -2102,8 +2064,9 @@
| index != RSP
= 10 greg 100, scale index base, d32
*/
-static UChar* doAMode_M ( UChar* p, HReg greg, AMD64AMode* am )
+static UChar* doAMode_M__wrk ( UChar* p, UInt gregEnc3210, AMD64AMode* am )
{
+ UInt gregEnc210 = gregEnc3210 & 7;
if (am->tag == Aam_IR) {
if (am->Aam.IR.imm == 0
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
@@ -2111,39 +2074,36 @@
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R12())
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R13())
) {
- *p++ = mkModRegRM(0, iregBits210(greg),
- iregBits210(am->Aam.IR.reg));
+ *p++ = mkModRegRM(0, gregEnc210, iregEnc210(am->Aam.IR.reg));
return p;
}
if (fits8bits(am->Aam.IR.imm)
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R12())
) {
- *p++ = mkModRegRM(1, iregBits210(greg),
- iregBits210(am->Aam.IR.reg));
+ *p++ = mkModRegRM(1, gregEnc210, iregEnc210(am->Aam.IR.reg));
*p++ = toUChar(am->Aam.IR.imm & 0xFF);
return p;
}
if (! sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R12())
) {
- *p++ = mkModRegRM(2, iregBits210(greg),
- iregBits210(am->Aam.IR.reg));
+ *p++ = mkModRegRM(2, gregEnc210, iregEnc210(am->Aam.IR.reg));
p = emit32(p, am->Aam.IR.imm);
return p;
}
if ((sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
|| sameHReg(am->Aam.IR.reg, hregAMD64_R12()))
&& fits8bits(am->Aam.IR.imm)) {
- *p++ = mkModRegRM(1, iregBits210(greg), 4);
+ *p++ = mkModRegRM(1, gregEnc210, 4);
*p++ = 0x24;
*p++ = toUChar(am->Aam.IR.imm & 0xFF);
return p;
}
if (/* (sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
- || wait for test case for RSP case */
+ || wait for test case for RSP case */
sameHReg(am->Aam.IR.reg, hregAMD64_R12())) {
- *p++ = mkModRegRM(2, iregBits210(greg), 4);
+ *p++ = mkModRegRM(2, gregEnc210, 4);
*p++ = 0x24;
p = emit32(p, am->Aam.IR.imm);
return p;
@@ -2155,16 +2115,16 @@
if (am->tag == Aam_IRRS) {
if (fits8bits(am->Aam.IRRS.imm)
&& ! sameHReg(am->Aam.IRRS.index, hregAMD64_RSP())) {
- *p++ = mkModRegRM(1, iregBits210(greg), 4);
- *p++ = mkSIB(am->Aam.IRRS.shift, iregBits210(am->Aam.IRRS.index),
- iregBits210(am->Aam.IRRS.base));
+ *p++ = mkModRegRM(1, gregEnc210, 4);
+ *p++ = mkSIB(am->Aam.IRRS.shift, iregEnc210(am->Aam.IRRS.index),
+ iregEnc210(am->Aam.IRRS.base));
*p++ = toUChar(am->Aam.IRRS.imm & 0xFF);
return p;
}
if (! sameHReg(am->Aam.IRRS.index, hregAMD64_RSP())) {
- *p++ = mkModRegRM(2, iregBits210(greg), 4);
- *p++ = mkSIB(am->Aam.IRRS.shift, iregBits210(am->Aam.IRRS.index),
- iregBits210(am->Aam.IRRS.base));
+ *p++ = mkModRegRM(2, gregEnc210, 4);
+ *p++ = mkSIB(am->Aam.IRRS.shift, iregEnc210(am->Aam.IRRS.index),
+ iregEnc210(am->Aam.IRRS.base));
p = emit32(p, am->Aam.IRRS.imm);
return p;
}
@@ -2176,52 +2136,122 @@
/*NOTREACHED*/
}
+static UChar* doAMode_M ( UChar* p, HReg greg, AMD64AMode* am )
+{
+ return doAMode_M__wrk(p, iregEnc3210(greg), am);
+}
+
+static UChar* doAMode_M_enc ( UChar* p, UInt gregEnc3210, AMD64AMode* am )
+{
+ vassert(gregEnc3210 < 16);
+ return doAMode_M__wrk(p, gregEnc3210, am);
+}
+
/* Emit a mod-reg-rm byte when the rm bit denotes a reg. */
-static UChar* doAMode_R ( UChar* p, HReg greg, HReg ereg )
+inline
+static UChar* doAMode_R__wrk ( UChar* p, UInt gregEnc3210, UInt eregEnc3210 )
{
- *p++ = mkModRegRM(3, iregBits210(greg), iregBits210(ereg));
+ *p++ = mkModRegRM(3, gregEnc3210 & 7, eregEnc3210 & 7);
return p;
}
+static UChar* doAMode_R ( UChar* p, HReg greg, HReg ereg )
+{
+ return doAMode_R__wrk(p, iregEnc3210(greg), iregEnc3210(ereg));
+}
+
+static UChar* doAMode_R_enc_reg ( UChar* p, UInt gregEnc3210, HReg ereg )
+{
+ vassert(gregEnc3210 < 16);
+ return doAMode_R__wrk(p, gregEnc3210, iregEnc3210(ereg));
+}
+
+static UChar* doAMode_R_reg_enc ( UChar* p, HReg greg, UInt eregEnc3210 )
+{
+ vassert(eregEnc3210 < 16);
+ return doAMode_R__wrk(p, iregEnc3210(greg), eregEnc3210);
+}
+
+static UChar* doAMode_R_enc_enc ( UChar* p, UInt gregEnc3210, UInt eregEnc3210 )
+{
+ vassert( (gregEnc3210|eregEnc3210) < 16);
+ return doAMode_R__wrk(p, gregEnc3210, eregEnc3210);
+}
+
/* Clear the W bit on a REX byte, thereby changing the operand size
back to whatever that instruction's default operand size is. */
static inline UChar clearWBit ( UChar rex )
{
- return toUChar(rex & ~(1<<3));
+ return rex & ~(1<<3);
}
/* Make up a REX byte, with W=1 (size=64), for a (greg,amode) pair. */
-static UChar rexAMode_M ( HReg greg, AMD64AMode* am )
+inline static UChar rexAMode_M__wrk ( UInt gregEnc3210, AMD64AMode* am )
{
if (am->tag == Aam_IR) {
UChar W = 1; /* we want 64-bit mode */
- UChar R = iregBit3(greg);
+ UChar R = (gregEnc3210 >> 3) & 1;
UChar X = 0; /* not relevant */
- UChar B = iregBit3(am->Aam.IR.reg);
- return toUChar(0x40 + ((W << 3) | (R << 2) | (X << 1) | (B << 0)));
+ UChar B = iregEnc3(am->Aam.IR.reg);
+ return 0x40 + ((W << 3) | (R << 2) | (X << 1) | (B << 0));
}
if (am->tag == Aam_IRRS) {
UChar W = 1; /* we want 64-bit mode */
- UChar R = iregBit3(greg);
- UChar X = iregBit3(am->Aam.IRRS.index);
- UChar B = iregBit3(am->Aam.IRRS.base);
- return toUChar(0x40 + ((W << 3) | (R << 2) | (X << 1) | (B << 0)));
+ UChar R = (gregEnc3210 >> 3) & 1;
+ UChar X = iregEnc3(am->Aam.IRRS.index);
+ UChar B = iregEnc3(am->Aam.IRRS.base);
+ return 0x40 + ((W << 3) | (R << 2) | (X << 1) | (B << 0));
}
vassert(0);
return 0; /*NOTREACHED*/
}
+static UChar rexAMode_M ( HReg greg, AMD64AMode* am )
+{
+ return rexAMode_M__wrk(iregEnc3210(greg), am);
+}
+
+static UChar rexAMode_M_enc ( UInt gregEnc3210, AMD64AMode* am )
+{
+ vassert(gregEnc3210 < 16);
+ return rexAMode_M__wrk(gregEnc3210, am);
+}
+
+
/* Make up a REX byte, with W=1 (size=64), for a (greg,ereg) pair. */
-static UChar rexAMode_R ( HReg greg, HReg ereg )
+inline static UChar rexAMode_R__wrk ( UInt gregEnc3210, UInt eregEnc3210 )
{
UChar W = 1; /* we want 64-bit mode */
- UChar R = iregBit3(greg);
+ UChar R = (gregEnc3210 >> 3) & 1;
UChar X = 0; /* not relevant */
- UChar B = iregBit3(ereg);
- return toUChar(0x40 + ((W << 3) | (R << 2) | (X << 1) | (B << 0)));
+ UChar B = (eregEnc3210 >> 3) & 1;
+ return 0x40 + ((W << 3) | (R << 2) | (X << 1) | (B << 0));
+}
+
+static UChar rexAMode_R ( HReg greg, HReg ereg )
+{
+ return rexAMode_R__wrk(iregEnc3210(greg), iregEnc3210(ereg));
+}
+
+static UChar rexAMode_R_enc_reg ( UInt gregEnc3210, HReg ereg )
+{
+ vassert(gregEnc3210 < 16);
+ return rexAMode_R__wrk(gregEnc3210, iregEnc3210(ereg));
+}
+
+static UChar rexAMode_R_reg_enc ( HReg greg, UInt eregEnc3210 )
+{
+ vassert(eregEnc3210 < 16);
+ return rexAMode_R__wrk(iregEnc3210(greg), eregEnc3210);
+}
+
+static UChar rexAMode_R_enc_enc ( UInt gregEnc3210, UInt eregEnc3210 )
+{
+ vassert((gregEnc3210|eregEnc3210) < 16);
+ return rexAMode_R__wrk(gregEnc3210, eregEnc3210);
}
@@ -2271,14 +2301,14 @@
//uu UChar rexB = 0;
//uu /* Same logic as in rexAMode_M. */
//uu if (am->tag == Aam_IR) {
-//uu rexR = iregBit3(greg);
+//uu rexR = iregEnc3(greg);
//uu rexX = 0; /* not relevant */
-//uu rexB = iregBit3(am->Aam.IR.reg);
+//uu rexB = iregEnc3(am->Aam.IR.reg);
//uu }
//uu else if (am->tag == Aam_IRRS) {
-//uu rexR = iregBit3(greg);
-//uu rexX = iregBit3(am->Aam.IRRS.index);
-//uu rexB = iregBit3(am->Aam.IRRS.base);
+//uu rexR = iregEnc3(greg);
+//uu rexX = iregEnc3(am->Aam.IRRS.index);
+//uu rexB = iregEnc3(am->Aam.IRRS.base);
//uu } else {
//uu vassert(0);
//uu }
@@ -2339,11 +2369,6 @@
vassert(nbuf >= 32);
vassert(mode64 == True);
- /* Wrap an integer as a int register, for use assembling
- GrpN insns, in which the greg field is used as a sub-opcode
- and does not really contain a register. */
-# define fake(_n) mkHReg((_n), HRcInt64, False)
-
/* vex_printf("asm "); ppAMD64Instr(i, mode64); vex_printf("\n"); */
switch (i->tag) {
@@ -2354,13 +2379,13 @@
widening rule) for constants under 1 million. We could
use this form for the range 0 to 0x7FFFFFFF inclusive, but
limit it to a smaller range for verifiability purposes. */
- if (1 & iregBit3(i->Ain.Imm64.dst))
+ if (1 & iregEnc3(i->Ain.Imm64.dst))
*p++ = 0x41;
- *p++ = 0xB8 + iregBits210(i->Ain.Imm64.dst);
+ *p++ = 0xB8 + iregEnc210(i->Ain.Imm64.dst);
p = emit32(p, (UInt)i->Ain.Imm64.imm64);
} else {
- *p++ = toUChar(0x48 + (1 & iregBit3(i->Ain.Imm64.dst)));
- *p++ = toUChar(0xB8 + iregBits210(i->Ain.Imm64.dst));
+ *p++ = toUChar(0x48 + (1 & iregEnc3(i->Ain.Imm64.dst)));
+ *p++ = toUChar(0xB8 + iregEnc210(i->Ain.Imm64.dst));
p = emit64(p, i->Ain.Imm64.imm64);
}
goto done;
@@ -2380,14 +2405,14 @@
of the dst to be zeroed out too. This saves 1
and sometimes 2 bytes compared to the more
obvious encoding in the 'else' branch. */
- if (1 & iregBit3(i->Ain.Alu64R.dst))
+ if (1 & iregEnc3(i->Ain.Alu64R.dst))
*p++ = 0x41;
- *p++ = 0xB8 + iregBits210(i->Ain.Alu64R.dst);
+ *p++ = 0xB8 + iregEnc210(i->Ain.Alu64R.dst);
p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
} else {
- *p++ = toUChar(0x48 + (1 & iregBit3(i->Ain.Alu64R.dst)));
+ *p++ = toUChar(0x48 + (1 & iregEnc3(i->Ain.Alu64R.dst)));
*p++ = 0xC7;
- *p++ = toUChar(0xC0 + iregBits210(i->Ain.Alu64R.dst));
+ *p++ = toUChar(0xC0 + iregEnc210(i->Ain.Alu64R.dst));
p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
}
goto done;
@@ -2475,14 +2500,14 @@
p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
} else
if (fits8bits(i->Ain.Alu64R.src->Armi.Imm.imm32)) {
- *p++ = rexAMode_R( fake(0), i->Ain.Alu64R.dst );
+ *p++ = rexAMode_R_enc_reg( 0, i->Ain.Alu64R.dst );
*p++ = 0x83;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu64R.dst);
+ p = doAMode_R_enc_reg(p, subopc_imm, i->Ain.Alu64R.dst);
*p++ = toUChar(0xFF & i->Ain.Alu64R.src->Armi.Imm.imm32);
} else {
- *p++ = rexAMode_R( fake(0), i->Ain.Alu64R.dst);
+ *p++ = rexAMode_R_enc_reg( 0, i->Ain.Alu64R.dst);
*p++ = 0x81;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu64R.dst);
+ p = doAMode_R_enc_reg(p, subopc_imm, i->Ain.Alu64R.dst);
p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
}
goto done;
@@ -2517,9 +2542,9 @@
i->Ain.Alu64M.dst);
goto done;
case Ari_Imm:
- *p++ = rexAMode_M(fake(0), i->Ain.Alu64M.dst);
+ *p++ = rexAMode_M_enc(0, i->Ain.Alu64M.dst);
*p++ = 0xC7;
- p = doAMode_M(p, fake(0), i->Ain.Alu64M.dst);
+ p = doAMode_M_enc(p, 0, i->Ain.Alu64M.dst);
p = emit32(p, i->Ain.Alu64M.src->Ari.Imm.imm32);
goto done;
default:
@@ -2537,14 +2562,14 @@
default: goto bad;
}
if (i->Ain.Sh64.src == 0) {
- *p++ = rexAMode_R(fake(0), i->Ain.Sh64.dst);
+ *p++ = rexAMode_R_enc_reg(0, i->Ain.Sh64.dst);
*p++ = toUChar(opc_cl);
- p = doAMode_R(p, fake(subopc), i->Ain.Sh64.dst);
+ p = doAMode_R_enc_reg(p, subopc, i->Ain.Sh64.dst);
goto done;
} else {
- *p++ = rexAMode_R(fake(0), i->Ain.Sh64.dst);
+ *p++ = rexAMode_R_enc_reg(0, i->Ain.Sh64.dst);
*p++ = toUChar(opc_imm);
- p = doAMode_R(p, fake(subopc), i->Ain.Sh64.dst);
+ p = doAMode_R_enc_reg(p, subopc, i->Ain.Sh64.dst);
*p++ = (UChar)(i->Ain.Sh64.src);
goto done;
}
@@ -2552,23 +2577,23 @@
case Ain_Test64:
/* testq sign-extend($imm32), %reg */
- *p++ = rexAMode_R(fake(0), i->Ain.Test64.dst);
+ *p++ = rexAMode_R_enc_reg(0, i->Ain.Test64.dst);
*p++ = 0xF7;
- p = doAMode_R(p, fake(0), i->Ain.Test64.dst);
+ p = doAMode_R_enc_reg(p, 0, i->Ain.Test64.dst);
p = emit32(p, i->Ain.Test64.imm32);
goto done;
case Ain_Unary64:
if (i->Ain.Unary64.op == Aun_NOT) {
- *p++ = rexAMode_R(fake(0), i->Ain.Unary64.dst);
+ *p++ = rexAMode_R_enc_reg(0, i->Ain.Unary64.dst);
*p++ = 0xF7;
- p = doAMode_R(p, fake(2), i->Ain.Unary64.dst);
+ p = doAMode_R_enc_reg(p, 2, i->Ain.Unary64.dst);
goto done;
}
if (i->Ain.Unary64.op == Aun_NEG) {
- *p++ = rexAMode_R(fake(0), i->Ain.Unary64.dst);
+ *p++ = rexAMode_R_enc_reg(0, i->Ain.Unary64.dst);
*p++ = 0xF7;
- p = doAMode_R(p, fake(3), i->Ain.Unary64.dst);
+ p = doAMode_R_enc_reg(p, 3, i->Ain.Unary64.dst);
goto done;
}
break;
@@ -2606,16 +2631,16 @@
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 ) );
+ rex = clearWBit( rexAMode_R_enc_reg( 0, i->Ain.Alu32R.dst ) );
if (rex != 0x40) *p++ = rex;
*p++ = 0x83;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu32R.dst);
+ p = doAMode_R_enc_reg(p, 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) );
+ rex = clearWBit( rexAMode_R_enc_reg( 0, i->Ain.Alu32R.dst) );
if (rex != 0x40) *p++ = rex;
*p++ = 0x81;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu32R.dst);
+ p = doAMode_R_enc_reg(p, subopc_imm, i->Ain.Alu32R.dst);
p = emit32(p, i->Ain.Alu32R.src->Armi.Imm.imm32);
}
goto done;
@@ -2646,18 +2671,14 @@
subopc = i->Ain.MulL.syned ? 5 : 4;
switch (i->Ain.MulL.src->tag) {
case Arm_Mem:
- *p++ = rexAMode_M( fake(0),
- i->Ain.MulL.src->Arm.Mem.am);
+ *p++ = rexAMode_M_enc(0, i->Ain.MulL.src->Arm.Mem.am);
*p++ = 0xF7;
- p = doAMode_M(p, fake(subopc),
- i->Ain.MulL.src->Arm.Mem.am);
+ p = doAMode_M_enc(p, subopc, i->Ain.MulL.src->Arm.Mem.am);
goto done;
case Arm_Reg:
- *p++ = rexAMode_R(fake(0),
- i->Ain.MulL.src->Arm.Reg.reg);
+ *p++ = rexAMode_R_enc_reg(0, i->Ain.MulL.src->Arm.Reg.reg);
*p++ = 0xF7;
- p = doAMode_R(p, fake(subopc),
- i->Ain.MulL.src->Arm.Reg.reg);
+ p = doAMode_R_enc_reg(p, subopc, i->Ain.MulL.src->Arm.Reg.reg);
goto done;
default:
goto bad;
@@ -2672,15 +2693,13 @@
goto bad;
/*FIXME*/
*p++ = 0xF7;
- p = doAMode_M(p, fake(subopc),
- i->Ain.Div.src->Arm.Mem.am);
+ p = doAMode_M_enc(p, subopc, i->Ain.Div.src->Arm.Mem.am);
goto done;
case Arm_Reg:
*p++ = clearWBit(
- rexAMode_R( fake(0), i->Ain.Div.src->Arm.Reg.reg));
+ rexAMode_R_enc_reg(0, i->Ain.Div.src->Arm.Reg.reg));
*p++ = 0xF7;
- p = doAMode_R(p, fake(subopc),
- i->Ain.Div.src->Arm.Reg.reg);
+ p = doAMode_R_enc_reg(p, subopc, i->Ain.Div.src->Arm.Reg.reg);
goto done;
default:
goto bad;
@@ -2689,18 +2708,14 @@
if (i->Ain.Div.sz == 8) {
switch (i->Ain.Div.src->tag) {
case Arm_Mem:
- *p++ = rexAMode_M( fake(0),
- i->Ain.Div.src->Arm.Mem.am);
+ *p++ = rexAMode_M_enc(0, i->Ain.Div.src->Arm.Mem.am);
*p++ = 0xF7;
- p = doAMode_M(p, fake(subopc),
- i->Ain.Div.src->Arm.Mem.am);
+ p = doAMode_M_enc(p, subopc, i->Ain.Div.src->Arm.Mem.am);
goto done;
case Arm_Reg:
- *p++ = rexAMode_R( fake(0),
- i->Ain.Div.src->Arm.Reg.reg);
+ *p++ = rexAMode_R_enc_reg(0, i->Ain.Div.src->Arm.Reg.reg);
*p++ = 0xF7;
- p = doAMode_R(p, fake(subopc),
- i->Ain.Div.src->Arm.Reg.reg);
+ p = doAMode_R_enc_reg(p, subopc, i->Ain.Div.src->Arm.Reg.reg);
goto done;
default:
goto bad;
@@ -2712,17 +2727,17 @@
switch (i->Ain.Push.src->tag) {
case Armi_Mem:
*p++ = clearWBit(
- rexAMode_M(fake(0), i->Ain.Push.src->Armi.Mem.am));
+ rexAMode_M_enc(0, i->Ain.Push.src->Armi.Mem.am));
*p++ = 0xFF;
- p = doAMode_M(p, fake(6), i->Ain.Push.src->Armi.Mem.am);
+ p = doAMode_M_enc(p, 6, i->Ain.Push.src->Armi.Mem.am);
goto done;
case Armi_Imm:
*p++ = 0x68;
p = emit32(p, i->Ain.Push.src->Armi.Imm.imm32);
goto done;
case Armi_Reg:
- *p++ = toUChar(0x40 + (1 & iregBit3(i->Ain.Push.src->Armi.Reg.reg)));
- *p++ = toUChar(0x50 + iregBits210(i->Ain.Push.src->Armi.Reg.reg));
+ *p++ = toUChar(0x40 + (1 & iregEnc3(i->Ain.Push.src->Armi.Reg.reg)));
+ *p++ = toUChar(0x50 + iregEnc210(i->Ain.Push.src->Armi.Reg.reg));
goto done;
default:
goto bad;
@@ -3148,7 +3163,7 @@
of the destination should be forced to zero, but doing 'xorq
%r,%r' kills the flag(s) we are about to read. Sigh. So
start off my moving $0 into the dest. */
- reg = iregBits3210(i->Ain.Set64.dst);
+ reg = iregEnc3210(i->Ain.Set64.dst);
vassert(reg < 16);
/* movq $0, %dst */
@@ -3206,13 +3221,13 @@
/* cmpxchg{8,16}b m{64,128}. Expected-value in %rdx:%rax, new
value in %rcx:%rbx. All 4 regs are hardwired in the ISA, so
aren't encoded in the insn. */
- rex = rexAMode_M( fake(1), i->Ain.ACAS.addr );
+ rex = rexAMode_M_enc(1, i->Ain.ACAS.addr );
if (i->Ain.ACAS.sz != 8)
rex = clearWBit(rex);
*p++ = rex;
*p++ = 0x0F;
*p++ = 0xC7;
- p = doAMode_M(p, fake(1), i->Ain.DACAS.addr);
+ p = doAMode_M_enc(p, 1, i->Ain.DACAS.addr);
goto done;
case Ain_A87Free:
@@ -3227,15 +3242,15 @@
if (i->Ain.A87PushPop.isPush) {
/* Load from memory into %st(0): flds/fldl amode */
*p++ = clearWBit(
- rexAMode_M(fake(0), i->Ain.A87PushPop.addr) );
+ rexAMode_M_enc(0, i->Ain.A87PushPop.addr) );
*p++ = i->Ain.A87PushPop.szB == 4 ? 0xD9 : 0xDD;
- p = doAMode_M(p, fake(0)/*subopcode*/, i->Ain.A87PushPop.addr);
+ p = doAMode_M_enc(p, 0/*subopcode*/, i->Ain.A87PushPop.addr);
} else {
/* Dump %st(0) to memory: fstps/fstpl amode */
*p++ = clearWBit(
- rexAMode_M(fake(3), i->Ain.A87PushPop.addr) );
+ rexAMode_M_enc(3, i->Ain.A87PushPop.addr) );
*p++ = i->Ain.A87PushPop.szB == 4 ? 0xD9 : 0xDD;
- p = doAMode_M(p, fake(3)/*subopcode*/, i->Ain.A87PushPop.addr);
+ p = doAMode_M_enc(p, 3/*subopcode*/, i->Ain.A87PushPop.addr);
goto done;
}
goto done;
@@ -3276,16 +3291,16 @@
case Ain_A87LdCW:
*p++ = clearWBit(
- rexAMode_M(fake(5), i->Ain.A87LdCW.addr) );
+ rexAMode_M_enc(5, i->Ain.A87LdCW.addr) );
*p++ = 0xD9;
- p = doAMode_M(p, fake(5)/*subopcode*/, i->Ain.A87LdCW.addr);
+ p = doAMode_M_enc(p, 5/*subopcode*/, i->Ain.A87LdCW.addr);
goto done;
case Ain_A87StSW:
*p++ = clearWBit(
- rexAMode_M(fake(7), i->Ain.A87StSW.addr) );
+ rexAMode_M_enc(7, i->Ain.A87StSW.addr) );
*p++ = 0xDD;
- p = doAMode_M(p, fake(7)/*subopcode*/, i->Ain.A87StSW.addr);
+ p = doAMode_M_enc(p, 7/*subopcode*/, i->Ain.A87StSW.addr);
goto done;
case Ain_Store:
@@ -3318,10 +3333,10 @@
break;
case Ain_LdMXCSR:
- *p++ = clearWBit(rexAMode_M( fake(0), i->Ain.LdMXCSR.addr));
+ *p++ = clearWBit(rexAMode_M_enc(0, i->Ain.LdMXCSR.addr));
*p++ = 0x0F;
*p++ = 0xAE;
- p = doAMode_M(p, fake(2)/*subopcode*/, i->Ain.LdMXCSR.addr);
+ p = doAMode_M_enc(p, 2/*subopcode*/, i->Ain.LdMXCSR.addr);
goto done;
case Ain_SseUComIS:
@@ -3334,53 +3349,53 @@
vassert(i->Ain.SseUComIS.sz == 4);
}
*p++ = clearWBit (
- rexAMode_R( vreg2ireg(i->Ain.SseUComIS.srcL),
- vreg2ireg(i->Ain.SseUComIS.srcR) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.SseUComIS.srcL),
+ vregEnc3210(i->Ain.SseUComIS.srcR) ));
*p++ = 0x0F;
*p++ = 0x2E;
- p = doAMode_R(p, vreg2ireg(i->Ain.SseUComIS.srcL),
- vreg2ireg(i->Ain.SseUComIS.srcR) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.SseUComIS.srcL),
+ vregEnc3210(i->Ain.SseUComIS.srcR) );
/* pushfq */
*p++ = 0x9C;
/* popq %dst */
- *p++ = toUChar(0x40 + (1 & iregBit3(i->Ain.SseUComIS.dst)));
- *p++ = toUChar(0x58 + iregBits210(i->Ain.SseUComIS.dst));
+ *p++ = toUChar(0x40 + (1 & iregEnc3(i->Ain.SseUComIS.dst)));
+ *p++ = toUChar(0x58 + iregEnc210(i->Ain.SseUComIS.dst));
goto done;
case Ain_SseSI2SF:
/* cvssi2s[sd] %src, %dst */
- rex = rexAMode_R( vreg2ireg(i->Ain.SseSI2SF.dst),
- i->Ain.SseSI2SF.src );
+ rex = rexAMode_R_enc_reg( vregEnc3210(i->Ain.SseSI2SF.dst),
+ i->Ain.SseSI2SF.src );
*p++ = toUChar(i->Ain.SseSI2SF.szD==4 ? 0xF3 : 0xF2);
*p++ = toUChar(i->Ain.SseSI2SF.szS==4 ? clearWBit(rex) : rex);
*p++ = 0x0F;
*p++ = 0x2A;
- p = doAMode_R( p, vreg2ireg(i->Ain.SseSI2SF.dst),
- i->Ain.SseSI2SF.src );
+ p = doAMode_R_enc_reg( p, vregEnc3210(i->Ain.SseSI2SF.dst),
+ i->Ain.SseSI2SF.src );
goto done;
case Ain_SseSF2SI:
/* cvss[sd]2si %src, %dst */
- rex = rexAMode_R( i->Ain.SseSF2SI.dst,
- vreg2ireg(i->Ain.SseSF2SI.src) );
+ rex = rexAMode_R_reg_enc( i->Ain.SseSF2SI.dst,
+ vregEnc3210(i->Ain.SseSF2SI.src) );
*p++ = toUChar(i->Ain.SseSF2SI.szS==4 ? 0xF3 : 0xF2);
*p++ = toUChar(i->Ain.SseSF2SI.szD==4 ? clearWBit(rex) : rex);
*p++ = 0x0F;
*p++ = 0x2D;
- p = doAMode_R( p, i->Ain.SseSF2SI.dst,
- vreg2ireg(i->Ain.SseSF2SI.src) );
+ p = doAMode_R_reg_enc( p, i->Ain.SseSF2SI.dst,
+ vregEnc3210(i->Ain.SseSF2SI.src) );
goto done;
case Ain_SseSDSS:
/* cvtsd2ss/cvtss2sd %src, %dst */
*p++ = toUChar(i->Ain.SseSDSS.from64 ? 0xF2 : 0xF3);
*p++ = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.SseSDSS.dst),
- vreg2ireg(i->Ain.SseSDSS.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.SseSDSS.dst),
+ vregEnc3210(i->Ain.SseSDSS.src) ));
*p++ = 0x0F;
*p++ = 0x5A;
- p = doAMode_R( p, vreg2ireg(i->Ain.SseSDSS.dst),
- vreg2ireg(i->Ain.SseSDSS.src) );
+ p = doAMode_R_enc_enc( p, vregEnc3210(i->Ain.SseSDSS.dst),
+ vregEnc3210(i->Ain.SseSDSS.src) );
goto done;
case Ain_SseLdSt:
@@ -3394,10 +3409,12 @@
vassert(0);
}
*p++ = clearWBit(
- rexAMode_M( vreg2ireg(i->Ain.SseLdSt.reg), i->Ain.SseLdSt.addr));
+ rexAMode_M_enc(vregEnc3210(i->Ain.SseLdSt.reg),
+ i->Ain.SseLdSt.addr));
*p++ = 0x0F;
*p++ = toUChar(i->Ain.SseLdSt.isLoad ? 0x10 : 0x11);
- p = doAMode_M(p, vreg2ireg(i->Ain.SseLdSt.reg), i->Ain.SseLdSt.addr);
+ p = doAMode_M_enc(p, vregEnc3210(i->Ain.SseLdSt.reg),
+ i->Ain.SseLdSt.addr);
goto done;
case Ain_SseLdzLO:
@@ -3405,19 +3422,19 @@
/* movs[sd] amode, %xmm-dst */
*p++ = toUChar(i->Ain.SseLdzLO.sz==4 ? 0xF3 : 0xF2);
*p++ = clearWBit(
- rexAMode_M(vreg2ireg(i->Ain.SseLdzLO.reg),
- i->Ain.SseLdzLO.addr));
+ rexAMode_M_enc(vregEnc3210(i->Ain.SseLdzLO.reg),
+ i->Ain.SseLdzLO.addr));
*p++ = 0x0F;
*p++ = 0x10;
- p = doAMode_M(p, vreg2ireg(i->Ain.SseLdzLO.reg),
- i->Ain.SseLdzLO.addr);
+ p = doAMode_M_enc(p, vregEnc3210(i->Ain.SseLdzLO.reg),
+ i->Ain.SseLdzLO.addr);
goto done;
case Ain_Sse32Fx4:
xtra = 0;
*p++ = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.Sse32Fx4.dst),
- vreg2ireg(i->Ain.Sse32Fx4.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.Sse32Fx4.dst),
+ vregEnc3210(i->Ain.Sse32Fx4.src) ));
*p++ = 0x0F;
switch (i->Ain.Sse32Fx4.op) {
case Asse_ADDF: *p++ = 0x58; break;
@@ -3435,8 +3452,8 @@
case Asse_CMPUNF: *p++ = 0xC2; xtra = 0x103; break;
default: goto bad;
}
- p = doAMode_R(p, vreg2ireg(i->Ain.Sse32Fx4.dst),
- vreg2ireg(i->Ain.Sse32Fx4.src) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.Sse32Fx4.dst),
+ vregEnc3210(i->Ain.Sse32Fx4.src) );
if (xtra & 0x100)
*p++ = toUChar(xtra & 0xFF);
goto done;
@@ -3445,8 +3462,8 @@
xtra = 0;
*p++ = 0x66;
*p++ = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.Sse64Fx2.dst),
- vreg2ireg(i->Ain.Sse64Fx2.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.Sse64Fx2.dst),
+ vregEnc3210(i->Ain.Sse64Fx2.src) ));
*p++ = 0x0F;
switch (i->Ain.Sse64Fx2.op) {
case Asse_ADDF: *p++ = 0x58; break;
@@ -3462,8 +3479,8 @@
case Asse_CMPUNF: *p++ = 0xC2; xtra = 0x103; break;
default: goto bad;
}
- p = doAMode_R(p, vreg2ireg(i->Ain.Sse64Fx2.dst),
- vreg2ireg(i->Ain.Sse64Fx2.src) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.Sse64Fx2.dst),
+ vregEnc3210(i->Ain.Sse64Fx2.src) );
if (xtra & 0x100)
*p++ = toUChar(xtra & 0xFF);
goto done;
@@ -3472,8 +3489,8 @@
xtra = 0;
*p++ = 0xF3;
*p++ = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.Sse32FLo.dst),
- vreg2ireg(i->Ain.Sse32FLo.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.Sse32FLo.dst),
+ vregEnc3210(i->Ain.Sse32FLo.src) ));
*p++ = 0x0F;
switch (i->Ain.Sse32FLo.op) {
case Asse_ADDF: *p++ = 0x58; break;
@@ -3491,8 +3508,8 @@
case Asse_CMPUNF: *p++ = 0xC2; xtra = 0x103; break;
default: goto bad;
}
- p = doAMode_R(p, vreg2ireg(i->Ain.Sse32FLo.dst),
- vreg2ireg(i->Ain.Sse32FLo.src) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.Sse32FLo.dst),
+ vregEnc3210(i->Ain.Sse32FLo.src) );
if (xtra & 0x100)
*p++ = toUChar(xtra & 0xFF);
goto done;
@@ -3501,8 +3518,8 @@
xtra = 0;
*p++ = 0xF2;
*p++ = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.Sse64FLo.dst),
- vreg2ireg(i->Ain.Sse64FLo.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.Sse64FLo.dst),
+ vregEnc3210(i->Ain.Sse64FLo.src) ));
*p++ = 0x0F;
switch (i->Ain.Sse64FLo.op) {
case Asse_ADDF: *p++ = 0x58; break;
@@ -3518,8 +3535,8 @@
case Asse_CMPUNF: *p++ = 0xC2; xtra = 0x103; break;
default: goto bad;
}
- p = doAMode_R(p, vreg2ireg(i->Ain.Sse64FLo.dst),
- vreg2ireg(i->Ain.Sse64FLo.src) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.Sse64FLo.dst),
+ vregEnc3210(i->Ain.Sse64FLo.src) );
if (xtra & 0x100)
*p++ = toUChar(xtra & 0xFF);
goto done;
@@ -3528,8 +3545,8 @@
# define XX(_n) *p++ = (_n)
rex = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.SseReRg.dst),
- vreg2ireg(i->Ain.SseReRg.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.SseReRg.dst),
+ vregEnc3210(i->Ain.SseReRg.src) ));
switch (i->Ain.SseReRg.op) {
case Asse_MOV: /*movups*/ XX(rex); XX(0x0F); XX(0x10); break;
@@ -3589,8 +3606,8 @@
case Asse_UNPCKLQ: XX(0x66); XX(rex); XX(0x0F); XX(0x6C); break;
default: goto bad;
}
- p = doAMode_R(p, vreg2ireg(i->Ain.SseReRg.dst),
- vreg2ireg(i->Ain.SseReRg.src) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.SseReRg.dst),
+ vregEnc3210(i->Ain.SseReRg.src) );
# undef XX
goto done;
@@ -3602,12 +3619,12 @@
/* movaps %src, %dst */
*p++ = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.SseCMov.dst),
- vreg2ireg(i->Ain.SseCMov.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.SseCMov.dst),
+ vregEnc3210(i->Ain.SseCMov.src) ));
*p++ = 0x0F;
*p++ = 0x28;
- p = doAMode_R(p, vreg2ireg(i->Ain.SseCMov.dst),
- vreg2ireg(i->Ain.SseCMov.src) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.SseCMov.dst),
+ vregEnc3210(i->Ain.SseCMov.src) );
/* Fill in the jump offset. */
*(ptmp-1) = toUChar(p - ptmp);
@@ -3616,12 +3633,12 @@
case Ain_SseShuf:
*p++ = 0x66;
*p++ = clearWBit(
- rexAMode_R( vreg2ireg(i->Ain.SseShuf.dst),
- vreg2ireg(i->Ain.SseShuf.src) ));
+ rexAMode_R_enc_enc( vregEnc3210(i->Ain.SseShuf.dst),
+ vregEnc3210(i->Ain.SseShuf.src) ));
*p++ = 0x0F;
*p++ = 0x70;
- p = doAMode_R(p, vreg2ireg(i->Ain.SseShuf.dst),
- vreg2ireg(i->Ain.SseShuf.src) );
+ p = doAMode_R_enc_enc(p, vregEnc3210(i->Ain.SseShuf.dst),
+ vregEnc3210(i->Ain.SseShuf.src) );
*p++ = (UChar)(i->Ain.SseShuf.order);
goto done;
@@ -3652,14 +3669,14 @@
/* --- decl 8(%rbp) --- */
/* Need to compute the REX byte for the decl in order to prove
that we don't need it, since this is a 32-bit inc and all
- registers involved in the amode are < r8. "fake(1)" because
+ registers involved in the amode are < r8. "1" because
there's no register in this encoding; instead the register
field is used as a sub opcode. The encoding for "decl r/m32"
- is FF /1, hence the fake(1). */
- rex = clearWBit(rexAMode_M(fake(1), i->Ain.EvCheck.amCounter));
+ is FF /1, hence the "1". */
+ rex = clearWBit(rexAMode_M_enc(1, i->Ain.EvCheck.amCounter));
if (rex != 0x40) goto bad; /* We don't expect to need the REX byte. */
*p++ = 0xFF;
- p = doAMode_M(p, fake(1), i->Ain.EvCheck.amCounter);
+ p = doAMode_M_enc(p, 1, i->Ain.EvCheck.amCounter);
vassert(p - p0 == 3);
/* --- jns nofail --- */
*p++ = 0x79;
@@ -3669,10 +3686,10 @@
/* Once again, verify we don't need REX. The encoding is FF /4.
We don't need REX.W since by default FF /4 in 64-bit mode
implies a 64 bit load. */
- rex = clearWBit(rexAMode_M(fake(4), i->Ain.EvCheck.amFailAddr));
+ rex = clearWBit(rexAMode_M_enc(4, i->Ain.EvCheck.amFailAddr));
if (rex != 0x40) goto bad;
*p++ = 0xFF;
- p = doAMode_M(p, fake(4), i->Ain.EvCheck.amFailAddr);
+ p = doAMode_M_enc(p, 4, i->Ain.EvCheck.amFailAddr);
vassert(p - p0 == 8); /* also ensures that 0x03 offset above is ok */
/* And crosscheck .. */
vassert(evCheckSzB_AMD64() == 8);
@@ -3710,8 +3727,6 @@
done:
vassert(p - &buf[0] <= 32);
return p - &buf[0];
-
-# undef fake
}
Modified: trunk/priv/host_amd64_defs.h
==============================================================================
--- trunk/priv/host_amd64_defs.h (original)
+++ trunk/priv/host_amd64_defs.h Thu Mar 26 07:18:32 2015
@@ -46,44 +46,42 @@
float regs, and 16 real vector regs.
*/
-extern void ppHRegAMD64 ( HReg );
+#define ST_IN static inline
+ST_IN HReg hregAMD64_RSI ( void ) { return mkHReg(False, HRcInt64, 6, 0); }
+ST_IN HReg hregAMD64_RDI ( void ) { return mkHReg(False, HRcInt64, 7, 1); }
+ST_IN HReg hregAMD64_R8 ( void ) { return mkHReg(False, HRcInt64, 8, 2); }
+ST_IN HReg hregAMD64_R9 ( void ) { return mkHReg(False, HRcInt64, 9, 3); }
+ST_IN HReg hregAMD64_R12 ( void ) { return mkHReg(False, HRcInt64, 12, 4); }
+ST_IN HReg hregAMD64_R13 ( void ) { return mkHReg(False, HRcInt64, 13, 5); }
+ST_IN HReg hregAMD64_R14 ( void ) { return mkHReg(False, HRcInt64, 14, 6); }
+ST_IN HReg hregAMD64_R15 ( void ) { return mkHReg(False, HRcInt64, 15, 7); }
+ST_IN HReg hregAMD64_RBX ( void ) { return mkHReg(False, HRcInt64, 3, 8); }
+
+ST_IN HReg hregAMD64_XMM3 ( void ) { return mkHReg(False, HRcVec128, 3, 9); }
+ST_IN HReg hregAMD64_XMM4 ( void ) { return mkHReg(False, HRcVec128, 4, 10); }
+ST_IN HReg hregAMD64_XMM5 ( void ) { return mkHReg(False, HRcVec128, 5, 11); }
+ST_IN HReg hregAMD64_XMM6 ( void ) { return mkHReg(False, HRcVec128, 6, 12); }
+ST_IN HReg hregAMD64_XMM7 ( void ) { return mkHReg(False, HRcVec128, 7, 13); }
+ST_IN HReg hregAMD64_XMM8 ( void ) { return mkHReg(False, HRcVec128, 8, 14); }
+ST_IN HReg hregAMD64_XMM9 ( void ) { return mkHReg(False, HRcVec128, 9, 15); }
+ST_IN HReg hregAMD64_XMM10 ( void ) { return mkHReg(False, HRcVec128, 10, 16); }
+ST_IN HReg hregAMD64_XMM11 ( void ) { return mkHReg(False, HRcVec128, 11, 17); }
+ST_IN HReg hregAMD64_XMM12 ( void ) { return mkHReg(False, HRcVec128, 12, 18); }
+
+ST_IN HReg hregAMD64_R10 ( void ) { return mkHReg(False, HRcInt64, 10, 19); }
+
+ST_IN HReg hregAMD64_RAX ( void ) { return mkHReg(False, HRcInt64, 0, 20); }
+ST_IN HReg hregAMD64_RCX ( void ) { return mkHReg(False, HRcInt64, 1, 21); }
+ST_IN HReg hregAMD64_RDX ( void ) { return mkHReg(False, HRcInt64, 2, 22); }
+ST_IN HReg hregAMD64_RSP ( void ) { return mkHReg(False, HRcInt64, 4, 23); }
+ST_IN HReg hregAMD64_RBP ( void ) { return mkHReg(False, HRcInt64, 5, 24); }
+ST_IN HReg hregAMD64_R11 ( void ) { return mkHReg(False, HRcInt64, 11, 25); }
+
+ST_IN HReg hregAMD64_XMM0 ( void ) { return mkHReg(False, HRcVec128, 0, 26); }
+ST_IN HReg hregAMD64_XMM1 ( void ) { return mkHReg(False, HRcVec128, 1, 27); }
+#undef ST_IN
-extern HReg hregAMD64_RAX ( void );
-extern HReg hregAMD64_RBX ( void );
-extern HReg hregAMD64_RCX ( void );
-extern HReg hregAMD64_RDX ( void );
-extern HReg hregAMD64_RSP ( void );
-extern HReg hregAMD64_RBP ( void );
-extern HReg hregAMD64_RSI ( void );
-extern HReg hregAMD64_RDI ( void );
-extern HReg hregAMD64_R8 ( void );
-extern HReg hregAMD64_R9 ( void );
-extern HReg hregAMD64_R10 ( void );
-extern HReg hregAMD64_R11 ( void );
-extern HReg hregAMD64_R12 ( void );
-extern HReg hregAMD64_R13 ( void );
-extern HReg hregAMD64_R14 ( void );
-extern HReg hregAMD64_R15 ( void );
-
-extern HReg hregAMD64_FAKE0 ( void );
-extern HReg hregAMD64_FAKE1 ( void );
-extern HReg hregAMD64_FAKE2 ( void );
-extern HReg hregAMD64_FAKE3 ( void );
-extern HReg hregAMD64_FAKE4 ( void );
-extern HReg hregAMD64_FAKE5 ( void );
-
-extern HReg hregAMD64_XMM0 ( void );
-extern HReg hregAMD64_XMM1 ( void );
-extern HReg hregAMD64_XMM3 ( void );
-extern HReg hregAMD64_XMM4 ( void );
-extern HReg hregAMD64_XMM5 ( void );
-extern HReg hregAMD64_XMM6 ( void );
-extern HReg hregAMD64_XMM7 ( void );
-extern HReg hregAMD64_XMM8 ( void );
-extern HReg hregAMD64_XMM9 ( void );
-extern HReg hregAMD64_XMM10 ( void );
-extern HReg hregAMD64_XMM11 ( void );
-extern HReg hregAMD64_XMM12 ( void );
+extern void ppHRegAMD64 ( HReg );
/* --------- Condition codes, AMD encoding. --------- */
@@ -790,7 +788,8 @@
extern void genReload_AMD64 ( /*OUT*/HInstr** i1, /*OUT*/HInstr** i2,
HReg rreg, Int offset, Bool );
-extern void getAllocableRegs_AMD64 ( Int*, HReg** );
+extern const RRegUniverse* getRRegUniverse_AMD64 ( void );
+
extern HInstrArray* iselSB_AMD64 ( const IRSB*,
VexArch,
const VexArchInfo*,
Modified: trunk/priv/host_amd64_isel.c
==============================================================================
--- trunk/priv/host_amd64_isel.c (original)
+++ trunk/priv/host_amd64_isel.c Thu Mar 26 07:18:32 2015
@@ -193,14 +193,14 @@
static HReg newVRegI ( ISelEnv* env )
{
- HReg reg = mkHReg(env->vreg_ctr, HRcInt64, True/*virtual reg*/);
+ HReg reg = mkHReg(True/*virtual reg*/, HRcInt64, 0/*enc*/, env->vreg_ctr);
env->vreg_ctr++;
return reg;
}
static HReg newVRegV ( ISelEnv* env )
{
- HReg reg = mkHReg(env->vreg_ctr, HRcVec128, True/*virtual reg*/);
+ HReg reg = mkHReg(True/*virtual reg*/, HRcVec128, 0/*enc*/, env->vreg_ctr);
env->vreg_ctr++;
return reg;
}
@@ -4951,20 +4951,20 @@
switch (bb->tyenv->types[i]) {
case Ity_I1:
case Ity_I8: case Ity_I16: case Ity_I32: case Ity_I64:
- hreg = mkHReg(j++, HRcInt64, True);
+ hreg = mkHReg(True, HRcInt64, 0, j++);
break;
case Ity_I128:
- hreg = mkHReg(j++, HRcInt64, True);
- hregHI = mkHReg(j++, HRcInt64, True);
+ hreg = mkHReg(True, HRcInt64, 0, j++);
+ hregHI = mkHReg(True, HRcInt64, 0, j++);
break;
case Ity_F32:
case Ity_F64:
case Ity_V128:
- hreg = mkHReg(j++, HRcVec128, True);
+ hreg = mkHReg(True, HRcVec128, 0, j++);
break;
case Ity_V256:
- hreg = mkHReg(j++, HRcVec128, True);
- hregHI = mkHReg(j++, HRcVec128, True);
+ hreg = mkHReg(True, HRcVec128, 0, j++);
+ hregHI = mkHReg(True, HRcVec128, 0, j++);
break;
default:
ppIRType(bb->tyenv->types[i]);
Modified: trunk/priv/host_arm64_defs.c
==============================================================================
--- trunk/priv/host_arm64_defs.c (original)
+++ trunk/priv/host_arm64_defs.c Thu Mar 26 07:18:32 2015
@@ -36,8 +36,6 @@
#include "host_generic_regs.h"
#include "host_arm64_defs.h"
-//ZZ UInt arm_hwcaps = 0;
-
/* --------- Registers. --------- */
@@ -47,129 +45,71 @@
Q regs (128 bit vector)
*/
-void ppHRegARM64 ( HReg reg ) {
- Int r;
- /* Be generic for all virtual regs. */
- if (hregIsVirtual(reg)) {
- ppHReg(reg);
- return;
- }
- /* But specific for real regs. */
- switch (hregClass(reg)) {
- case HRcInt64:
- r = hregNumber(reg);
- vassert(r >= 0 && r < 31);
- vex_printf("x%d", r);
- return;
- case HRcFlt64:
- r = hregNumber(reg);
- vassert(r >= 0 && r < 32);
- vex_printf("d%d", r);
- return;
- case HRcVec128:
- r = hregNumber(reg);
- vassert(r >= 0 && r < 32);
- vex_printf("q%d", r);
- return;
- default:
- vpanic("ppHRegARM64");
- }
-}
-
-static void ppHRegARM64asSreg ( HReg reg ) {
- ppHRegARM64(reg);
- vex_printf("(S-reg)");
-}
-
-HReg hregARM64_X0 ( void ) { return mkHReg(0, HRcInt64, False); }
-HReg hregARM64_X1 ( void ) { return mkHReg(1, HRcInt64, False); }
-HReg hregARM64_X2 ( void ) { return mkHReg(2, HRcInt64, False); }
-HReg hregARM64_X3 ( void ) { return mkHReg(3, HRcInt64, False); }
-HReg hregARM64_X4 ( void ) { return mkHReg(4, HRcInt64, False); }
-HReg hregARM64_X5 ( void ) { return mkHReg(5, HRcInt64, False); }
-HReg hregARM64_X6 ( void ) { return mkHReg(6, HRcInt64, False); }
-HReg hregARM64_X7 ( void ) { return mkHReg(7, HRcInt64, False); }
-HReg hregARM64_X8 ( void ) { return mkHReg(8, HRcInt64, False); }
-HReg hregARM64_X9 ( void ) { return mkHReg(9, HRcInt64, False); }
-HReg hregARM64_X10 ( void ) { return mkHReg(10, HRcInt64, False); }
-HReg hregARM64_X11 ( void ) { return mkHReg(11, HRcInt64, False); }
-HReg hregARM64_X12 ( void ) { return mkHReg(12, HRcInt64, False); }
-HReg hregARM64_X13 ( void ) { return mkHReg(13, HRcInt64, False); }
-HReg hregARM64_X14 ( void ) { return mkHReg(14, HRcInt64, False); }
-HReg hregARM64_X15 ( void ) { return mkHReg(15, HRcInt64, False); }
-HReg hregARM64_X21 ( void ) { return mkHReg(21, HRcInt64, False); }
-HReg hregARM64_X22 ( void ) { return mkHReg(22, HRcInt64, False); }
-HReg hregARM64_X23 ( void ) { return mkHReg(23, HRcInt64, False); }
-HReg hregARM64_X24 ( void ) { return mkHReg(24, HRcInt64, False); }
-HReg hregARM64_X25 ( void ) { return mkHReg(25, HRcInt64, False); }
-HReg hregARM64_X26 ( void ) { return mkHReg(26, HRcInt64, False); }
-HReg hregARM64_X27 ( void ) { return mkHReg(27, HRcInt64, False); }
-HReg hregARM64_X28 ( void ) { return mkHReg(28, HRcInt64, False); }
-
-// Should really use D8 .. D15 for class F64, since they are callee
-// save
-HReg hregARM64_D8 ( void ) { return mkHReg(8, HRcFlt64, False); }
-HReg hregARM64_D9 ( void ) { return mkHReg(9, HRcFlt64, False); }
-HReg hregARM64_D10 ( void ) { return mkHReg(10, HRcFlt64, False); }
-HReg hregARM64_D11 ( void ) { return mkHReg(11, HRcFlt64, False); }
-HReg hregARM64_D12 ( void ) { return mkHReg(12, HRcFlt64, False); }
-HReg hregARM64_D13 ( void ) { return mkHReg(13, HRcFlt64, False); }
-HReg hregARM64_Q16 ( void ) { return mkHReg(16, HRcVec128, False); }
-HReg hregARM64_Q17 ( void ) { return mkHReg(17, HRcVec128, False); }
-HReg hregARM64_Q18 ( void ) { return mkHReg(18, HRcVec128, False); }
-HReg hregARM64_Q19 ( void ) { return mkHReg(19, HRcVec128, False); }
-HReg hregARM64_Q20 ( void ) { return mkHReg(20, HRcVec128, False); }
-
-void getAllocableRegs_ARM64 ( Int* nregs, HReg** arr )
+const RRegUniverse* getRRegUniverse_ARM64 ( void )
{
- Int i = 0;
- *nregs = 26;
- *arr = LibVEX_Alloc_inline(*nregs * sizeof(HReg));
-
- // callee saves ones (22 to 28) are listed first, since we prefer
- // them if they're available
- (*arr)[i++] = hregARM64_X22();
- (*arr)[i++] = hregARM64_X23();
- (*arr)[i++] = hregARM64_X24();
- (*arr)[i++] = hregARM64_X25();
- (*arr)[i++] = hregARM64_X26();
- (*arr)[i++] = hregARM64_X27();
- (*arr)[i++] = hregARM64_X28();
-
- (*arr)[i++] = hregARM64_X0();
- (*arr)[i++] = hregARM64_X1();
- (*arr)[i++] = hregARM64_X2();
- (*arr)[i++] = hregARM64_X3();
- (*arr)[i++] = hregARM64_X4();
- (*arr)[i++] = hregARM64_X5();
- (*arr)[i++] = hregARM64_X6();
- (*arr)[i++] = hregARM64_X7();
+ /* The real-register universe is a big constant, so we just want to
+ initialise it once. */
+ static RRegUniverse rRegUniverse_ARM64;
+ static Bool rRegUniverse_ARM64_initted = False;
+
+ /* Handy shorthand, nothing more */
+ RRegUniverse* ru = &rRegUniverse_ARM64;
+
+ /* This isn't thread-safe. Sigh. */
+ if (LIKELY(rRegUniverse_ARM64_initted))
+ return ru;
+
+ RRegUniverse__init(ru);
+
+ /* Add the registers. The initial segment of this array must be
+ those available for allocation by reg-alloc, and those that
+ follow are not available for allocation. */
+
+ ru->regs[ru->size++] = hregARM64_X22();
+ ru->regs[ru->size++] = hregARM64_X23();
+ ru->regs[ru->size++] = hregARM64_X24();
+ ru->regs[ru->size++] = hregARM64_X25();
+ ru->regs[ru->size++] = hregARM64_X26();
+ ru->regs[ru->size++] = hregARM64_X27();
+ ru->regs[ru->size++] = hregARM64_X28();
+
+ ru->regs[ru->size++] = hregARM64_X0();
+ ru->regs[ru->size++] = hregARM64_X1();
+ ru->regs[ru->size++] = hregARM64_X2();
+ ru->regs[ru->size++] = hregARM64_X3();
+ ru->regs[ru->size++] = hregARM64_X4();
+ ru->regs[ru->size++] = hregARM64_X5();
+ ru->regs[ru->size++] = hregARM64_X6();
+ ru->regs[ru->size++] = hregARM64_X7();
// X8 is used as a ProfInc temporary, not available to regalloc.
// X9 is a chaining/spill temporary, not available to regalloc.
// Do we really need all these?
- //(*arr)[i++] = hregARM64_X10();
- //(*arr)[i++] = hregARM64_X11();
- //(*arr)[i++] = hregARM64_X12();
- //(*arr)[i++] = hregARM64_X13();
- //(*arr)[i++] = hregARM64_X14();
- //(*arr)[i++] = hregARM64_X15();
+ //ru->regs[ru->size++] = hregARM64_X10();
+ //ru->regs[ru->size++] = hregARM64_X11();
+ //ru->regs[ru->size++] = hregARM64_X12();
+ //ru->regs[ru->size++] = hregARM64_X13();
+ //ru->regs[ru->size++] = hregARM64_X14();
+ //ru->regs[ru->size++] = hregARM64_X15();
// X21 is the guest state pointer, not available to regalloc.
// vector regs. Unfortunately not callee-saved.
- (*arr)[i++] = hregARM64_Q16();
- (*arr)[i++] = hregARM64_Q17();
- (*arr)[i++] = hregARM64_Q18();
- (*arr)[i++] = hregARM64_Q19();
- (*arr)[i++] = hregARM64_Q20();
+ ru->regs[ru->size++] = hregARM64_Q16();
+ ru->regs[ru->size++] = hregARM64_Q17();
+ ru->regs[ru->size++] = hregARM64_Q18();
+ ru->regs[ru->size++] = hregARM64_Q19();
+ ru->regs[ru->size++] = hregARM64_Q20();
// F64 regs, all of which are callee-saved
- (*arr)[i++] = hregARM64_D8();
- (*arr)[i++] = hregARM64_D9();
- (*arr)[i++] = hregARM64_D10();
- (*arr)[i++] = hregARM64_D11();
- (*arr)[i++] = hregARM64_D12();
- (*arr)[i++] = hregARM64_D13();
+ ru->regs[ru->size++] = hregARM64_D8();
+ ru->regs[ru->size++] = hregARM64_D9();
+ ru->regs[ru->size++] = hregARM64_D10();
+ ru->regs[ru->size++] = hregARM64_D11();
+ ru->regs[ru->size++] = hregARM64_D12();
+ ru->regs[ru->size++] = hregARM64_D13();
+
+ ru->allocable = ru->size;
+ /* And other regs, not available to the allocator. */
// unavail: x21 as GSP
// x8 is used as a ProfInc temporary
@@ -190,7 +130,50 @@
// If the set of available registers changes or if the e/r status
// changes, be sure to re-check/sync the definition of
// getRegUsage for ARM64Instr_Call too.
- vassert(i == *nregs);
+
+ ru->regs[ru->size++] = hregARM64_X8();
+ ru->regs[ru->size++] = hregARM64_X9();
+ ru->regs[ru->size++] = hregARM64_X21();
+
+ rRegUniverse_ARM64_initted = True;
+
+ RRegUniverse__check_is_sane(ru);
+ return ru;
+}
+
+
+void ppHRegARM64 ( HReg reg ) {
+ Int r;
+ /* Be generic for all virtual regs. */
+ if (hregIsVirtual(reg)) {
+ ppHReg(reg);
+ return;
+ }
+ /* But specific for real regs. */
+ switch (hregClass(reg)) {
+ case HRcInt64:
+ r = hregEncoding(reg);
+ vassert(r >= 0 && r < 31);
+ vex_printf("x%...
[truncated message content] |
|
From: <sv...@va...> - 2015-03-26 07:14:09
|
Author: sewardj
Date: Thu Mar 26 07:14:01 2015
New Revision: 3106
Log:
Minor updates to deal with mips32 and mips64.
Modified:
trunk/useful/test_main.c
Modified: trunk/useful/test_main.c
==============================================================================
--- trunk/useful/test_main.c (original)
+++ trunk/useful/test_main.c Thu Mar 26 07:14:01 2015
@@ -103,7 +103,7 @@
VexTranslateResult tres;
VexControl vcon;
VexGuestExtents vge;
- VexArchInfo vai_x86, vai_amd64, vai_ppc32, vai_arm;
+ VexArchInfo vai_x86, vai_amd64, vai_ppc32, vai_arm, vai_mips32, vai_mips64;
VexAbiInfo vbi;
VexTranslateArgs vta;
@@ -170,11 +170,13 @@
/* FIXME: put sensible values into the .hwcaps fields */
LibVEX_default_VexArchInfo(&vai_x86);
- vai_x86.hwcaps = VEX_HWCAPS_X86_SSE1
+ vai_x86.hwcaps = VEX_HWCAPS_X86_MMXEXT | VEX_HWCAPS_X86_SSE1
| VEX_HWCAPS_X86_SSE2 | VEX_HWCAPS_X86_SSE3;
+ vai_x86.endness = VexEndnessLE;
LibVEX_default_VexArchInfo(&vai_amd64);
vai_amd64.hwcaps = 0;
+ vai_amd64.endness = VexEndnessLE;
LibVEX_default_VexArchInfo(&vai_ppc32);
vai_ppc32.hwcaps = 0;
@@ -183,6 +185,13 @@
LibVEX_default_VexArchInfo(&vai_arm);
vai_arm.hwcaps = VEX_HWCAPS_ARM_VFP3 | VEX_HWCAPS_ARM_NEON | 7;
+ LibVEX_default_VexArchInfo(&vai_mips32);
+ vai_mips32.endness = VexEndnessLE;
+ vai_mips32.hwcaps = VEX_PRID_COMP_MIPS;
+
+ LibVEX_default_VexArchInfo(&vai_mips64);
+ vai_mips64.endness = VexEndnessLE;
+
LibVEX_default_VexAbiInfo(&vbi);
vbi.guest_stack_redzone_size = 128;
@@ -216,7 +225,19 @@
vta.arch_host = VexArchX86;
vta.archinfo_host = vai_x86;
#endif
-#if 1 /* arm -> arm */
+#if 1 /* x86 -> mips32 */
+ vta.arch_guest = VexArchX86;
+ vta.archinfo_guest = vai_x86;
+ vta.arch_host = VexArchMIPS32;
+ vta.archinfo_host = vai_mips32;
+#endif
+#if 0 /* amd64 -> mips64 */
+ vta.arch_guest = VexArchAMD64;
+ vta.archinfo_guest = vai_amd64;
+ vta.arch_host = VexArchMIPS64;
+ vta.archinfo_host = vai_mips64;
+#endif
+#if 0 /* arm -> arm */
vta.arch_guest = VexArchARM;
vta.archinfo_guest = vai_arm;
vta.arch_host = VexArchARM;
|
|
From: <sv...@va...> - 2015-03-26 07:12:35
|
Author: sewardj
Date: Thu Mar 26 07:12:27 2015
New Revision: 3105
Log:
Add source dependencies, and improve the 'clean' target.
Modified:
trunk/useful/Makefile-vex
Modified: trunk/useful/Makefile-vex
==============================================================================
--- trunk/useful/Makefile-vex (original)
+++ trunk/useful/Makefile-vex Thu Mar 26 07:12:27 2015
@@ -1,8 +1,8 @@
# Crude makefile to build the "vex" executable from test_main.c
-vex:
+vex: test_main.c test_main.h ../pub/*.h ../priv/*.c ../priv/*.h
(cd ..; make -f Makefile-gcc)
cc -I../pub -o vex test_main.c ../libvex.a
clean:
- rm -f vex
+ rm -f vex ../priv/*.o
|
|
From: Florian K. <fl...@ei...> - 2015-03-24 15:07:52
|
On 24.03.2015 15:35, Philippe Waroquiers wrote: > Did the warning appear specifically with this revision ? Yes. Backing out r15036 makes the warning disappear. > I tried on a recent platform (gcc 4.9.2, Fedora 21, s390) > after having added -Warray-bounds but no warning obtained. > > This looks however a false positive to me: > n_fixed is the nr of elements initialised in the array. > So, 0 .. n_fixed-1 can be used > And the condition to stop the loop is i+1 < n_fixed. > So, it looks to me that fixed[i+1] will be ok. > Yes. correct. Looks like a GCC bug. My default gcc is gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 which produces the warning. I built 4.9.2 and with that version the warning disappears. Florian |
|
From: Philippe W. <phi...@sk...> - 2015-03-24 14:34:44
|
On Tue, 2015-03-24 at 14:25 +0100, Florian Krohm wrote: > On 23.03.2015 22:49, sv...@va... wrote: > > Author: philippe > > Date: Mon Mar 23 21:49:32 2015 > > New Revision: 15036 > > > > I'm seeing: > > m_transtab.c: In function 'unchain_in_preparation_for_deletion': > m_transtab.c:619:36: warning: array subscript is above array bounds > [-Warray-bounds] > oea->fixed[i] = oea->fixed[i+1]; > ^ Strange. I do not think that loop/logic was changed/impacted by 15036. Did the warning appear specifically with this revision ? What is the gcc version/platform ? I tried on a recent platform (gcc 4.9.2, Fedora 21, s390) after having added -Warray-bounds but no warning obtained. This looks however a false positive to me: n_fixed is the nr of elements initialised in the array. So, 0 .. n_fixed-1 can be used And the condition to stop the loop is i+1 < n_fixed. So, it looks to me that fixed[i+1] will be ok. It is also unclear how gcc can guess the relationship between n_fixed and the array bounds, unless it has understood the logic in OutEdgeArr__add. Philippe |
|
From: <sv...@va...> - 2015-03-24 14:02:52
|
Author: philippe
Date: Tue Mar 24 14:02:44 2015
New Revision: 15037
Log:
* Add in helgrind stats the nr of live/exit/joined/exit and joined threads
* avoid division by 0 in m_transtab.c stats before anything was done
Modified:
trunk/coregrind/m_transtab.c
trunk/helgrind/libhb_core.c
Modified: trunk/coregrind/m_transtab.c
==============================================================================
--- trunk/coregrind/m_transtab.c (original)
+++ trunk/coregrind/m_transtab.c Tue Mar 24 14:02:44 2015
@@ -2410,7 +2410,7 @@
n_in_count, n_in_osize, n_in_tsize,
safe_idiv(10*n_in_tsize, n_in_osize),
n_in_sc_count,
- (int) (n_in_tsize / n_in_count));
+ (int) (n_in_tsize / (n_in_count ? n_in_count : 1)));
VG_(message)(Vg_DebugMsg,
" transtab: dumped %'llu (%'llu -> ?" "?) "
"(sectors recycled %'llu)\n",
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Tue Mar 24 14:02:44 2015
@@ -6232,6 +6232,34 @@
VG_(sizeFM)( vts_set ) );
VG_(printf)("%s","\n");
+ {
+ UInt live = 0;
+ UInt llexit_done = 0;
+ UInt joinedwith_done = 0;
+ UInt llexit_and_joinedwith_done = 0;
+
+ Thread* hgthread = get_admin_threads();
+ tl_assert(hgthread);
+ while (hgthread) {
+ Thr* hbthr = hgthread->hbthr;
+ tl_assert(hbthr);
+ if (hbthr->llexit_done && hbthr->joinedwith_done)
+ llexit_and_joinedwith_done++;
+ else if (hbthr->llexit_done)
+ llexit_done++;
+ else if (hbthr->joinedwith_done)
+ joinedwith_done++;
+ else
+ live++;
+ hgthread = hgthread->admin;
+ }
+ VG_(printf)(" libhb: threads live: %d exit_and_joinedwith %d"
+ " exit %d joinedwith %d\n",
+ live, llexit_and_joinedwith_done,
+ llexit_done, joinedwith_done);
+ }
+
+ VG_(printf)("%s","\n");
VG_(printf)( " libhb: ctxt__rcdec: 1=%lu(%lu eq), 2=%lu, 3=%lu\n",
stats__ctxt_rcdec1, stats__ctxt_rcdec1_eq,
stats__ctxt_rcdec2,
|
|
From: Florian K. <fl...@ei...> - 2015-03-24 13:25:55
|
On 23.03.2015 22:49, sv...@va... wrote:
> Author: philippe
> Date: Mon Mar 23 21:49:32 2015
> New Revision: 15036
>
I'm seeing:
m_transtab.c: In function 'unchain_in_preparation_for_deletion':
m_transtab.c:619:36: warning: array subscript is above array bounds
[-Warray-bounds]
oea->fixed[i] = oea->fixed[i+1];
^
Florian
|
|
From: Carl E. L. <ce...@us...> - 2015-03-23 22:19:37
|
Julian:
Thanks for the pointers on how to get to the VEX hw caps variable for the sanity check.
I have implemented the change and the check. Since I am touching code outside of PPC, I
would appreciate a quick review before I commit it. Let me know if you see anything that
needs fixing. Thanks.
Carl Love
------------------------------------------------
Index: coregrind/m_initimg/initimg-linux.c
===================================================================
--- coregrind/m_initimg/initimg-linux.c (revision 15017)
+++ coregrind/m_initimg/initimg-linux.c (working copy)
@@ -246,6 +246,10 @@
/*=== Setting up the client's stack ===*/
/*====================================================================*/
+#ifndef AT_DCACHEBSIZE
+#define AT_DCACHEBSIZE 19
+#endif /* AT_DCACHEBSIZE */
+
#ifndef AT_ICACHEBSIZE
#define AT_ICACHEBSIZE 20
#endif /* AT_ICACHEBSIZE */
@@ -262,6 +266,10 @@
#define AT_RANDOM 25
#endif /* AT_RANDOM */
+#ifndef AT_HWCAP2
+#define AT_HWCAP2 26
+#endif /* AT_HWCAP2 */
+
#ifndef AT_EXECFN
#define AT_EXECFN 31
#endif /* AT_EXECFN */
@@ -377,8 +385,14 @@
const ExeInfo* info,
UInt** client_auxv,
Addr clstack_end,
- SizeT clstack_max_size )
+ SizeT clstack_max_size,
+ VexArchInfo vex_archinfo )
{
+ /* The HW configuration setting (hwcaps) of the target can be
+ * checked against the Vex settings of the host platform as given
+ * by the values in vex_archinfo.
+ */
+
SysRes res;
HChar **cpp;
HChar *strtab; /* string table */
@@ -690,8 +704,44 @@
}
# endif
break;
+# if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
+ case AT_HWCAP2:
+ /* The HWCAP2 value has the entry arch_2_07 which indicates the
+ * processor is a Power 8 or beyond. The Valgrind vai.hwcaps
+ * value (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
+ * flag set so Valgrind knows about Power8. Need to pass the
+ * HWCAP2 value along so the user level programs can detect that
+ * the processor supports ISA 2.07 and beyond.
+ */
+ /* Power Architecture 64-Bit ELF V2 ABI Specification
+ July 21, 2014, version 1.0, Page 124
+ www-03.ibm.com/technologyconnect/tgcm/TGCMServlet.wss?alias=OpenPOWER&linkid=1n0000
+ AT_HWCAP2
+ The a_val member of this entry is a bit map of hardware
+ capabilities. Some bit mask values include:
+
+ PPC_FEATURE2_ARCH_2_07 0x80000000
+ PPC_FEATURE2_HAS_HTM 0x40000000
+ PPC_FEATURE2_HAS_DSCR 0x20000000
+ PPC_FEATURE2_HAS_EBB 0x10000000
+ PPC_FEATURE2_HAS_ISEL 0x08000000
+ PPC_FEATURE2_HAS_TAR 0x04000000
+ PPC_FEATURE2_HAS_VCRYPTO 0x02000000
+ */
+
+ if ((auxv->u.a_val & ~(0x80000000ULL)) != 0) {
+ /* Verify if PPC_FEATURE2_ARCH_2_07 is set in HWCAP2
+ * that arch_2_07 is also set in VEX HWCAPS
+ */
+ vg_assert((vex_archinfo.hwcaps & VEX_HWCAPS_PPC64_ISA2_07) == VEX_HWCAPS_PPC64_ISA2_07);
+ }
+
+ break;
+# endif
+
case AT_ICACHEBSIZE:
+ case AT_DCACHEBSIZE:
case AT_UCACHEBSIZE:
# if defined(VGP_ppc32_linux)
/* acquire cache info */
@@ -852,7 +902,8 @@
/*====================================================================*/
/* Create the client's initial memory image. */
-IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo iicii )
+IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo iicii,
+ VexArchInfo vex_archinfo )
{
ExeInfo info;
HChar** env = NULL;
@@ -913,7 +964,8 @@
iifii.initial_client_SP
= setup_client_stack( init_sp, env,
&info, &iifii.client_auxv,
- iicii.clstack_end, iifii.clstack_max_size );
+ iicii.clstack_end, iifii.clstack_max_size,
+ vex_archinfo );
VG_(free)(env);
Index: coregrind/pub_core_initimg.h
===================================================================
--- coregrind/pub_core_initimg.h (revision 15017)
+++ coregrind/pub_core_initimg.h (working copy)
@@ -33,6 +33,7 @@
#define __PUB_CORE_INITIMG_H
#include "pub_core_basics.h" // Addr
+#include "libvex.h"
//--------------------------------------------------------------------
// PURPOSE: Map the client executable into memory, then set up its
@@ -50,7 +51,8 @@
structure, which is gathered in an OS-specific way at startup.
This returns an IIFinaliseImageInfo structure: */
extern
-IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo );
+IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo,
+ VexArchInfo vex_archinfo );
/* Just before starting the client, we may need to make final
adjustments to its initial image. Also we need to set up the VEX
Index: coregrind/m_main.c
===================================================================
--- coregrind/m_main.c (revision 15017)
+++ coregrind/m_main.c (working copy)
@@ -1815,9 +1815,12 @@
//--------------------------------------------------------------
// Figure out what sort of CPU we're on, and whether it is
// able to run V.
+ /* The vex_archinfo structure is passed down later to the client
+ * to verify the HW info settings are consistent.
+ */
+ VexArchInfo vex_archinfo;
VG_(debugLog)(1, "main", "Get hardware capabilities ...\n");
{ VexArch vex_arch;
- VexArchInfo vex_archinfo;
Bool ok = VG_(machine_get_hwcaps)();
if (!ok) {
VG_(printf)("\n");
@@ -1945,7 +1948,7 @@
# endif
/* NOTE: this call reads VG_(clo_main_stacksize). */
- the_iifii = VG_(ii_create_image)( the_iicii );
+ the_iifii = VG_(ii_create_image)( the_iicii, vex_archinfo );
}
//==============================================================
|
|
From: <sv...@va...> - 2015-03-23 21:49:41
|
Author: philippe
Date: Mon Mar 23 21:49:32 2015
New Revision: 15036
Log:
This patch further reduces the memory used by TT/TC (by about 15Mb
on 32 bits memcheck default nr of sectors).
Memory is reduced by using UShort typedef-s for Sector no and TTE no.
Note that for TTE no, we had a mixture of UShort, UInt and Int used
depending on the place (a TTE no was in any case constrained to be an UShort).
The bss memory/startup space is also reduced by allocating the htt on demand
(like tt and tc), using mmap the first time a sector is initialised.
Changes:
* pub_core_transtab.h :
* 2 typedef to identify a sector and a tt entry (these 2 types are UShort)
* add 2 #define 'invalid values' for these types
* change the interface to use these types rather than UInt
* m_transtab.c
* use wherever relevant these 2 new types rather than UInt or UShort
* replace the use of -1 by INV_SNO or INV_TTE
* remove now useless typecast from Int/UInt to UShort for tte
* schedule.c: use the new types
Modified:
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_transtab.c
trunk/coregrind/pub_core_transtab.h
Modified: trunk/coregrind/m_scheduler/scheduler.c
==============================================================================
--- trunk/coregrind/m_scheduler/scheduler.c (original)
+++ trunk/coregrind/m_scheduler/scheduler.c Mon Mar 23 21:49:32 2015
@@ -1048,8 +1048,8 @@
{
Bool found = False;
Addr ip = VG_(get_IP)(tid);
- UInt to_sNo = (UInt)-1;
- UInt to_tteNo = (UInt)-1;
+ SECno to_sNo = INV_SNO;
+ TTEno to_tteNo = INV_TTE;
found = VG_(search_transtab)( NULL, &to_sNo, &to_tteNo,
ip, False/*dont_upd_fast_cache*/ );
@@ -1070,8 +1070,8 @@
}
}
vg_assert(found);
- vg_assert(to_sNo != -1);
- vg_assert(to_tteNo != -1);
+ vg_assert(to_sNo != INV_SNO);
+ vg_assert(to_tteNo != INV_TTE);
/* So, finally we know where to patch through to. Do the patching
and update the various admin tables that allow it to be undone
Modified: trunk/coregrind/m_transtab.c
==============================================================================
--- trunk/coregrind/m_transtab.c (original)
+++ trunk/coregrind/m_transtab.c Mon Mar 23 21:49:32 2015
@@ -57,7 +57,7 @@
UInt VG_(clo_num_transtab_sectors) = N_SECTORS_DEFAULT;
/* Nr of sectors.
Will be set by VG_(init_tt_tc) to VG_(clo_num_transtab_sectors). */
-static UInt n_sectors = 0;
+static SECno n_sectors = 0;
/* Average size of a transtab code entry. 0 means to use the tool
provided default. */
@@ -77,6 +77,9 @@
#define HTT_DELETED EC2TTE_DELETED
#define HTT_EMPTY 0XFFFE
+// HTTno is the Sector->htt hash table index. Must be the same type as TTEno.
+typedef UShort HTTno;
+
/* Because each sector contains a hash table of TTEntries, we need to
specify the maximum allowable loading, after which the sector is
deemed full. */
@@ -102,10 +105,10 @@
/* In edges ("to-me") in the graph created by chaining. */
typedef
struct {
- UInt from_sNo; /* sector number */
- UInt from_tteNo; /* TTE number in given sector */
- UInt from_offs; /* code offset from TCEntry::tcptr where the patch is */
- Bool to_fastEP; /* Is the patch to a fast or slow entry point? */
+ SECno from_sNo; /* sector number */
+ TTEno from_tteNo; /* TTE number in given sector */
+ UInt from_offs; /* code offset from TCEntry::tcptr where the patch is */
+ Bool to_fastEP; /* Is the patch to a fast or slow entry point? */
}
InEdge;
@@ -113,9 +116,9 @@
/* Out edges ("from-me") in the graph created by chaining. */
typedef
struct {
- UInt to_sNo; /* sector number */
- UInt to_tteNo; /* TTE number in given sector */
- UInt from_offs; /* code offset in owning translation where patch is */
+ SECno to_sNo; /* sector number */
+ TTEno to_tteNo; /* TTE number in given sector */
+ UInt from_offs; /* code offset in owning translation where patch is */
}
OutEdge;
@@ -155,7 +158,7 @@
ULong count;
UShort weight;
} prof; // if status == InUse
- UInt next_empty_tte; // if status != InUse
+ TTEno next_empty_tte; // if status != InUse
} usage;
/* Status of the slot. Note, we need to be able to do lazy
@@ -303,7 +306,7 @@
struct {
UChar* start;
UInt len;
- UInt tteNo;
+ TTEno tteNo;
}
HostExtent;
@@ -323,10 +326,10 @@
its load limit (SECTOR_TT_LIMIT_PERCENT). */
ULong* tc;
- /* An hash table, mapping guest address to an entry in the tt array.
+ /* An hash table, mapping guest address to an index in the tt array.
htt is a fixed size, always containing
exactly N_HTTES_PER_SECTOR entries. */
- UInt htt[N_HTTES_PER_SECTOR];
+ TTEno* htt;
/* The TTEntry array. This is a fixed size, always containing
exactly N_TTES_PER_SECTOR entries. */
@@ -339,7 +342,7 @@
Int tt_n_inuse;
/* A list of Empty/Deleted entries, chained by tte->next_empty_tte */
- UInt empty_tt_list;
+ TTEno empty_tt_list;
/* Expandable arrays of tt indices for each of the ECLASS_N
address range equivalence classes. These hold indices into
@@ -347,7 +350,7 @@
back here. */
Int ec2tte_size[ECLASS_N];
Int ec2tte_used[ECLASS_N];
- UShort* ec2tte[ECLASS_N];
+ TTEno* ec2tte[ECLASS_N];
/* The host extents. The [start, +len) ranges are constructed
in strictly non-overlapping order, so we can binary search
@@ -368,11 +371,11 @@
endlessly.
When running, youngest sector should be between >= 0 and <
- N_TC_SECTORS. The initial -1 value indicates the TT/TC system is
+ N_TC_SECTORS. The initial value indicates the TT/TC system is
not yet initialised.
*/
static Sector sectors[MAX_N_SECTORS];
-static Int youngest_sector = -1;
+static Int youngest_sector = INV_SNO;
/* The number of ULongs in each TCEntry area. This is computed once
at startup and does not change. */
@@ -382,8 +385,8 @@
/* A list of sector numbers, in the order which they should be
searched to find translations. This is an optimisation to be used
when searching for translations and should not affect
- correctness. -1 denotes "no entry". */
-static Int sector_search_order[MAX_N_SECTORS];
+ correctness. INV_SNO denotes "no entry". */
+static SECno sector_search_order[MAX_N_SECTORS];
/* Fast helper for the TC. A direct-mapped cache which holds a set of
@@ -461,7 +464,7 @@
/*--- Chaining support ---*/
/*-------------------------------------------------------------*/
-static inline TTEntry* index_tte ( UInt sNo, UInt tteNo )
+static inline TTEntry* index_tte ( SECno sNo, TTEno tteNo )
{
vg_assert(sNo < n_sectors);
vg_assert(tteNo < N_TTES_PER_SECTOR);
@@ -474,7 +477,7 @@
static void InEdge__init ( InEdge* ie )
{
- ie->from_sNo = -1; /* invalid */
+ ie->from_sNo = INV_SNO; /* invalid */
ie->from_tteNo = 0;
ie->from_offs = 0;
ie->to_fastEP = False;
@@ -482,7 +485,7 @@
static void OutEdge__init ( OutEdge* oe )
{
- oe->to_sNo = -1; /* invalid */
+ oe->to_sNo = INV_SNO; /* invalid */
oe->to_tteNo = 0;
oe->from_offs = 0;
}
@@ -661,7 +664,7 @@
static
Bool HostExtent__is_dead (const HostExtent* hx, const Sector* sec)
{
- const UInt tteNo = hx->tteNo;
+ const TTEno tteNo = hx->tteNo;
#define LDEBUG(m) if (DEBUG_TRANSTAB) \
VG_(printf) (m \
" start 0x%p len %u sector %d ttslot %u" \
@@ -691,16 +694,16 @@
}
static __attribute__((noinline))
-Bool find_TTEntry_from_hcode( /*OUT*/UInt* from_sNo,
- /*OUT*/UInt* from_tteNo,
+Bool find_TTEntry_from_hcode( /*OUT*/SECno* from_sNo,
+ /*OUT*/TTEno* from_tteNo,
void* hcode )
{
- Int i;
+ SECno i;
/* Search order logic copied from VG_(search_transtab). */
for (i = 0; i < n_sectors; i++) {
- Int sno = sector_search_order[i];
- if (UNLIKELY(sno == -1))
+ SECno sno = sector_search_order[i];
+ if (UNLIKELY(sno == INV_SNO))
return False; /* run out of sectors to search */
const Sector* sec = §ors[sno];
@@ -718,7 +721,7 @@
vg_assert(firstW == lastW); // always true, even if not found
if (found) {
HostExtent* hx = VG_(indexXA)(host_extents, firstW);
- UInt tteNo = hx->tteNo;
+ TTEno tteNo = hx->tteNo;
/* Do some additional sanity checks. */
vg_assert(tteNo < N_TTES_PER_SECTOR);
@@ -734,7 +737,7 @@
vg_assert((UChar*)sec->tt[tteNo].tcptr <= (UChar*)hcode);
/* Looks plausible */
*from_sNo = sno;
- *from_tteNo = (UInt)tteNo;
+ *from_tteNo = tteNo;
return True;
}
}
@@ -747,10 +750,10 @@
checking. */
static Bool is_in_the_main_TC ( const void* hcode )
{
- Int i, sno;
+ SECno i, sno;
for (i = 0; i < n_sectors; i++) {
sno = sector_search_order[i];
- if (sno == -1)
+ if (sno == INV_SNO)
break; /* run out of sectors to search */
if ((const UChar*)hcode >= (const UChar*)sectors[sno].tc
&& (const UChar*)hcode <= (const UChar*)sectors[sno].tc_next
@@ -765,8 +768,8 @@
can undo it later, if required.
*/
void VG_(tt_tc_do_chaining) ( void* from__patch_addr,
- UInt to_sNo,
- UInt to_tteNo,
+ SECno to_sNo,
+ TTEno to_tteNo,
Bool to_fastEP )
{
/* Get the CPU info established at startup. */
@@ -793,8 +796,8 @@
/* Find the TTEntry for the from__ code. This isn't simple since
we only know the patch address, which is going to be somewhere
inside the from_ block. */
- UInt from_sNo = (UInt)-1;
- UInt from_tteNo = (UInt)-1;
+ SECno from_sNo = INV_SNO;
+ TTEno from_tteNo = INV_TTE;
Bool from_found
= find_TTEntry_from_hcode( &from_sNo, &from_tteNo,
from__patch_addr );
@@ -896,7 +899,7 @@
static
void unchain_in_preparation_for_deletion ( VexArch arch_host,
VexEndness endness_host,
- UInt here_sNo, UInt here_tteNo )
+ SECno here_sNo, TTEno here_tteNo )
{
if (DEBUG_TRANSTAB)
VG_(printf)("QQQ unchain_in_prep %u.%u...\n", here_sNo, here_tteNo);
@@ -1044,10 +1047,10 @@
this sector. Returns used location in eclass array. */
static
-UInt addEClassNo ( /*MOD*/Sector* sec, Int ec, UShort tteno )
+UInt addEClassNo ( /*MOD*/Sector* sec, Int ec, TTEno tteno )
{
Int old_sz, new_sz, i, r;
- UShort *old_ar, *new_ar;
+ TTEno *old_ar, *new_ar;
vg_assert(ec >= 0 && ec < ECLASS_N);
vg_assert(tteno < N_TTES_PER_SECTOR);
@@ -1062,7 +1065,7 @@
old_ar = sec->ec2tte[ec];
new_sz = old_sz==0 ? 8 : old_sz<64 ? 2*old_sz : (3*old_sz)/2;
new_ar = ttaux_malloc("transtab.aECN.1",
- new_sz * sizeof(UShort));
+ new_sz * sizeof(TTEno));
for (i = 0; i < old_sz; i++)
new_ar[i] = old_ar[i];
if (old_ar)
@@ -1085,7 +1088,7 @@
eclass entries to 'sec'. */
static
-void upd_eclasses_after_add ( /*MOD*/Sector* sec, Int tteno )
+void upd_eclasses_after_add ( /*MOD*/Sector* sec, TTEno tteno )
{
Int i, r, eclasses[3];
TTEntry* tte;
@@ -1099,7 +1102,7 @@
for (i = 0; i < r; i++) {
tte->tte2ec_ec[i] = eclasses[i];
- tte->tte2ec_ix[i] = addEClassNo( sec, eclasses[i], (UShort)tteno );
+ tte->tte2ec_ix[i] = addEClassNo( sec, eclasses[i], tteno );
}
}
@@ -1114,7 +1117,7 @@
const HChar* whassup = NULL;
Int i, j, k, n, ec_num, ec_idx;
TTEntry* tte;
- UShort tteno;
+ TTEno tteno;
ULong* tce;
/* Basic checks on this sector */
@@ -1181,9 +1184,9 @@
scan through them and check the TTEntryies they point at point
back. */
- for (i = 0; i < N_TTES_PER_SECTOR; i++) {
+ for (tteno = 0; tteno < N_TTES_PER_SECTOR; tteno++) {
- tte = &sec->tt[i];
+ tte = &sec->tt[tteno];
if (tte->status == Empty || tte->status == Deleted) {
if (tte->n_tte2ec != 0)
BAD("tte->n_eclasses nonzero for unused tte");
@@ -1202,7 +1205,7 @@
ec_idx = tte->tte2ec_ix[j];
if (ec_idx < 0 || ec_idx >= sec->ec2tte_used[ec_num])
BAD("tte->ec_idx[..] out of range(2)");
- if (sec->ec2tte[ec_num][ec_idx] != i)
+ if (sec->ec2tte[ec_num][ec_idx] != tteno)
BAD("ec2tte does not point back to tte");
}
}
@@ -1240,25 +1243,26 @@
static Bool sanity_check_sector_search_order ( void )
{
- Int i, j, nListed;
+ SECno i, j, nListed;
/* assert the array is the right size */
vg_assert(MAX_N_SECTORS == (sizeof(sector_search_order)
/ sizeof(sector_search_order[0])));
- /* Check it's of the form valid_sector_numbers ++ [-1, -1, ..] */
+ /* Check it's of the form valid_sector_numbers ++ [INV_SNO, INV_SNO, ..] */
for (i = 0; i < n_sectors; i++) {
- if (sector_search_order[i] < 0 || sector_search_order[i] >= n_sectors)
+ if (sector_search_order[i] == INV_SNO
+ || sector_search_order[i] >= n_sectors)
break;
}
nListed = i;
for (/* */; i < n_sectors; i++) {
- if (sector_search_order[i] != -1)
+ if (sector_search_order[i] != INV_SNO)
break;
}
if (i != n_sectors)
return False;
/* Check each sector number only appears once */
for (i = 0; i < n_sectors; i++) {
- if (sector_search_order[i] == -1)
+ if (sector_search_order[i] == INV_SNO)
continue;
for (j = i+1; j < n_sectors; j++) {
if (sector_search_order[j] == sector_search_order[i])
@@ -1278,7 +1282,7 @@
static Bool sanity_check_all_sectors ( void )
{
- Int sno;
+ SECno sno;
Bool sane;
Sector* sec;
for (sno = 0; sno < n_sectors; sno++) {
@@ -1299,7 +1303,8 @@
}
if (nr_not_dead_hx != sec->tt_n_inuse) {
VG_(debugLog)(0, "transtab",
- "nr_not_dead_hx %d sanity fail (expected == in use %d)\n",
+ "nr_not_dead_hx %d sanity fail "
+ "(expected == in use %d)\n",
nr_not_dead_hx, sec->tt_n_inuse);
return False;
}
@@ -1326,14 +1331,14 @@
return n;
}
-static Bool isValidSector ( Int sector )
+static Bool isValidSector ( SECno sector )
{
- if (sector < 0 || sector >= n_sectors)
+ if (sector == INV_SNO || sector >= n_sectors)
return False;
return True;
}
-static inline UInt HASH_TT ( Addr key )
+static inline HTTno HASH_TT ( Addr key )
{
UInt kHi = sizeof(Addr) == 4 ? 0 : (key >> 32);
UInt kLo = (UInt)key;
@@ -1341,7 +1346,7 @@
UInt ror = 7;
if (ror > 0)
k32 = (k32 >> ror) | (k32 << (32-ror));
- return k32 % N_HTTES_PER_SECTOR;
+ return (HTTno)(k32 % N_HTTES_PER_SECTOR);
}
static void setFastCacheEntry ( Addr key, ULong* tcptr )
@@ -1375,9 +1380,9 @@
}
-static UInt get_empty_tt_slot(UInt sNo)
+static TTEno get_empty_tt_slot(SECno sNo)
{
- UInt i;
+ TTEno i;
i = sectors[sNo].empty_tt_list;
sectors[sNo].empty_tt_list = sectors[sNo].tt[i].usage.next_empty_tte;
@@ -1387,15 +1392,15 @@
return i;
}
-static void add_in_empty_tt_list (UInt sNo, UInt tteno)
+static void add_in_empty_tt_list (SECno sNo, TTEno tteno)
{
sectors[sNo].tt[tteno].usage.next_empty_tte = sectors[sNo].empty_tt_list;
sectors[sNo].empty_tt_list = tteno;
}
-static void initialiseSector ( Int sno )
+static void initialiseSector ( SECno sno )
{
- Int i;
+ UInt i;
SysRes sres;
Sector* sec;
vg_assert(isValidSector(sno));
@@ -1439,13 +1444,22 @@
}
sec->tt = (TTEntry*)(Addr)sr_Res(sres);
sec->empty_tt_list = HTT_EMPTY;
- for (i = 0; i < N_TTES_PER_SECTOR; i++) {
- sec->tt[i].status = Empty;
- sec->tt[i].n_tte2ec = 0;
- add_in_empty_tt_list(sno, i);
+ for (TTEno ei = 0; ei < N_TTES_PER_SECTOR; ei++) {
+ sec->tt[ei].status = Empty;
+ sec->tt[ei].n_tte2ec = 0;
+ add_in_empty_tt_list(sno, ei);
}
- for (i = 0; i < N_HTTES_PER_SECTOR; i++)
- sec->htt[i] = HTT_EMPTY;
+
+ sres = VG_(am_mmap_anon_float_valgrind)
+ ( N_HTTES_PER_SECTOR * sizeof(TTEno) );
+ if (sr_isError(sres)) {
+ VG_(out_of_memory_NORETURN)("initialiseSector(HTT)",
+ N_HTTES_PER_SECTOR * sizeof(TTEno) );
+ /*NOTREACHED*/
+ }
+ sec->htt = (TTEno*)(Addr)sr_Res(sres);
+ for (HTTno hi = 0; hi < N_HTTES_PER_SECTOR; hi++)
+ sec->htt[hi] = HTT_EMPTY;
/* Set up the host_extents array. */
sec->host_extents
@@ -1455,7 +1469,7 @@
/* Add an entry in the sector_search_order */
for (i = 0; i < n_sectors; i++) {
- if (sector_search_order[i] == -1)
+ if (sector_search_order[i] == INV_SNO)
break;
}
vg_assert(i >= 0 && i < n_sectors);
@@ -1485,28 +1499,28 @@
if (DEBUG_TRANSTAB) VG_(printf)("QQQ unlink-entire-sector: %d START\n",
sno);
sec->empty_tt_list = HTT_EMPTY;
- for (i = 0; i < N_TTES_PER_SECTOR; i++) {
- if (sec->tt[i].status == InUse) {
- vg_assert(sec->tt[i].n_tte2ec >= 1);
- vg_assert(sec->tt[i].n_tte2ec <= 3);
- n_dump_osize += vge_osize(&sec->tt[i].vge);
+ for (TTEno ei = 0; ei < N_TTES_PER_SECTOR; ei++) {
+ if (sec->tt[ei].status == InUse) {
+ vg_assert(sec->tt[ei].n_tte2ec >= 1);
+ vg_assert(sec->tt[ei].n_tte2ec <= 3);
+ n_dump_osize += vge_osize(&sec->tt[ei].vge);
/* Tell the tool too. */
if (VG_(needs).superblock_discards) {
VG_TDICT_CALL( tool_discard_superblock_info,
- sec->tt[i].entry,
- sec->tt[i].vge );
+ sec->tt[ei].entry,
+ sec->tt[ei].vge );
}
unchain_in_preparation_for_deletion(arch_host,
- endness_host, sno, i);
+ endness_host, sno, ei);
} else {
- vg_assert(sec->tt[i].n_tte2ec == 0);
+ vg_assert(sec->tt[ei].n_tte2ec == 0);
}
- sec->tt[i].status = Empty;
- sec->tt[i].n_tte2ec = 0;
- add_in_empty_tt_list(sno, i);
+ sec->tt[ei].status = Empty;
+ sec->tt[ei].n_tte2ec = 0;
+ add_in_empty_tt_list(sno, ei);
}
- for (i = 0; i < N_HTTES_PER_SECTOR; i++)
- sec->htt[i] = HTT_EMPTY;
+ for (HTTno hi = 0; hi < N_HTTES_PER_SECTOR; hi++)
+ sec->htt[hi] = HTT_EMPTY;
if (DEBUG_TRANSTAB) VG_(printf)("QQQ unlink-entire-sector: %d END\n",
sno);
@@ -1532,11 +1546,12 @@
/* Sanity check: ensure it is already in
sector_search_order[]. */
- for (i = 0; i < n_sectors; i++) {
- if (sector_search_order[i] == sno)
+ SECno ix;
+ for (ix = 0; ix < n_sectors; ix++) {
+ if (sector_search_order[ix] == sno)
break;
}
- vg_assert(i >= 0 && i < n_sectors);
+ vg_assert(ix >= 0 && ix < n_sectors);
if (VG_(clo_verbosity) > 2)
VG_(message)(Vg_DebugMsg, "TT/TC: recycle sector %d\n", sno);
@@ -1566,7 +1581,7 @@
Int offs_profInc,
UInt n_guest_instrs )
{
- Int tcAvailQ, reqdQ, y, i;
+ Int tcAvailQ, reqdQ, y;
ULong *tcptr, *tcptr2;
UChar* srcP;
UChar* dstP;
@@ -1657,18 +1672,18 @@
/* Find an empty tt slot, and use it. There must be such a slot
since tt is never allowed to get completely full. */
- i = get_empty_tt_slot(y);
- TTEntry__init(§ors[y].tt[i]);
- sectors[y].tt[i].status = InUse;
- sectors[y].tt[i].tcptr = tcptr;
- sectors[y].tt[i].usage.prof.count = 0;
- sectors[y].tt[i].usage.prof.weight =
+ TTEno tteix = get_empty_tt_slot(y);
+ TTEntry__init(§ors[y].tt[tteix]);
+ sectors[y].tt[tteix].status = InUse;
+ sectors[y].tt[tteix].tcptr = tcptr;
+ sectors[y].tt[tteix].usage.prof.count = 0;
+ sectors[y].tt[tteix].usage.prof.weight =
n_guest_instrs == 0 ? 1 : n_guest_instrs;
- sectors[y].tt[i].vge = *vge;
- sectors[y].tt[i].entry = entry;
+ sectors[y].tt[tteix].vge = *vge;
+ sectors[y].tt[tteix].entry = entry;
// Point an htt entry to the tt slot
- UInt htti = HASH_TT(entry);
+ HTTno htti = HASH_TT(entry);
vg_assert(htti >= 0 && htti < N_HTTES_PER_SECTOR);
while (True) {
if (sectors[y].htt[htti] == HTT_EMPTY
@@ -1678,7 +1693,7 @@
if (htti >= N_HTTES_PER_SECTOR)
htti = 0;
}
- sectors[y].htt[htti] = i;
+ sectors[y].htt[htti] = tteix;
/* Patch in the profile counter location, if necessary. */
if (offs_profInc != -1) {
@@ -1691,7 +1706,7 @@
VexInvalRange vir
= LibVEX_PatchProfInc( arch_host, endness_host,
dstP + offs_profInc,
- §ors[y].tt[i].usage.prof.count );
+ §ors[y].tt[tteix].usage.prof.count );
VG_(invalidate_icache)( (void*)vir.start, vir.len );
}
@@ -1702,7 +1717,7 @@
{ HostExtent hx;
hx.start = (UChar*)tcptr;
hx.len = code_len;
- hx.tteNo = i;
+ hx.tteNo = tteix;
vg_assert(hx.len > 0); /* bsearch fails w/ zero length entries */
XArray* hx_array = sectors[y].host_extents;
vg_assert(hx_array);
@@ -1714,35 +1729,35 @@
VG_(addToXA)(hx_array, &hx);
if (DEBUG_TRANSTAB)
VG_(printf)("... hx.start 0x%p hx.len %u sector %d ttslot %d\n",
- hx.start, hx.len, y, i);
+ hx.start, hx.len, y, tteix);
}
/* Update the fast-cache. */
setFastCacheEntry( entry, tcptr );
/* Note the eclass numbers for this translation. */
- upd_eclasses_after_add( §ors[y], i );
+ upd_eclasses_after_add( §ors[y], tteix );
}
/* Search for the translation of the given guest address. If
requested, a successful search can also cause the fast-caches to be
- updated.
+ updated.
*/
Bool VG_(search_transtab) ( /*OUT*/Addr* res_hcode,
- /*OUT*/UInt* res_sNo,
- /*OUT*/UInt* res_tteNo,
+ /*OUT*/SECno* res_sNo,
+ /*OUT*/TTEno* res_tteNo,
Addr guest_addr,
Bool upd_cache )
{
- Int i, j, k, kstart, sno;
- UInt tti;
+ SECno i, sno;
+ HTTno j, k, kstart;
+ TTEno tti;
vg_assert(init_done);
/* Find the initial probe point just once. It will be the same in
all sectors and avoids multiple expensive % operations. */
n_full_lookups++;
- k = -1;
kstart = HASH_TT(guest_addr);
vg_assert(kstart >= 0 && kstart < N_HTTES_PER_SECTOR);
@@ -1751,7 +1766,7 @@
for (i = 0; i < n_sectors; i++) {
sno = sector_search_order[i];
- if (UNLIKELY(sno == -1))
+ if (UNLIKELY(sno == INV_SNO))
return False; /* run out of sectors to search */
k = kstart;
@@ -1838,7 +1853,7 @@
/* Delete a tt entry, and update all the eclass data accordingly. */
-static void delete_tte ( /*MOD*/Sector* sec, UInt secNo, Int tteno,
+static void delete_tte ( /*MOD*/Sector* sec, SECno secNo, TTEno tteno,
VexArch arch_host, VexEndness endness_host )
{
Int i, ec_num, ec_idx;
@@ -1863,7 +1878,7 @@
vg_assert(ec_idx >= 0);
vg_assert(ec_idx < sec->ec2tte_used[ec_num]);
/* Assert that the two links point at each other. */
- vg_assert(sec->ec2tte[ec_num][ec_idx] == (UShort)tteno);
+ vg_assert(sec->ec2tte[ec_num][ec_idx] == tteno);
/* "delete" the pointer back to here. */
sec->ec2tte[ec_num][ec_idx] = EC2TTE_DELETED;
}
@@ -1872,10 +1887,9 @@
/* Mark the entry as deleted in htt.
Note: we could avoid the below hash table search by
adding a reference from tte to its hash position in tt. */
- UInt kstart = HASH_TT(tte->entry);
- UInt k = kstart;
- UInt j;
- vg_assert(kstart >= 0 && kstart < N_HTTES_PER_SECTOR);
+ HTTno j;
+ HTTno k = HASH_TT(tte->entry);
+ vg_assert(k >= 0 && k < N_HTTES_PER_SECTOR);
for (j = 0; j < N_HTTES_PER_SECTOR; j++) {
if (sec->htt[k] == tteno)
break;
@@ -1907,14 +1921,14 @@
only consider translations in the specified eclass. */
static
-Bool delete_translations_in_sector_eclass ( /*MOD*/Sector* sec, UInt secNo,
+Bool delete_translations_in_sector_eclass ( /*MOD*/Sector* sec, SECno secNo,
Addr guest_start, ULong range,
Int ec,
VexArch arch_host,
VexEndness endness_host )
{
Int i;
- UShort tteno;
+ TTEno tteno;
Bool anyDeld = False;
TTEntry* tte;
@@ -1935,7 +1949,7 @@
if (overlaps( guest_start, range, &tte->vge )) {
anyDeld = True;
- delete_tte( sec, secNo, (Int)tteno, arch_host, endness_host );
+ delete_tte( sec, secNo, tteno, arch_host, endness_host );
}
}
@@ -1948,13 +1962,13 @@
slow way, by inspecting all translations in sec. */
static
-Bool delete_translations_in_sector ( /*MOD*/Sector* sec, UInt secNo,
+Bool delete_translations_in_sector ( /*MOD*/Sector* sec, SECno secNo,
Addr guest_start, ULong range,
VexArch arch_host,
VexEndness endness_host )
{
- Int i;
- Bool anyDeld = False;
+ TTEno i;
+ Bool anyDeld = False;
for (i = 0; i < N_TTES_PER_SECTOR; i++) {
if (sec->tt[i].status == InUse
@@ -1972,7 +1986,8 @@
const HChar* who )
{
Sector* sec;
- Int sno, ec;
+ SECno sno;
+ Int ec;
Bool anyDeleted = False;
vg_assert(init_done);
@@ -2071,7 +2086,7 @@
/* Post-deletion sanity check */
if (VG_(clo_sanity_level >= 4)) {
- Int i;
+ TTEno i;
TTEntry* tte;
Bool sane = sanity_check_all_sectors();
vg_assert(sane);
@@ -2280,11 +2295,18 @@
/* Otherwise lots of things go wrong... */
vg_assert(sizeof(ULong) == 8);
+ vg_assert(sizeof(TTEno) == sizeof(HTTno));
+ vg_assert(sizeof(TTEno) == 2);
+ vg_assert(N_TTES_PER_SECTOR <= N_HTTES_PER_SECTOR);
+ vg_assert(N_HTTES_PER_SECTOR < INV_TTE);
+ vg_assert(N_HTTES_PER_SECTOR < EC2TTE_DELETED);
+ vg_assert(N_HTTES_PER_SECTOR < HTT_EMPTY);
/* check fast cache entries really are 2 words long */
vg_assert(sizeof(Addr) == sizeof(void*));
vg_assert(sizeof(FastCacheEntry) == 2 * sizeof(Addr));
/* check fast cache entries are packed back-to-back with no spaces */
- vg_assert(sizeof( VG_(tt_fast) ) == VG_TT_FAST_SIZE * sizeof(FastCacheEntry));
+ vg_assert(sizeof( VG_(tt_fast) )
+ == VG_TT_FAST_SIZE * sizeof(FastCacheEntry));
/* check fast cache is aligned as we requested. Not fatal if it
isn't, but we might as well make sure. */
vg_assert(VG_IS_16_ALIGNED( ((Addr) & VG_(tt_fast)[0]) ));
@@ -2318,7 +2340,7 @@
/* Initialise the sector_search_order hint table, including the
entries we aren't going to use. */
for (i = 0; i < MAX_N_SECTORS; i++)
- sector_search_order[i] = -1;
+ sector_search_order[i] = INV_SNO;
/* Initialise the fast cache. */
invalidateFastCache();
@@ -2351,8 +2373,8 @@
"TT/TC: table: %d htt[%d] of %d bytes each = %d total HTT"
" (htt[%d] %d%% max occup)\n",
n_sectors, N_HTTES_PER_SECTOR,
- (int)(N_HTTES_PER_SECTOR * sizeof(UInt)),
- (int)(n_sectors * N_HTTES_PER_SECTOR * sizeof(UInt)),
+ (int)(N_HTTES_PER_SECTOR * sizeof(TTEno)),
+ (int)(n_sectors * N_HTTES_PER_SECTOR * sizeof(TTEno)),
N_HTTES_PER_SECTOR, SECTOR_TT_LIMIT_PERCENT);
}
}
@@ -2420,15 +2442,17 @@
ULong VG_(get_SB_profile) ( SBProfEntry tops[], UInt n_tops )
{
- Int sno, i, r, s;
+ SECno sno;
+ Int r, s;
ULong score_total;
+ TTEno i;
/* First, compute the total weighted count, and find the top N
ttes. tops contains pointers to the most-used n_tops blocks, in
descending order (viz, tops[0] is the highest scorer). */
- for (i = 0; i < n_tops; i++) {
- tops[i].addr = 0;
- tops[i].score = 0;
+ for (s = 0; s < n_tops; s++) {
+ tops[s].addr = 0;
+ tops[s].score = 0;
}
score_total = 0;
Modified: trunk/coregrind/pub_core_transtab.h
==============================================================================
--- trunk/coregrind/pub_core_transtab.h (original)
+++ trunk/coregrind/pub_core_transtab.h Mon Mar 23 21:49:32 2015
@@ -91,15 +91,22 @@
Int offs_profInc,
UInt n_guest_instrs );
+typedef UShort SECno; // SECno type identifies a sector
+typedef UShort TTEno; // TTEno type identifies a TT entry in a sector.
+
+// 2 constants that indicates Invalid entries.
+#define INV_SNO ((SECno)0xFFFF)
+#define INV_TTE ((TTEno)0xFFFF)
+
extern
void VG_(tt_tc_do_chaining) ( void* from__patch_addr,
- UInt to_sNo,
- UInt to_tteNo,
+ SECno to_sNo,
+ TTEno to_tteNo,
Bool to_fastEP );
extern Bool VG_(search_transtab) ( /*OUT*/Addr* res_hcode,
- /*OUT*/UInt* res_sNo,
- /*OUT*/UInt* res_tteNo,
+ /*OUT*/SECno* res_sNo,
+ /*OUT*/TTEno* res_tteNo,
Addr guest_addr,
Bool upd_cache );
|
|
From: <sv...@va...> - 2015-03-23 20:04:22
|
Author: florian
Date: Mon Mar 23 20:04:14 2015
New Revision: 15035
Log:
Simplify expression.
Modified:
trunk/include/pub_tool_basics.h
Modified: trunk/include/pub_tool_basics.h
==============================================================================
--- trunk/include/pub_tool_basics.h (original)
+++ trunk/include/pub_tool_basics.h Mon Mar 23 20:04:14 2015
@@ -200,8 +200,7 @@
}
static inline Bool sr_EQ ( SysRes sr1, SysRes sr2 ) {
return sr1._val == sr2._val
- && ((sr1._isError && sr2._isError)
- || (!sr1._isError && !sr2._isError));
+ && sr1._isError == sr2._isError;
}
#elif defined(VGO_darwin)
|
|
From: Florian K. <fl...@ei...> - 2015-03-23 19:36:37
|
r12616 (merge mips32 port) adds a new field '_valEx' to the SysRes structure. However, the function sr_EQ which tests two SysRes values for equality ignores that field. That doesn't look right. But in case it is correct there should be some verbiage as to why _valEx does not matter for equality. Florian |
Author: florian
Date: Mon Mar 23 17:13:04 2015
New Revision: 15034
Log:
Add VG_(am_is_bogus_client_stack_pointer)(Addr).
The function is used in VG_(client_syscall) to avoid extending the stack
when it is clear that the current value of the stack pointer does not
point into a segment that looks like a stack segment.
See the comments in the code there.
As a side effect of this we can now revert r15018 which increased
the stack size of the alternate stack in memcheck/tests/sigaltstack.c.
The reason is that the belief at the time: "alternate stack is too small"
was not correct. What instead happened was that VG_(client_syscall) called
VG_(extend_stack) without need (the syscall was tgkill) and the new stack
pointer happened to be in a file segment.
In other words: the current stack pointer was still within the alternate
stack, i.e. the alternate stack was (barely) large enough.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_signals.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/coregrind/pub_core_aspacemgr.h
trunk/memcheck/tests/sigaltstack.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Mon Mar 23 17:13:04 2015
@@ -1357,6 +1357,50 @@
}
+/* Check whether ADDR looks like a bogus stack pointer. Non-bogosity is
+ defined as follows: ADDR is not bogus if
+ (1) it points into an already mapped stack segment, OR
+ (2) it points into a reservation segment into which an abutting SkAnonC
+ segment can be extended. */
+Bool VG_(am_is_bogus_client_stack_pointer)( Addr addr )
+{
+ const NSegment *seg = nsegments + find_nsegment_idx(addr);
+
+ switch (seg->kind) {
+ case SkFree:
+ case SkAnonV:
+ case SkFileV:
+ case SkFileC:
+ case SkShmC:
+ return True;
+
+ case SkResvn: {
+ if (seg->smode != SmUpper) return True;
+ /* If the the abutting segment towards higher addresses is an SkAnonC
+ segment, then ADDR is a future stack pointer. */
+ const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ True);
+ if (next == NULL || next->kind != SkAnonC) return True;
+
+ /* OK; looks like a stack segment */
+ return False;
+ }
+
+ case SkAnonC: {
+ /* If the abutting segment towards lower addresses is an SkResvn
+ segment, then ADDR is a stack pointer into mapped memory. */
+ const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ False);
+ if (next == NULL || next->kind != SkResvn || seg->smode != SmUpper)
+ return True;
+
+ /* OK; looks like a stack segment */
+ return False;
+ }
+
+ default:
+ aspacem_assert(0); // should never happen
+ }
+}
+
/*-----------------------------------------------------------------*/
/*--- ---*/
/*--- Modifying the segment array, and constructing segments. ---*/
Modified: trunk/coregrind/m_signals.c
==============================================================================
--- trunk/coregrind/m_signals.c (original)
+++ trunk/coregrind/m_signals.c Mon Mar 23 17:13:04 2015
@@ -2239,14 +2239,16 @@
"while outside of scheduler");
}
-/* Extend the stack of thread #tid to cover addr.
+/* Extend the stack of thread #tid to cover addr. It is expected that
+ addr either points into an already mapped anonymous segment or into a
+ reservation segment abutting the stack segment. Everything else is a bug.
Returns True on success, False on failure.
Succeeds without doing anything if addr is already within a segment.
Failure could be caused by:
- - addr not below a growable segment or in a free segment
+ - addr not below a growable segment
- new stack size would exceed the stack limit for the given thread
- mmap failed for some other reason
*/
@@ -2256,7 +2258,7 @@
/* Get the segment containing addr. */
const NSegment* seg = VG_(am_find_nsegment)(addr);
- if (seg == NULL) return False; // addr in a SkFree segment
+ vg_assert(seg != NULL);
/* TODO: the test "seg->kind == SkAnonC" is really inadequate,
because although it tests whether the segment is mapped
@@ -2266,11 +2268,8 @@
/* addr is already mapped. Nothing to do. */
return True;
- /* Find the next Segment above addr. This will return NULL if ADDR
- is bogus -- which it may be. See comment at the call site in function
- VG_(client_syscall) */
const NSegment* seg_next = VG_(am_next_nsegment)( seg, True/*fwds*/ );
- if (seg_next == NULL || seg_next->kind != SkAnonC) return False;
+ vg_assert(seg_next != NULL);
udelta = VG_PGROUNDUP(seg_next->start - addr);
Modified: trunk/coregrind/m_syswrap/syswrap-main.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-main.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-main.c Mon Mar 23 17:13:04 2015
@@ -1485,16 +1485,22 @@
if (tid == 1/*ROOT THREAD*/) {
Addr stackMin = VG_(get_SP)(tid) - VG_STACK_REDZONE_SZB;
- /* Note, that the stack pointer can be bogus at this point. This is
- extremely rare. A legitimate testcase that exercises this is
- none/tests/s390x/stmg.c: The stack pointer happens to be in the
- reservation segment near the end of the addressable memory and
- there is no SkAnonC segment above.
-
- We could do slightly better here by not extending the stack for
- system calls that do not access user space memory. That's busy
- work with very little gain... */
- VG_(extend_stack)( tid, stackMin ); // may fail
+ /* The precise thing to do here would be to extend the stack only
+ if the system call can be proven to access unmapped user stack
+ memory. That is an enormous amount of work even if a proper
+ spec of system calls was available.
+
+ In the case where the system call does not access user memory
+ the stack pointer here can have any value. A legitimate testcase
+ that exercises this is none/tests/s390x/stmg.c:
+ The stack pointer happens to be in the reservation segment near
+ the end of the addressable memory and there is no SkAnonC segment
+ above.
+
+ So the approximation we're taking here is to extend the stack only
+ if the client stack pointer does not look bogus. */
+ if (! VG_(am_is_bogus_client_stack_pointer)(stackMin))
+ VG_(extend_stack)( tid, stackMin );
}
# endif
/* END ensure root thread's stack is suitably mapped */
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Mon Mar 23 17:13:04 2015
@@ -87,6 +87,9 @@
extern Bool VG_(am_is_valid_for_client_or_free_or_resvn)
( Addr start, SizeT len, UInt prot );
+/* Check whether ADDR looks like a bogus stack pointer. */
+extern Bool VG_(am_is_bogus_client_stack_pointer)( Addr addr );
+
/* Trivial fn: return the total amount of space in anonymous mappings,
both for V and the client. Is used for printing stats in
out-of-memory messages. */
Modified: trunk/memcheck/tests/sigaltstack.c
==============================================================================
--- trunk/memcheck/tests/sigaltstack.c (original)
+++ trunk/memcheck/tests/sigaltstack.c Mon Mar 23 17:13:04 2015
@@ -14,7 +14,7 @@
int res, i;
stack_t sigstk;
struct sigaction act;
- static const int size = SIGSTKSZ*4;
+ static const int size = SIGSTKSZ*2;
// We give EXEC permissions because this won't work on ppc32 unless you
// ask for an alt stack with EXEC permissions,
// since signal returning requires execution of code on the stack.
|
|
From: Christian B. <bor...@de...> - 2015-03-23 05:14:08
|
valgrind revision: 15033 VEX revision: 3104 C compiler: gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] GDB: GNU gdb (GDB) SUSE (7.5.1-0.7.29) Assembler: GNU assembler (GNU Binutils; SUSE Linux Enterprise 11) 2.23.1 C library: GNU C Library stable release version 2.11.3 (20110527) uname -mrs: Linux 3.0.101-0.42-default s390x Vendor version: Welcome to SUSE Linux Enterprise Server 11 SP3 (s390x) - Kernel %r (%t). Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP3 gcc 4.3.4 on z196 (s390x) ) Started at 2015-03-23 03:45:01 CET Ended at 2015-03-23 06:13:50 CET 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 == 666 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/memcmptest (stderr) memcheck/tests/origin5-bz2 (stderr) helgrind/tests/pth_cond_destroy_busy (stderr) helgrind/tests/tc20_verifywrap (stderr) --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old -- Running tests in perf ---------------------------------------------- -- bigcode1 -- bigcode1 valgrind-new:0.22s no: 4.7s (21.5x, -----) me: 6.5s (29.5x, -----) ca:26.0s (118.1x, -----) he: 5.3s (24.1x, -----) ca: 9.2s (42.0x, -----) dr: 4.3s (19.5x, -----) ma: 4.9s (22.2x, -----) bigcode1 valgrind-old:0.22s no: 4.8s (21.6x, -0.8%) me: 6.5s (29.5x, 0.0%) ca:26.0s (118.2x, -0.1%) he: 5.3s (24.1x, 0.2%) ca: 9.2s (42.0x, 0.0%) dr: 4.3s (19.5x, 0.2%) ma: 4.9s (22.3x, -0.4%) -- bigcode2 -- bigcode2 valgrind-new:0.23s no: 7.7s (33.7x, -----) me:14.0s (61.0x, -----) ca:39.1s (170.0x, -----) he:10.4s (45.1x, -----) ca:14.5s (62.9x, -----) dr: 9.3s (40.5x, -----) ma: 8.2s (35.7x, -----) bigcode2 valgrind-old:0.23s no: 7.7s (33.4x, 0.6%) me:13.9s (60.7x, 0.5%) ca:39.2s (170.3x, -0.2%) he:10.4s (45.2x, -0.2%) ca:14.4s (62.7x, 0.2%) dr: 9.3s (40.3x, 0.3%) ma: 8.3s (36.2x, -1.5%) -- bz2 -- bz2 valgrind-new:0.71s no: 6.0s ( 8.5x, -----) me:13.1s (18.5x, -----) ca:30.2s (42.5x, -----) he:20.0s (28.1x, -----) ca:34.8s (49.0x, -----) dr:29.3s (41.3x, -----) ma: 3.9s ( 5.5x, -----) bz2 valgrind-old:0.71s no: 6.2s ( 8.7x, -1.8%) me:13.2s (18.5x, -0.3%) ca:30.2s (42.6x, -0.2%) he:20.0s (28.2x, -0.2%) ca:34.9s (49.1x, -0.2%) dr:29.5s (41.5x, -0.6%) ma: 3.9s ( 5.5x, -0.5%) -- fbench -- fbench valgrind-new:0.41s no: 1.6s ( 4.0x, -----) me: 4.6s (11.2x, -----) ca: 9.3s (22.7x, -----) he: 6.6s (16.2x, -----) ca: 7.4s (18.0x, -----) dr: 5.9s (14.4x, -----) ma: 1.7s ( 4.1x, -----) fbench valgrind-old:0.41s no: 1.6s ( 4.0x, 0.0%) me: 4.6s (11.2x, -0.4%) ca: 9.3s (22.7x, 0.0%) he: 6.6s (16.2x, 0.0%) ca: 7.4s (18.0x, 0.1%) dr: 5.9s (14.3x, 0.2%) ma: 1.7s ( 4.1x, 0.6%) -- ffbench -- ffbench valgrind-new:0.22s no: 1.2s ( 5.3x, -----) me: 3.5s (15.7x, -----) ca: 3.1s (14.0x, -----) he:44.5s (202.5x, -----) ca: 9.5s (43.2x, -----) dr: 7.5s (34.2x, -----) ma: 1.0s ( 4.6x, -----) ffbench valgrind-old:0.22s no: 1.1s ( 5.1x, 3.4%) me: 3.4s (15.4x, 1.7%) ca: 3.0s (13.7x, 2.0%) he:44.2s (200.9x, 0.8%) ca: 9.5s (43.1x, 0.2%) dr: 7.5s (34.0x, 0.7%) ma: 1.0s ( 4.5x, 3.0%) -- heap -- heap valgrind-new:0.23s no: 2.2s ( 9.5x, -----) me: 9.3s (40.5x, -----) ca:13.1s (56.9x, -----) he:13.4s (58.3x, -----) ca:11.4s (49.4x, -----) dr: 8.1s (35.2x, -----) ma: 8.3s (36.0x, -----) heap valgrind-old:0.23s no: 2.2s ( 9.4x, 0.9%) me: 9.3s (40.6x, -0.2%) ca:13.2s (57.2x, -0.5%) he:13.4s (58.4x, -0.2%) ca:11.4s (49.7x, -0.5%) dr: 8.1s (35.2x, 0.0%) ma: 8.1s (35.1x, 2.3%) -- heap_pdb4 -- heap_pdb4 valgrind-new:0.23s no: 2.5s (10.8x, -----) me:13.5s (58.6x, -----) ca:14.2s (61.6x, -----) he:14.7s (63.9x, -----) ca:12.6s (54.8x, -----) dr: 9.0s (39.1x, -----) ma: 8.5s (36.9x, -----) heap_pdb4 valgrind-old:0.23s no: 2.6s (11.1x, -2.8%) me:13.5s (58.6x, 0.1%) ca:14.2s (61.6x, 0.1%) he:14.7s (64.0x, -0.2%) ca:12.5s (54.5x, 0.5%) dr: 9.0s (39.2x, -0.2%) ma: 8.2s (35.7x, 3.3%) -- many-loss-records -- many-loss-records valgrind-new:0.02s no: 0.5s (24.5x, -----) me: 2.5s (123.5x, -----) ca: 1.9s (97.5x, -----) he: 2.5s (123.5x, -----) ca: 1.9s (96.5x, -----) dr: 2.0s (100.0x, -----) ma: 1.7s (85.0x, -----) many-loss-records valgrind-old:0.02s no: 0.5s (25.0x, -2.0%) me: 2.4s (121.0x, 2.0%) ca: 1.9s (97.5x, 0.0%) he: 2.5s (124.0x, -0.4%) ca: 1.9s (96.0x, 0.5%) dr: 2.0s (101.0x, -1.0%) ma: 1.7s (85.0x, 0.0%) -- many-xpts -- many-xpts valgrind-new:0.07s no: 0.7s ( 9.7x, -----) me: 3.5s (50.4x, -----) ca:346.3s (4947.7x, -----) he: 7.1s (101.0x, -----) ca: 2.8s (40.3x, -----) dr: 2.8s (40.6x, -----) ma: 2.6s (37.7x, -----) many-xpts valgrind-old:0.07s no: 0.7s ( 9.4x, 2.9%) me: 3.5s (50.1x, 0.6%) ca:352.4s (5034.1x, -1.7%) he: 7.1s (101.3x, -0.3%) ca: 2.8s (40.3x, 0.0%) dr: 2.8s (40.6x, 0.0%) ma: 2.6s (37.7x, 0.0%) -- sarp -- sarp valgrind-new:0.03s no: 0.6s (20.0x, -----) me: 4.1s (136.3x, -----) ca: 3.2s (107.3x, -----) he:17.8s (594.3x, -----) ca: 2.1s (69.0x, -----) dr: 1.6s (54.0x, -----) ma: 0.5s (17.7x, -----) sarp valgrind-old:0.03s no: 0.6s (20.0x, 0.0%) me: 4.1s (136.3x, 0.0%) ca: 3.2s (107.7x, -0.3%) he:17.8s (594.3x, 0.0%) ca: 2.1s (68.7x, 0.5%) dr: 1.6s (53.7x, 0.6%) ma: 0.5s (17.3x, 1.9%) -- tinycc -- tinycc valgrind-new:0.22s no: 3.0s (13.7x, -----) me:15.1s (68.6x, -----) ca:29.8s (135.6x, -----) he:28.7s (130.3x, -----) ca:21.5s (97.9x, -----) dr:20.6s (93.9x, -----) ma: 4.0s (18.3x, -----) tinycc valgrind-old:0.22s no: 3.0s (13.7x, 0.3%) me:15.1s (68.5x, 0.2%) ca:29.9s (135.7x, -0.1%) he:28.6s (130.0x, 0.2%) ca:21.5s (97.9x, 0.0%) dr:20.7s (93.9x, -0.0%) ma: 4.1s (18.6x, -1.7%) -- Finished tests in perf ---------------------------------------------- == 11 programs, 154 timings ================= real 110m31.006s user 109m28.079s sys 0m49.221s |
|
From: Rich C. <rc...@wi...> - 2015-03-23 04:31:02
|
valgrind revision: 15033
VEX revision: 3104
C compiler: gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
GDB: GNU gdb (GDB; openSUSE 13.2) 7.8
Assembler: GNU assembler (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1
C library: GNU C Library (GNU libc) stable release version 2.19 (git 9a869d822025)
uname -mrs: Linux 3.16.7-7-desktop x86_64
Vendor version: Welcome to openSUSE 13.2 "Harlequin" - Kernel %r (%t).
Nightly build on rodan ( Linux 3.16.7-7-desktop x86_64 )
Started at 2015-03-22 19:22:01 CDT
Ended at 2015-03-22 23:30:53 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
== 617 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
+ perl perf/vg_perf --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old perf
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
bigcode1 valgrind-new:0.48s no: 7.6s (15.8x, -----) me:15.3s (31.9x, -----) ca:62.1s (129.4x, -----) he: 9.5s (19.7x, -----) ca:18.5s (38.5x, -----) dr: 9.1s (18.9x, -----) ma: 8.8s (18.4x, -----)
bigcode1 valgrind-old:0.48s no: 7.5s (15.7x, 0.4%) me:15.4s (32.0x, -0.4%) ca:62.1s (129.4x, -0.0%) he: 9.5s (19.8x, -0.3%) ca:18.5s (38.6x, -0.3%) dr: 9.0s (18.8x, 0.2%) ma: 8.8s (18.3x, 0.5%)
-- bigcode2 --
bigcode2 valgrind-new:0.49s no:18.3s (37.4x, -----) me:38.7s (79.0x, -----) ca:105.0s (214.4x, -----) he:23.7s (48.4x, -----) ca:33.7s (68.9x, -----) dr:21.6s (44.0x, -----) ma:21.1s (43.1x, -----)
bigcode2 valgrind-old:0.49s no:18.2s (37.2x, 0.5%) me:38.9s (79.3x, -0.4%) ca:104.9s (214.0x, 0.2%) he:23.8s (48.5x, -0.2%) ca:34.0s (69.3x, -0.6%) dr:21.5s (43.9x, 0.2%) ma:21.0s (42.8x, 0.7%)
-- bz2 --
bz2 valgrind-new:2.32s no: 7.7s ( 3.3x, -----) me:25.3s (10.9x, -----) ca:58.1s (25.0x, -----) he:38.5s (16.6x, -----) ca:49.7s (21.4x, -----) dr:53.8s (23.2x, -----) ma: 7.3s ( 3.2x, -----)
bz2 valgrind-old:2.32s no: 7.7s ( 3.3x, 0.1%) me:25.4s (10.9x, -0.1%) ca:58.1s (25.0x, 0.0%) he:38.6s (16.6x, -0.0%) ca:49.7s (21.4x, 0.0%) dr:53.8s (23.2x, -0.0%) ma: 7.3s ( 3.2x, 0.0%)
-- fbench --
fbench valgrind-new:1.44s no: 5.2s ( 3.6x, -----) me:17.7s (12.3x, -----) ca:26.6s (18.5x, -----) he:13.1s ( 9.1x, -----) ca:16.0s (11.1x, -----) dr:13.5s ( 9.4x, -----) ma: 5.4s ( 3.8x, -----)
fbench valgrind-old:1.44s no: 5.2s ( 3.6x, -0.2%) me:17.7s (12.3x, -0.1%) ca:26.7s (18.5x, -0.4%) he:13.1s ( 9.1x, 0.0%) ca:16.0s (11.1x, 0.0%) dr:13.5s ( 9.4x, 0.0%) ma: 5.4s ( 3.8x, 0.0%)
-- ffbench --
ffbench valgrind-new:1.00s no: 3.4s ( 3.4x, -----) me:12.3s (12.3x, -----) ca: 8.0s ( 8.0x, -----) he:21.1s (21.1x, -----) ca:21.0s (21.0x, -----) dr:17.6s (17.6x, -----) ma: 3.4s ( 3.4x, -----)
ffbench valgrind-old:1.00s no: 3.5s ( 3.5x, -0.3%) me:12.3s (12.3x, -0.1%) ca: 8.0s ( 8.0x, -0.1%) he:21.1s (21.1x, 0.0%) ca:21.0s (21.0x, 0.0%) dr:17.6s (17.6x, 0.0%) ma: 3.4s ( 3.4x, 0.0%)
-- heap --
heap valgrind-new:0.41s no: 3.0s ( 7.4x, -----) me:22.2s (54.2x, -----) ca:30.8s (75.0x, -----) he:32.2s (78.6x, -----) ca:15.0s (36.6x, -----) dr:20.4s (49.8x, -----) ma:21.6s (52.6x, -----)
heap valgrind-old:0.41s no: 3.0s ( 7.4x, 0.7%) me:22.2s (54.1x, 0.2%) ca:30.7s (75.0x, 0.1%) he:32.0s (78.1x, 0.7%) ca:15.0s (36.6x, -0.2%) dr:20.4s (49.7x, 0.2%) ma:21.8s (53.3x, -1.2%)
-- heap_pdb4 --
heap_pdb4 valgrind-new:0.56s no: 3.4s ( 6.0x, -----) me:38.1s (68.1x, -----) ca:33.1s (59.1x, -----) he:35.9s (64.0x, -----) ca:17.3s (30.9x, -----) dr:22.9s (41.0x, -----) ma:22.8s (40.7x, -----)
heap_pdb4 valgrind-old:0.56s no: 3.3s ( 5.9x, 1.8%) me:38.0s (67.9x, 0.2%) ca:33.2s (59.3x, -0.2%) he:35.9s (64.2x, -0.3%) ca:17.3s (30.9x, 0.1%) dr:23.0s (41.0x, -0.0%) ma:22.9s (41.0x, -0.8%)
-- many-loss-records --
many-loss-records valgrind-new:0.05s no: 1.0s (20.8x, -----) me: 6.1s (122.0x, -----) ca: 4.8s (95.6x, -----) he: 5.7s (113.4x, -----) ca: 3.0s (60.0x, -----) dr: 5.0s (100.0x, -----) ma: 4.6s (91.6x, -----)
many-loss-records valgrind-old:0.05s no: 1.0s (20.8x, 0.0%) me: 6.1s (121.6x, 0.3%) ca: 4.8s (95.6x, 0.0%) he: 5.6s (111.6x, 1.6%) ca: 3.0s (60.2x, -0.3%) dr: 5.0s (99.8x, 0.2%) ma: 4.6s (92.4x, -0.9%)
-- many-xpts --
many-xpts valgrind-new:0.15s no: 1.3s ( 8.8x, -----) me: 7.3s (48.7x, -----) ca:12.7s (84.8x, -----) he:10.1s (67.4x, -----) ca: 4.1s (27.3x, -----) dr: 6.6s (43.8x, -----) ma: 7.1s (47.4x, -----)
many-xpts valgrind-old:0.15s no: 1.3s ( 8.9x, -0.8%) me: 7.3s (48.5x, 0.4%) ca:12.7s (84.9x, -0.1%) he:10.1s (67.4x, 0.0%) ca: 4.1s (27.3x, 0.0%) dr: 6.6s (43.7x, 0.2%) ma: 7.1s (47.6x, -0.4%)
-- sarp --
sarp valgrind-new:0.11s no: 1.2s (11.4x, -----) me: 9.8s (88.7x, -----) ca: 7.9s (71.5x, -----) he:31.6s (287.5x, -----) ca: 4.3s (39.1x, -----) dr: 4.5s (40.5x, -----) ma: 1.3s (11.9x, -----)
sarp valgrind-old:0.11s no: 1.3s (11.5x, -0.8%) me: 9.8s (88.7x, 0.0%) ca: 7.9s (71.7x, -0.3%) he:31.6s (287.6x, -0.0%) ca: 4.3s (39.1x, 0.0%) dr: 4.4s (40.4x, 0.2%) ma: 1.3s (11.9x, 0.0%)
-- tinycc --
tinycc valgrind-new:0.75s no: 7.4s ( 9.9x, -----) me:37.9s (50.6x, -----) ca:46.5s (62.0x, -----) he:45.3s (60.4x, -----) ca:38.4s (51.1x, -----) dr:37.8s (50.4x, -----) ma:11.7s (15.6x, -----)
tinycc valgrind-old:0.75s no: 7.4s ( 9.9x, 0.0%) me:38.0s (50.6x, -0.0%) ca:46.5s (62.0x, 0.0%) he:45.3s (60.5x, -0.0%) ca:38.4s (51.1x, 0.0%) dr:37.7s (50.3x, 0.1%) ma:11.6s (15.5x, 0.4%)
-- Finished tests in perf ----------------------------------------------
== 11 programs, 154 timings =================
real 152m12.457s
user 150m45.465s
sys 1m21.007s
=================================================
./valgrind-new/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-22 20:10:34.609843512 -0500
+++ hgtls.stdoutB.out 2015-03-22 20:24:04.748928236 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-22 20:10:35.404851327 -0500
+++ err_disable3.stderr.out 2015-03-22 20:28:25.872543971 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-22 20:10:36.245859594 -0500
+++ err_disable4.stderr.out 2015-03-22 20:28:29.010574782 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-22 20:10:36.005857235 -0500
+++ threadname.stderr.out 2015-03-22 20:35:16.478585376 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-22 20:10:35.709854325 -0500
+++ threadname_xml.stderr.out 2015-03-22 20:35:18.808608365 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-22 19:22:17.308980682 -0500
+++ hgtls.stdoutB.out 2015-03-22 19:35:51.006114502 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-22 19:22:18.115988694 -0500
+++ err_disable3.stderr.out 2015-03-22 19:40:11.390738943 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-22 19:22:18.956997043 -0500
+++ err_disable4.stderr.out 2015-03-22 19:40:14.540770751 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-22 19:22:18.715994650 -0500
+++ threadname.stderr.out 2015-03-22 19:47:03.135907885 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-22 19:22:18.419991712 -0500
+++ threadname_xml.stderr.out 2015-03-22 19:47:05.478931671 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: Rich C. <rc...@wi...> - 2015-03-23 03:08:54
|
valgrind revision: 15033
VEX revision: 3104
C compiler: gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
GDB: GNU gdb (GDB; openSUSE 13.2) 7.8
Assembler: GNU assembler (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1
C library: GNU C Library (GNU libc) stable release version 2.19 (git 9a869d822025)
uname -mrs: Linux 3.16.6-2-desktop x86_64
Vendor version: openSUSE 13.2 (Harlequin)
Nightly build on ultra ( gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064] Linux 3.16.6-2-desktop x86_64 )
Started at 2015-03-22 21:30:02 CDT
Ended at 2015-03-22 22:08:42 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
== 617 tests, 6 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
helgrind/tests/hg05_race2 (stderr)
helgrind/tests/tc09_bad_unlock (stderr)
=================================================
./valgrind-new/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-22 21:49:39.744070578 -0500
+++ hgtls.stdoutB.out 2015-03-22 21:56:22.966827438 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-new/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2015-03-22 21:50:52.448043055 -0500
+++ hg05_race2.stderr.out 2015-03-22 22:03:05.276605263 -0500
@@ -26,8 +26,7 @@
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
+ Address 0x........ is on thread #x's stack
----------------------------------------------------------------
@@ -42,8 +41,7 @@
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
+ Address 0x........ is on thread #x's stack
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2015-03-22 21:50:52.471042413 -0500
+++ tc09_bad_unlock.stderr.out 2015-03-22 22:03:34.923775649 -0500
@@ -37,7 +37,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
Address 0x........ is on thread #x's stack
- in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
----------------------------------------------------------------
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-22 21:49:47.718848166 -0500
+++ err_disable3.stderr.out 2015-03-22 21:58:14.374721713 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-22 21:49:54.320664013 -0500
+++ err_disable4.stderr.out 2015-03-22 21:58:15.299695929 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-22 21:49:51.382745988 -0500
+++ threadname.stderr.out 2015-03-22 22:00:17.388292781 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-22 21:49:50.059782883 -0500
+++ threadname_xml.stderr.out 2015-03-22 22:00:18.072273717 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-22 21:30:24.119317260 -0500
+++ hgtls.stdoutB.out 2015-03-22 21:37:07.233064421 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-old/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2015-03-22 21:31:44.880062703 -0500
+++ hg05_race2.stderr.out 2015-03-22 21:43:51.977770723 -0500
@@ -26,8 +26,7 @@
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
+ Address 0x........ is on thread #x's stack
----------------------------------------------------------------
@@ -42,8 +41,7 @@
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
+ Address 0x........ is on thread #x's stack
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2015-03-22 21:31:44.903062060 -0500
+++ tc09_bad_unlock.stderr.out 2015-03-22 21:44:21.700941533 -0500
@@ -37,7 +37,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
Address 0x........ is on thread #x's stack
- in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
----------------------------------------------------------------
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-22 21:30:30.796131189 -0500
+++ err_disable3.stderr.out 2015-03-22 21:39:00.412905848 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-22 21:30:37.272950354 -0500
+++ err_disable4.stderr.out 2015-03-22 21:39:01.347879757 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-22 21:30:34.543026567 -0500
+++ threadname.stderr.out 2015-03-22 21:41:04.008457034 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-22 21:30:33.044068421 -0500
+++ threadname_xml.stderr.out 2015-03-22 21:41:04.674438452 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: <sv...@va...> - 2015-03-22 11:02:06
|
Author: tom
Date: Sun Mar 22 11:01:58 2015
New Revision: 15033
Log:
Include the platform name in the unhandled system call message
We often get bug reports for an unhandled system call which don't
make it clear what platform is in use, which makes it impossible
to know which system call it is.
Modified:
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/memcheck/tests/x86-linux/scalar.stderr.exp
Modified: trunk/coregrind/m_syswrap/syswrap-main.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-main.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-main.c Sun Mar 22 11:01:58 2015
@@ -1291,8 +1291,8 @@
/*OUT*/SyscallStatus* status,
/*OUT*/UWord* flags )
{
- VG_(dmsg)("WARNING: unhandled syscall: %s\n",
- VG_SYSNUM_STRING(args->sysno));
+ VG_(dmsg)("WARNING: unhandled %s syscall: %s\n",
+ VG_PLATFORM, VG_SYSNUM_STRING(args->sysno));
if (VG_(clo_verbosity) > 1) {
VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size));
}
Modified: trunk/memcheck/tests/x86-linux/scalar.stderr.exp
==============================================================================
--- trunk/memcheck/tests/x86-linux/scalar.stderr.exp (original)
+++ trunk/memcheck/tests/x86-linux/scalar.stderr.exp Sun Mar 22 11:01:58 2015
@@ -4070,7 +4070,7 @@
-----------------------------------------------------
9999: 9999 1e
-----------------------------------------------------
-WARNING: unhandled syscall: 9999
+WARNING: unhandled x86-linux syscall: 9999
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
|
|
From: Christian B. <bor...@de...> - 2015-03-22 05:14:09
|
valgrind revision: 15032 VEX revision: 3104 C compiler: gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] GDB: GNU gdb (GDB) SUSE (7.5.1-0.7.29) Assembler: GNU assembler (GNU Binutils; SUSE Linux Enterprise 11) 2.23.1 C library: GNU C Library stable release version 2.11.3 (20110527) uname -mrs: Linux 3.0.101-0.42-default s390x Vendor version: Welcome to SUSE Linux Enterprise Server 11 SP3 (s390x) - Kernel %r (%t). Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP3 gcc 4.3.4 on z196 (s390x) ) Started at 2015-03-22 03:45:01 CET Ended at 2015-03-22 06:13:51 CET 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 == 666 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/memcmptest (stderr) memcheck/tests/origin5-bz2 (stderr) helgrind/tests/pth_cond_destroy_busy (stderr) helgrind/tests/tc20_verifywrap (stderr) --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old -- Running tests in perf ---------------------------------------------- -- bigcode1 -- bigcode1 valgrind-new:0.22s no: 4.7s (21.4x, -----) me: 6.5s (29.5x, -----) ca:26.0s (118.0x, -----) he: 5.3s (24.0x, -----) ca: 9.2s (42.0x, -----) dr: 4.3s (19.5x, -----) ma: 4.8s (21.7x, -----) bigcode1 valgrind-old:0.22s no: 4.7s (21.4x, 0.0%) me: 6.5s (29.4x, 0.2%) ca:26.0s (118.0x, -0.0%) he: 5.3s (24.0x, 0.0%) ca: 9.2s (42.0x, 0.0%) dr: 4.3s (19.4x, 0.2%) ma: 4.9s (22.3x, -2.7%) -- bigcode2 -- bigcode2 valgrind-new:0.23s no: 7.8s (33.8x, -----) me:14.2s (61.5x, -----) ca:39.1s (169.9x, -----) he:10.4s (45.0x, -----) ca:14.4s (62.7x, -----) dr: 9.3s (40.4x, -----) ma: 8.1s (35.3x, -----) bigcode2 valgrind-old:0.23s no: 7.7s (33.4x, 1.2%) me:14.0s (60.7x, 1.3%) ca:40.8s (177.4x, -4.4%) he:10.3s (45.0x, 0.2%) ca:14.4s (62.7x, -0.1%) dr: 9.2s (40.1x, 0.8%) ma: 8.1s (35.3x, 0.0%) -- bz2 -- bz2 valgrind-new:0.71s no: 5.9s ( 8.4x, -----) me:13.1s (18.5x, -----) ca:30.2s (42.5x, -----) he:19.9s (28.1x, -----) ca:34.8s (49.0x, -----) dr:29.3s (41.3x, -----) ma: 3.8s ( 5.3x, -----) bz2 valgrind-old:0.71s no: 5.9s ( 8.4x, 0.0%) me:13.2s (18.6x, -0.7%) ca:30.2s (42.5x, -0.1%) he:20.0s (28.2x, -0.3%) ca:34.8s (49.1x, -0.2%) dr:29.3s (41.3x, -0.1%) ma: 3.9s ( 5.5x, -3.7%) -- fbench -- fbench valgrind-new:0.41s no: 1.6s ( 4.0x, -----) me: 4.6s (11.2x, -----) ca: 9.3s (22.7x, -----) he: 6.6s (16.2x, -----) ca: 7.4s (18.0x, -----) dr: 5.9s (14.3x, -----) ma: 1.7s ( 4.1x, -----) fbench valgrind-old:0.41s no: 1.6s ( 4.0x, 0.0%) me: 4.6s (11.1x, 0.4%) ca: 9.3s (22.7x, -0.2%) he: 6.6s (16.2x, 0.2%) ca: 7.4s (18.0x, 0.0%) dr: 5.9s (14.3x, 0.0%) ma: 1.7s ( 4.1x, -0.6%) -- ffbench -- ffbench valgrind-new:0.21s no: 1.1s ( 5.5x, -----) me: 3.4s (16.3x, -----) ca: 3.1s (14.6x, -----) he:44.6s (212.4x, -----) ca: 9.6s (45.6x, -----) dr: 7.5s (35.9x, -----) ma: 1.0s ( 4.8x, -----) ffbench valgrind-old:0.21s no: 1.1s ( 5.4x, 0.9%) me: 3.4s (16.2x, 0.3%) ca: 3.0s (14.5x, 0.3%) he:44.2s (210.5x, 0.9%) ca: 9.5s (45.2x, 0.7%) dr: 7.5s (35.6x, 0.7%) ma: 1.0s ( 4.7x, 1.0%) -- heap -- heap valgrind-new:0.23s no: 2.1s ( 9.3x, -----) me: 9.4s (40.7x, -----) ca:13.1s (57.0x, -----) he:13.6s (59.1x, -----) ca:11.4s (49.7x, -----) dr: 8.2s (35.5x, -----) ma: 8.2s (35.5x, -----) heap valgrind-old:0.23s no: 2.2s ( 9.4x, -1.4%) me: 9.4s (41.1x, -1.0%) ca:13.1s (57.0x, 0.0%) he:13.5s (58.6x, 0.9%) ca:11.4s (49.5x, 0.4%) dr: 8.2s (35.9x, -1.0%) ma: 8.2s (35.7x, -0.7%) -- heap_pdb4 -- heap_pdb4 valgrind-new:0.23s no: 2.5s (10.9x, -----) me:13.4s (58.3x, -----) ca:14.2s (61.6x, -----) he:14.8s (64.4x, -----) ca:12.6s (54.8x, -----) dr: 9.1s (39.6x, -----) ma: 8.2s (35.8x, -----) heap_pdb4 valgrind-old:0.23s no: 2.5s (10.8x, 0.4%) me:13.5s (58.8x, -1.0%) ca:14.2s (61.7x, -0.1%) he:14.7s (64.0x, 0.6%) ca:12.5s (54.5x, 0.5%) dr: 9.1s (39.5x, 0.2%) ma: 8.3s (36.1x, -0.9%) -- many-loss-records -- many-loss-records valgrind-new:0.02s no: 0.5s (25.5x, -----) me: 2.4s (121.5x, -----) ca: 1.9s (97.5x, -----) he: 2.5s (124.0x, -----) ca: 1.9s (96.5x, -----) dr: 2.0s (100.5x, -----) ma: 1.7s (85.5x, -----) many-loss-records valgrind-old:0.02s no: 0.5s (24.5x, 3.9%) me: 2.4s (122.0x, -0.4%) ca: 1.9s (97.5x, 0.0%) he: 2.5s (122.5x, 1.2%) ca: 1.9s (96.5x, 0.0%) dr: 2.0s (101.5x, -1.0%) ma: 1.7s (86.0x, -0.6%) -- many-xpts -- many-xpts valgrind-new:0.07s no: 0.7s ( 9.4x, -----) me: 3.5s (50.4x, -----) ca:352.4s (5034.6x, -----) he: 7.0s (100.6x, -----) ca: 2.8s (40.3x, -----) dr: 2.8s (40.4x, -----) ma: 2.6s (37.6x, -----) many-xpts valgrind-old:0.07s no: 0.7s ( 9.6x, -1.5%) me: 3.5s (50.3x, 0.3%) ca:350.8s (5010.7x, 0.5%) he: 7.0s (100.6x, 0.0%) ca: 2.8s (40.3x, 0.0%) dr: 2.9s (41.0x, -1.4%) ma: 2.7s (38.3x, -1.9%) -- sarp -- sarp valgrind-new:0.03s no: 0.6s (20.3x, -----) me: 4.1s (136.3x, -----) ca: 3.2s (108.0x, -----) he:17.9s (597.0x, -----) ca: 2.1s (69.0x, -----) dr: 1.6s (54.0x, -----) ma: 0.5s (17.7x, -----) sarp valgrind-old:0.03s no: 0.6s (20.0x, 1.6%) me: 4.1s (135.7x, 0.5%) ca: 3.2s (107.7x, 0.3%) he:17.9s (596.0x, 0.2%) ca: 2.1s (69.0x, 0.0%) dr: 1.6s (53.7x, 0.6%) ma: 0.5s (17.7x, 0.0%) -- tinycc -- tinycc valgrind-new:0.22s no: 3.1s (14.1x, -----) me:15.1s (68.7x, -----) ca:30.0s (136.3x, -----) he:28.6s (130.1x, -----) ca:21.5s (97.7x, -----) dr:20.6s (93.8x, -----) ma: 4.0s (18.3x, -----) tinycc valgrind-old:0.22s no: 3.0s (13.7x, 3.2%) me:15.1s (68.5x, 0.4%) ca:29.8s (135.5x, 0.6%) he:28.6s (130.2x, -0.1%) ca:21.5s (97.8x, -0.1%) dr:20.6s (93.5x, 0.3%) ma: 4.0s (18.3x, -0.2%) -- Finished tests in perf ---------------------------------------------- == 11 programs, 154 timings ================= real 110m48.028s user 109m34.225s sys 0m52.511s |
|
From: Rich C. <rc...@wi...> - 2015-03-22 04:30:58
|
valgrind revision: 15032
VEX revision: 3104
C compiler: gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
GDB: GNU gdb (GDB; openSUSE 13.2) 7.8
Assembler: GNU assembler (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1
C library: GNU C Library (GNU libc) stable release version 2.19 (git 9a869d822025)
uname -mrs: Linux 3.16.7-7-desktop x86_64
Vendor version: Welcome to openSUSE 13.2 "Harlequin" - Kernel %r (%t).
Nightly build on rodan ( Linux 3.16.7-7-desktop x86_64 )
Started at 2015-03-21 19:22:01 CDT
Ended at 2015-03-21 23:30:49 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
== 617 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
+ perl perf/vg_perf --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old perf
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
bigcode1 valgrind-new:0.48s no: 7.5s (15.7x, -----) me:15.4s (32.0x, -----) ca:62.1s (129.5x, -----) he: 9.5s (19.8x, -----) ca:18.5s (38.6x, -----) dr: 9.0s (18.8x, -----) ma: 8.8s (18.3x, -----)
bigcode1 valgrind-old:0.48s no: 7.6s (15.8x, -0.3%) me:15.3s (31.9x, 0.3%) ca:62.1s (129.4x, 0.0%) he: 9.5s (19.8x, -0.1%) ca:18.5s (38.6x, 0.1%) dr: 9.0s (18.8x, -0.2%) ma: 8.8s (18.4x, -0.2%)
-- bigcode2 --
bigcode2 valgrind-new:0.49s no:18.2s (37.2x, -----) me:38.9s (79.3x, -----) ca:105.1s (214.6x, -----) he:23.8s (48.6x, -----) ca:34.0s (69.3x, -----) dr:21.5s (43.9x, -----) ma:21.0s (42.8x, -----)
bigcode2 valgrind-old:0.49s no:18.4s (37.4x, -0.6%) me:38.6s (78.9x, 0.6%) ca:104.9s (214.0x, 0.3%) he:23.8s (48.6x, 0.0%) ca:33.9s (69.2x, 0.1%) dr:21.5s (43.9x, -0.0%) ma:21.0s (42.8x, -0.0%)
-- bz2 --
bz2 valgrind-new:2.32s no: 7.7s ( 3.3x, -----) me:25.3s (10.9x, -----) ca:58.1s (25.0x, -----) he:38.6s (16.6x, -----) ca:49.7s (21.4x, -----) dr:53.8s (23.2x, -----) ma: 7.3s ( 3.2x, -----)
bz2 valgrind-old:2.32s no: 7.7s ( 3.3x, -0.3%) me:25.3s (10.9x, -0.2%) ca:58.1s (25.1x, -0.1%) he:38.8s (16.7x, -0.5%) ca:49.7s (21.4x, -0.0%) dr:54.3s (23.4x, -0.8%) ma: 7.3s ( 3.1x, 0.3%)
-- fbench --
fbench valgrind-new:1.44s no: 5.2s ( 3.6x, -----) me:17.7s (12.3x, -----) ca:26.7s (18.5x, -----) he:13.1s ( 9.1x, -----) ca:15.9s (11.1x, -----) dr:13.5s ( 9.4x, -----) ma: 5.4s ( 3.8x, -----)
fbench valgrind-old:1.44s no: 5.2s ( 3.6x, 0.2%) me:17.7s (12.3x, -0.1%) ca:26.6s (18.5x, 0.4%) he:13.1s ( 9.1x, -0.2%) ca:16.0s (11.1x, -0.2%) dr:13.6s ( 9.4x, -0.8%) ma: 5.4s ( 3.8x, -0.4%)
-- ffbench --
ffbench valgrind-new:1.01s no: 3.4s ( 3.4x, -----) me:12.4s (12.2x, -----) ca: 8.0s ( 7.9x, -----) he:21.1s (20.9x, -----) ca:21.0s (20.8x, -----) dr:17.6s (17.4x, -----) ma: 3.4s ( 3.4x, -----)
ffbench valgrind-old:1.01s no: 3.4s ( 3.4x, 0.0%) me:12.4s (12.2x, 0.0%) ca: 8.0s ( 7.9x, 0.0%) he:21.1s (20.9x, -0.4%) ca:21.0s (20.8x, -0.0%) dr:17.5s (17.4x, 0.2%) ma: 3.4s ( 3.4x, 0.3%)
-- heap --
heap valgrind-new:0.42s no: 3.0s ( 7.2x, -----) me:22.1s (52.7x, -----) ca:30.7s (73.2x, -----) he:32.1s (76.4x, -----) ca:15.0s (35.7x, -----) dr:20.4s (48.5x, -----) ma:21.9s (52.0x, -----)
heap valgrind-old:0.42s no: 3.0s ( 7.2x, 0.7%) me:22.1s (52.6x, 0.1%) ca:30.8s (73.3x, -0.1%) he:31.5s (75.0x, 1.8%) ca:15.1s (35.9x, -0.4%) dr:20.0s (47.5x, 2.1%) ma:21.7s (51.7x, 0.6%)
-- heap_pdb4 --
heap_pdb4 valgrind-new:0.55s no: 3.3s ( 6.0x, -----) me:38.0s (69.1x, -----) ca:33.2s (60.3x, -----) he:35.8s (65.2x, -----) ca:17.3s (31.5x, -----) dr:22.9s (41.7x, -----) ma:22.8s (41.5x, -----)
heap_pdb4 valgrind-old:0.55s no: 3.3s ( 6.0x, 0.6%) me:38.0s (69.0x, 0.1%) ca:33.1s (60.2x, 0.2%) he:35.8s (65.1x, 0.1%) ca:17.3s (31.5x, 0.0%) dr:22.6s (41.2x, 1.3%) ma:22.9s (41.6x, -0.2%)
-- many-loss-records --
many-loss-records valgrind-new:0.05s no: 1.0s (20.8x, -----) me: 6.1s (121.6x, -----) ca: 4.8s (95.4x, -----) he: 5.6s (112.6x, -----) ca: 3.0s (60.0x, -----) dr: 5.0s (99.6x, -----) ma: 4.6s (92.2x, -----)
many-loss-records valgrind-old:0.05s no: 1.0s (20.8x, 0.0%) me: 6.1s (122.2x, -0.5%) ca: 4.8s (95.6x, -0.2%) he: 5.6s (112.0x, 0.5%) ca: 3.0s (60.2x, -0.3%) dr: 4.9s (97.6x, 2.0%) ma: 4.7s (93.8x, -1.7%)
-- many-xpts --
many-xpts valgrind-new:0.15s no: 1.3s ( 8.8x, -----) me: 7.3s (48.7x, -----) ca:12.7s (84.9x, -----) he:10.1s (67.6x, -----) ca: 4.1s (27.3x, -----) dr: 6.5s (43.7x, -----) ma: 7.2s (47.7x, -----)
many-xpts valgrind-old:0.15s no: 1.3s ( 8.7x, 0.8%) me: 7.3s (48.9x, -0.4%) ca:12.7s (84.9x, 0.0%) he:10.1s (67.4x, 0.3%) ca: 4.1s (27.3x, 0.0%) dr: 6.4s (42.9x, 1.7%) ma: 7.3s (48.8x, -2.2%)
-- sarp --
sarp valgrind-new:0.11s no: 1.2s (11.4x, -----) me: 9.8s (88.8x, -----) ca: 7.9s (71.6x, -----) he:31.6s (287.7x, -----) ca: 4.3s (39.1x, -----) dr: 4.5s (40.5x, -----) ma: 1.3s (11.9x, -----)
sarp valgrind-old:0.11s no: 1.2s (11.3x, 0.8%) me: 9.8s (88.8x, 0.0%) ca: 7.9s (71.8x, -0.3%) he:31.4s (285.2x, 0.9%) ca: 4.3s (39.2x, -0.2%) dr: 4.4s (39.9x, 1.3%) ma: 1.3s (11.9x, 0.0%)
-- tinycc --
tinycc valgrind-new:0.75s no: 7.4s ( 9.9x, -----) me:38.0s (50.6x, -----) ca:46.5s (62.0x, -----) he:45.3s (60.5x, -----) ca:38.4s (51.1x, -----) dr:37.7s (50.3x, -----) ma:11.6s (15.5x, -----)
tinycc valgrind-old:0.75s no: 7.4s ( 9.9x, 0.0%) me:38.0s (50.7x, -0.2%) ca:46.5s (62.0x, -0.1%) he:45.6s (60.8x, -0.5%) ca:38.4s (51.1x, 0.0%) dr:37.3s (49.8x, 1.1%) ma:11.6s (15.5x, -0.2%)
-- Finished tests in perf ----------------------------------------------
== 11 programs, 154 timings =================
real 152m8.180s
user 150m42.056s
sys 1m21.431s
=================================================
./valgrind-new/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-21 20:10:24.943386619 -0500
+++ hgtls.stdoutB.out 2015-03-21 20:24:00.651290337 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-21 20:10:25.732395218 -0500
+++ err_disable3.stderr.out 2015-03-21 20:28:24.013132248 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-21 20:10:26.565404296 -0500
+++ err_disable4.stderr.out 2015-03-21 20:28:27.165166180 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-21 20:10:26.327401702 -0500
+++ threadname.stderr.out 2015-03-21 20:35:15.515568271 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-21 20:10:26.034398509 -0500
+++ threadname_xml.stderr.out 2015-03-21 20:35:17.855593532 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-21 19:22:16.607373957 -0500
+++ hgtls.stdoutB.out 2015-03-21 19:35:47.398385764 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-21 19:22:17.413382923 -0500
+++ err_disable3.stderr.out 2015-03-21 19:40:08.040278160 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-21 19:22:18.252392255 -0500
+++ err_disable4.stderr.out 2015-03-21 19:40:11.200313227 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-21 19:22:18.012389586 -0500
+++ threadname.stderr.out 2015-03-21 19:47:01.176862518 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-21 19:22:17.716386293 -0500
+++ threadname_xml.stderr.out 2015-03-21 19:47:03.530888638 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: Rich C. <rc...@wi...> - 2015-03-22 03:06:15
|
valgrind revision: 15032
VEX revision: 3104
C compiler: gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
GDB: GNU gdb (GDB; openSUSE 13.2) 7.8
Assembler: GNU assembler (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1
C library: GNU C Library (GNU libc) stable release version 2.19 (git 9a869d822025)
uname -mrs: Linux 3.16.6-2-desktop x86_64
Vendor version: openSUSE 13.2 (Harlequin)
Nightly build on ultra ( gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064] Linux 3.16.6-2-desktop x86_64 )
Started at 2015-03-21 21:30:01 CDT
Ended at 2015-03-21 22:06:04 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
== 617 tests, 6 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
helgrind/tests/hg05_race2 (stderr)
helgrind/tests/tc09_bad_unlock (stderr)
=================================================
./valgrind-new/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-21 21:48:36.084394591 -0500
+++ hgtls.stdoutB.out 2015-03-21 21:53:36.118215655 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-new/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2015-03-21 21:49:32.318862184 -0500
+++ hg05_race2.stderr.out 2015-03-21 22:00:18.800227829 -0500
@@ -26,8 +26,7 @@
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
+ Address 0x........ is on thread #x's stack
----------------------------------------------------------------
@@ -42,8 +41,7 @@
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
+ Address 0x........ is on thread #x's stack
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2015-03-21 21:49:32.341861558 -0500
+++ tc09_bad_unlock.stderr.out 2015-03-21 22:00:48.633413324 -0500
@@ -37,7 +37,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
Address 0x........ is on thread #x's stack
- in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
----------------------------------------------------------------
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-21 21:48:42.477220399 -0500
+++ err_disable3.stderr.out 2015-03-21 21:55:27.921166120 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-21 21:48:48.288061652 -0500
+++ err_disable4.stderr.out 2015-03-21 21:55:28.855140640 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-21 21:48:45.515137620 -0500
+++ threadname.stderr.out 2015-03-21 21:57:30.888810987 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-21 21:48:44.249172117 -0500
+++ threadname_xml.stderr.out 2015-03-21 21:57:31.552792868 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-03-21 21:30:23.326093488 -0500
+++ hgtls.stdoutB.out 2015-03-21 21:36:06.995770922 -0500
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-old/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2015-03-21 21:31:23.114472605 -0500
+++ hg05_race2.stderr.out 2015-03-21 21:42:50.839798054 -0500
@@ -26,8 +26,7 @@
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
+ Address 0x........ is on thread #x's stack
----------------------------------------------------------------
@@ -42,8 +41,7 @@
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
+ Address 0x........ is on thread #x's stack
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2015-03-21 21:31:23.136472008 -0500
+++ tc09_bad_unlock.stderr.out 2015-03-21 21:43:20.541988324 -0500
@@ -37,7 +37,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
Address 0x........ is on thread #x's stack
- in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
----------------------------------------------------------------
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-03-21 21:30:30.300904423 -0500
+++ err_disable3.stderr.out 2015-03-21 21:37:58.925731834 -0500
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-03-21 21:30:39.232662780 -0500
+++ err_disable4.stderr.out 2015-03-21 21:37:59.848706767 -0500
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:46)
- by 0x........: child_fn_2 (err_disable4.c:64)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:81)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-03-21 21:30:35.745756822 -0500
+++ threadname.stderr.out 2015-03-21 21:40:02.681370121 -0500
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-03-21 21:30:33.853807625 -0500
+++ threadname_xml.stderr.out 2015-03-21 21:40:03.351351917 -0500
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: <sv...@va...> - 2015-03-21 20:55:43
|
Author: philippe
Date: Sat Mar 21 20:55:36 2015
New Revision: 15032
Log:
Fix leak : only strdup in SectKind.objname if a SectKind address is returned
Modified:
trunk/coregrind/m_addrinfo.c
Modified: trunk/coregrind/m_addrinfo.c
==============================================================================
--- trunk/coregrind/m_addrinfo.c (original)
+++ trunk/coregrind/m_addrinfo.c Sat Mar 21 20:55:36 2015
@@ -205,10 +205,9 @@
/* -- last ditch attempt at classification -- */
sect = VG_(DebugInfo_sect_kind)( &name, a);
- ai->Addr.SectKind.objname = VG_(strdup)("mc.da.dsname", name);
-
if (sect != Vg_SectUnknown) {
ai->tag = Addr_SectKind;
+ ai->Addr.SectKind.objname = VG_(strdup)("mc.da.dsname", name);
ai->Addr.SectKind.kind = sect;
return;
}
|