|
From: <sv...@va...> - 2015-05-05 20:33:29
|
Author: florian
Date: Tue May 5 21:33:17 2015
New Revision: 15182
Log:
Merge from trunk.
Added:
branches/ASPACEM_TWEAKS/docs/internals/qemu-aarch64-linux-HOWTO.txt
- copied unchanged from r15181, trunk/docs/internals/qemu-aarch64-linux-HOWTO.txt
branches/ASPACEM_TWEAKS/docs/internals/qemu-mips64-linux-HOWTO.txt
- copied unchanged from r15181, trunk/docs/internals/qemu-mips64-linux-HOWTO.txt
Removed:
branches/ASPACEM_TWEAKS/docs/internals/aarch64-linux-on-qemu-HOWTO.txt
Modified:
branches/ASPACEM_TWEAKS/ (props changed)
branches/ASPACEM_TWEAKS/NEWS
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-elf.c
branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-macho.c
branches/ASPACEM_TWEAKS/coregrind/m_debugger.c
branches/ASPACEM_TWEAKS/coregrind/m_debuginfo/debuginfo.c
branches/ASPACEM_TWEAKS/coregrind/m_errormgr.c
branches/ASPACEM_TWEAKS/coregrind/m_execontext.c
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c
branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h
branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-darwin.c
branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_libcassert.c
branches/ASPACEM_TWEAKS/coregrind/m_machine.c
branches/ASPACEM_TWEAKS/coregrind/m_main.c
branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c
branches/ASPACEM_TWEAKS/coregrind/m_scheduler/scheduler.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-darwin.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm64-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips32-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips64-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc32-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc64-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-s390x-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-tilegx-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-darwin.c
branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_signals.c
branches/ASPACEM_TWEAKS/coregrind/m_stacktrace.c
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
branches/ASPACEM_TWEAKS/coregrind/m_threadstate.c
branches/ASPACEM_TWEAKS/coregrind/m_translate.c
branches/ASPACEM_TWEAKS/coregrind/m_transtab.c
branches/ASPACEM_TWEAKS/coregrind/m_xarray.c
branches/ASPACEM_TWEAKS/darwin12.supp
branches/ASPACEM_TWEAKS/docs/Makefile.am
branches/ASPACEM_TWEAKS/drd/tests/Makefile.am
branches/ASPACEM_TWEAKS/exp-bbv/tests/Makefile.am
branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/complex_rep.vgtest
branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/fldcw_check.vgtest
branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/million.vgtest
branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/rep_prefix.vgtest
branches/ASPACEM_TWEAKS/helgrind/hg_main.c
branches/ASPACEM_TWEAKS/helgrind/libhb_core.c
branches/ASPACEM_TWEAKS/include/pub_tool_xarray.h
branches/ASPACEM_TWEAKS/memcheck/mc_translate.c
branches/ASPACEM_TWEAKS/none/tests/libvex_test.c
branches/ASPACEM_TWEAKS/perf/memrw.c
Modified: branches/ASPACEM_TWEAKS/NEWS
==============================================================================
--- branches/ASPACEM_TWEAKS/NEWS (original)
+++ branches/ASPACEM_TWEAKS/NEWS Tue May 5 21:33:17 2015
@@ -157,6 +157,7 @@
345394 Fix memcheck/tests/strchr on OS X
345637 Fix memcheck/tests/sendmsg on OS X
345695 Add POWERPC support for AT_DCACHESIZE and HWCAP2
+345824 Fix aspacem segment mismatch: seen with none/tests/bigcode
345887 Fix an assertion in the address space manager
346267 Compiler warnings for PPC64 code on call to LibVEX_GuestPPC64_get_XER()
and LibVEX_GuestPPC64_get_CR()
@@ -168,6 +169,7 @@
346474 PPC64 Power 8, spr TEXASRU register not supported
346487 Compiler generates "note" about a future ABI change for PPC64
346801 Fix link error on OS X: _vgModuleLocal_sf_maybe_extend_stack
+347151 Fix suppression for pthread_rwlock_init on OS X 10.8
n-i-bz Provide implementations of certain compiler builtins to support
compilers who may not provide those
n-i-bz Old STABS code is still being compiled, but never used. Remove it.
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Tue May 5 21:33:17 2015
@@ -815,8 +815,9 @@
# endif
/* Some kernels on s390 provide 'r' permission even when it was not
- explicitly requested. It seems that 'x' permission implies 'r'. */
-# if defined(VGA_s390x)
+ explicitly requested. It seems that 'x' permission implies 'r'.
+ This behaviour also occurs on OS X. */
+# if defined(VGA_s390x) || defined(VGO_darwin)
sloppyRcheck = True;
# else
sloppyRcheck = False;
Modified: branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-elf.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-elf.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-elf.c Tue May 5 21:33:17 2015
@@ -42,7 +42,6 @@
#include "pub_core_libcproc.h" // VG_(geteuid), VG_(getegid)
#include "pub_core_libcassert.h" // VG_(exit), vg_assert
#include "pub_core_mallocfree.h" // VG_(malloc), VG_(free)
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-macho.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-macho.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_coredump/coredump-macho.c Tue May 5 21:33:17 2015
@@ -33,7 +33,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_coredump.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, ULong max_size)
Modified: branches/ASPACEM_TWEAKS/coregrind/m_debugger.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_debugger.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_debugger.c Tue May 5 21:33:17 2015
@@ -30,7 +30,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h"
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_debuginfo/debuginfo.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_debuginfo/debuginfo.c Tue May 5 21:33:17 2015
@@ -32,7 +32,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_debuginfo.h" /* self */
#include "pub_core_demangle.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_errormgr.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_errormgr.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_errormgr.c Tue May 5 21:33:17 2015
@@ -30,7 +30,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h"
#include "pub_core_threadstate.h" // For VG_N_THREADS
#include "pub_core_debugger.h"
#include "pub_core_debuginfo.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_execontext.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_execontext.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_execontext.c Tue May 5 21:33:17 2015
@@ -36,8 +36,6 @@
#include "pub_core_options.h"
#include "pub_core_stacktrace.h"
#include "pub_core_machine.h" // VG_(get_IP)
-#include "pub_core_vki.h" // To keep pub_core_threadstate.h happy
-#include "pub_core_libcsetjmp.h" // Ditto
#include "pub_core_threadstate.h" // VG_(is_valid_tid)
#include "pub_core_execontext.h" // self
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/m_gdbserver.c Tue May 5 21:33:17 2015
@@ -33,12 +33,9 @@
#include "pub_core_libcproc.h"
#include "pub_core_libcprint.h"
#include "pub_core_mallocfree.h"
-#include "pub_core_libcsetjmp.h"
#include "pub_core_threadstate.h"
#include "pub_core_gdbserver.h"
#include "pub_core_options.h"
-#include "pub_core_libcsetjmp.h"
-#include "pub_core_threadstate.h"
#include "pub_core_transtab.h"
#include "pub_core_hashtable.h"
#include "pub_core_xarray.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.c Tue May 5 21:33:17 2015
@@ -157,7 +157,9 @@
VG_(message)(Vg_DebugMsg,
"------ Valgrind's internal memory use stats follow ------\n" );
VG_(sanity_check_malloc_all)();
- VG_(message)(Vg_DebugMsg, "------\n" );
+ VG_(message)(Vg_DebugMsg,
+ "------ %llu bytes have already been mmap-ed ANONYMOUS.\n",
+ VG_(am_get_anonsize_total)());
VG_(print_all_arena_stats)();
if (VG_(clo_profile_heap))
VG_(print_arena_cc_analysis) ();
@@ -384,7 +386,7 @@
VG_(gdbserver_status_output)();
break;
case 4: /* memory */
- VG_(printf) ("%llu bytes have already been allocated.\n",
+ VG_(printf) ("%llu bytes have already been mmap-ed ANONYMOUS.\n",
VG_(am_get_anonsize_total)());
VG_(print_all_arena_stats) ();
if (VG_(clo_profile_heap))
Modified: branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_gdbserver/server.h Tue May 5 21:33:17 2015
@@ -40,7 +40,6 @@
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
#include "pub_core_options.h"
-#include "pub_core_libcsetjmp.h"
#include "pub_core_threadstate.h"
#include "pub_core_gdbserver.h"
#include "pub_core_vki.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-darwin.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-darwin.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-darwin.c Tue May 5 21:33:17 2015
@@ -47,7 +47,6 @@
#include "pub_core_ume.h"
#include "pub_core_options.h"
#include "pub_core_tooliface.h" /* VG_TRACK */
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" /* ThreadArchState */
#include "priv_initimg_pathscan.h"
#include "pub_core_initimg.h" /* self */
Modified: branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c Tue May 5 21:33:17 2015
@@ -50,7 +50,6 @@
#include "pub_core_syscall.h"
#include "pub_core_signals.h" /* VG_(extend_stack) */
#include "pub_core_tooliface.h" /* VG_TRACK */
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" /* ThreadArchState */
#include "priv_initimg_pathscan.h"
#include "pub_core_initimg.h" /* self */
Modified: branches/ASPACEM_TWEAKS/coregrind/m_libcassert.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_libcassert.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_libcassert.c Tue May 5 21:33:17 2015
@@ -31,7 +31,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_gdbserver.h"
#include "pub_core_aspacemgr.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_machine.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_machine.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_machine.c Tue May 5 21:33:17 2015
@@ -29,7 +29,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h" // setjmp facilities
#include "pub_core_threadstate.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_main.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_main.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_main.c Tue May 5 21:33:17 2015
@@ -31,7 +31,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_mallocfree.c Tue May 5 21:33:17 2015
@@ -38,7 +38,6 @@
#include "pub_core_libcprint.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" // For VG_INVALID_THREADID
#include "pub_core_gdbserver.h"
#include "pub_core_transtab.h"
@@ -759,7 +758,7 @@
"\n"
" Valgrind's memory management: out of memory:\n"
" %s's request for %llu bytes failed.\n"
- " %llu bytes have already been allocated.\n"
+ " %llu bytes have already been mmap-ed ANONYMOUS.\n"
" Valgrind cannot continue. Sorry.\n\n"
" There are several possible reasons for this.\n"
" - You have some kind of memory limit in place. Look at the\n"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_scheduler/scheduler.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_scheduler/scheduler.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_scheduler/scheduler.c Tue May 5 21:33:17 2015
@@ -62,7 +62,6 @@
#include "pub_core_debuglog.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h" // __NR_sched_yield
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_clientstate.h"
#include "pub_core_aspacemgr.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-darwin.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-darwin.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-darwin.c Tue May 5 21:33:17 2015
@@ -34,7 +34,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-amd64-linux.c Tue May 5 21:33:17 2015
@@ -33,7 +33,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm-linux.c Tue May 5 21:33:17 2015
@@ -38,7 +38,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm64-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm64-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-arm64-linux.c Tue May 5 21:33:17 2015
@@ -33,7 +33,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips32-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips32-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips32-linux.c Tue May 5 21:33:17 2015
@@ -34,7 +34,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips64-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips64-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-mips64-linux.c Tue May 5 21:33:17 2015
@@ -34,7 +34,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" /* to keep _threadstate.h happy */
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc32-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc32-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc32-linux.c Tue May 5 21:33:17 2015
@@ -36,7 +36,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc64-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc64-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-ppc64-linux.c Tue May 5 21:33:17 2015
@@ -36,7 +36,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-s390x-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-s390x-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-s390x-linux.c Tue May 5 21:33:17 2015
@@ -33,7 +33,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-tilegx-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-tilegx-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-tilegx-linux.c Tue May 5 21:33:17 2015
@@ -35,7 +35,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-darwin.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-darwin.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-darwin.c Tue May 5 21:33:17 2015
@@ -34,7 +34,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_sigframe/sigframe-x86-linux.c Tue May 5 21:33:17 2015
@@ -33,7 +33,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h" /* find_segment */
#include "pub_core_libcbase.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_signals.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_signals.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_signals.c Tue May 5 21:33:17 2015
@@ -203,7 +203,6 @@
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
#include "pub_core_debuglog.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_stacktrace.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_stacktrace.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_stacktrace.c Tue May 5 21:33:17 2015
@@ -30,7 +30,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_debuginfo.h" // XXX: circular dependency
#include "pub_core_aspacemgr.h" // For VG_(is_addressable)()
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c Tue May 5 21:33:17 2015
@@ -1220,10 +1220,7 @@
and that segment is writable. */
NSegment const * seg2;
- if (VG_(brk_limit) > VG_(brk_base))
- seg2 = VG_(am_find_nsegment)( VG_(brk_limit)-1 );
- else
- seg2 = VG_(am_find_nsegment)( VG_(brk_limit) );
+ seg2 = VG_(am_find_nsegment)( VG_(brk_limit) - 1 );
vg_assert(seg2);
if (seg == seg2 && seg->hasW)
Modified: branches/ASPACEM_TWEAKS/coregrind/m_threadstate.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_threadstate.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_threadstate.c Tue May 5 21:33:17 2015
@@ -30,7 +30,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_mallocfree.h" // VG_(malloc)
#include "pub_core_libcassert.h"
Modified: branches/ASPACEM_TWEAKS/coregrind/m_translate.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_translate.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_translate.c Tue May 5 21:33:17 2015
@@ -53,7 +53,6 @@
#include "pub_core_dispatch.h" // VG_(run_innerloop__dispatch_{un}profiled)
// VG_(run_a_noredir_translation__return_point)
-#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" // VexGuestArchState
#include "pub_core_trampoline.h" // VG_(ppctoc_magic_redirect_return_stub)
Modified: branches/ASPACEM_TWEAKS/coregrind/m_transtab.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_transtab.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_transtab.c Tue May 5 21:33:17 2015
@@ -569,6 +569,7 @@
XArray *var = VG_(newXA)(ttaux_malloc, "transtab.IEA__add",
ttaux_free,
sizeof(InEdge));
+ VG_(hintSizeXA) (var, iea->n_fixed + 1);
UWord i;
for (i = 0; i < iea->n_fixed; i++) {
VG_(addToXA)(var, &iea->edges.fixed[i]);
@@ -649,6 +650,7 @@
XArray *var = VG_(newXA)(ttaux_malloc, "transtab.OEA__add",
ttaux_free,
sizeof(OutEdge));
+ VG_(hintSizeXA) (var, oea->n_fixed+1);
UWord i;
for (i = 0; i < oea->n_fixed; i++) {
VG_(addToXA)(var, &oea->edges.fixed[i]);
Modified: branches/ASPACEM_TWEAKS/coregrind/m_xarray.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_xarray.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_xarray.c Tue May 5 21:33:17 2015
@@ -133,6 +133,24 @@
return ((char*)xa->arr) + n * xa->elemSzB;
}
+void VG_(hintSizeXA) ( XArray* xa, Word n)
+{
+ /* Currently, we support giving a size hint only just after the
+ call to VG_(newXA). So, we could instead have done
+ a function VG_(newXA_with_SizeHint). The separate VG_(hintSizeXA)
+ function is however chosen as we might one day accept to
+ give a size hint after having added elements. That could be useful
+ for reducing the size of an xarray to just the size currently needed
+ or to give a size hint when it is known that a lot more elements
+ are needed or when the final nr of elements is known. */
+ vg_assert(xa);
+ vg_assert(xa->usedsizeE == 0);
+ vg_assert(xa->totsizeE == 0);
+ vg_assert(!xa->arr);
+ xa->arr = xa->alloc_fn(xa->cc, n * xa->elemSzB);
+ xa->totsizeE = n;
+}
+
static inline void ensureSpaceXA ( XArray* xa )
{
if (xa->usedsizeE == xa->totsizeE) {
Modified: branches/ASPACEM_TWEAKS/darwin12.supp
==============================================================================
--- branches/ASPACEM_TWEAKS/darwin12.supp (original)
+++ branches/ASPACEM_TWEAKS/darwin12.supp Tue May 5 21:33:17 2015
@@ -237,6 +237,13 @@
fun:*ImageLoaderMachO*doModInitFunctions*
}
+# See https://bugs.kde.org/show_bug.cgi?id=196528
+{
+ macos-__pthread_rwlock_init-see-our-bug-196528
+ Memcheck:Cond
+ fun:pthread_rwlock_init
+}
+
#########################################################
## Leaks (apparently) in even hello-world style programs
Modified: branches/ASPACEM_TWEAKS/docs/Makefile.am
==============================================================================
--- branches/ASPACEM_TWEAKS/docs/Makefile.am (original)
+++ branches/ASPACEM_TWEAKS/docs/Makefile.am Tue May 5 21:33:17 2015
@@ -30,7 +30,6 @@
internals/3_9_BUGSTATUS.txt \
internals/3_10_BUGSTATUS.txt \
internals/MERGE_3_10_1.txt \
- internals/aarch64-linux-on-qemu-HOWTO.txt
internals/arm_thumb_notes_gdbserver.txt \
internals/avx-notes.txt \
internals/BIG_APP_NOTES.txt \
@@ -48,6 +47,8 @@
internals/porting-HOWTO.txt \
internals/mpi2entries.txt \
internals/porting-to-ARM.txt \
+ internals/qemu-aarch64-linux-HOWTO.txt \
+ internals/qemu-mips64-linux-HOWTO.txt \
internals/register-uses.txt \
internals/release-HOWTO.txt \
internals/segments-seginfos.txt \
Removed: branches/ASPACEM_TWEAKS/docs/internals/aarch64-linux-on-qemu-HOWTO.txt
==============================================================================
--- branches/ASPACEM_TWEAKS/docs/internals/aarch64-linux-on-qemu-HOWTO.txt (original)
+++ branches/ASPACEM_TWEAKS/docs/internals/aarch64-linux-on-qemu-HOWTO.txt (removed)
@@ -1,102 +0,0 @@
-
-How to install and configure a QEMU aarch64-linux installation.
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Last updated 30 April 2015
-
-This gives a fairly usable, and not entirely slow, arm64-linux
-install. It has the advantage that the idle loop works right and so
-when the guest becomes idle, qemu uses only very little host cpu, so
-you can leave the guest idling for long periods without bad
-performance effects on the host.
-
-More or less following
-https://gmplib.org/~tege/qemu.html, section 14 (for arm64)
-
-Build qemu-2.2.1 with --target-list including aarch64-softmmu
-
-mkdir Arm64-2
-cd Arm64-2
-
-wget http://d-i.debian.org/daily-images/arm64/daily/netboot/debian-installer/arm64/linux
-
-wget http://d-i.debian.org/daily-images/arm64/daily/netboot/debian-installer/arm64/initrd.gz
-
-# Note. 6G is easily enough to install debian and do a build of Valgrind.
-# If you envisage needing more space, now is the time to choose a larger
-# number.
-
-/path/to/Qemu221/bin/qemu-img create disk6G.img 6G
-
-/path/to/Qemu221/bin/qemu-system-aarch64 \
- -M virt -cpu cortex-a57 -m 256 \
- -drive file=disk6G.img,if=none,id=blk -device virtio-blk-device,drive=blk \
- -net user,hostfwd=tcp::5555-:22 -device virtio-net-device,vlan=0 \
- -kernel linux \
- -initrd initrd.gz \
- -append "console=ttyAMA0 --" \
- -nographic
-
-Do an install, be as vanilla as possible, allow it to create a user
-"username", and do not ask it to install any extra software. But,
-when you get to here
-
- ââââââââââââââââââââ⤠[!!] Finish the installation ââââââââââââââââââââââ
- â â
- ââ Installation complete â
- ââ Installation is complete, so it is time to boot into your new system. â
- ââ Make sure to remove the installation media (CD-ROM, floppies), so â
- ââ that you boot into the new system rather than restarting the â
- ââ installation. â
- ââ â
- ââ <Go Back> <Continue> â
- â â
- âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
-
-do "Go Back"
-then in the next menu "Execute a shell", "Continue"
-
-This gives you a root shell in the new VM. In that shell:
-
- mount -t proc proc /target/proc
- mount --rbind /sys /target/sys
- mount --rbind /dev /target/dev
- chroot /target bash
- /etc/init.d/ssh start
- mv /boot/initrd.img-3.16.0-4-arm64 /boot/initrd.img-3.16.0-4-arm64
- echo virtio-mmio >>/etc/initramfs-tools/modules
- /usr/sbin/update-initramfs -c -k 3.16.0-4-arm64
-
-Then on the host, copy out the files that the above created.
-
-cd Arm64-2
-ssh -p 5555 username@localhost \
- "tar -c -f - --exclude=lost+found /boot" | tar xf -
-
-Now back in the VM, we can finish the installation.
-
- exit
- exit
- Select "Finish the installation"
- Continue
-
-When it reboots, kill qemu from another shell, else it will try to reinstall.
-
-Now start the installation:
-
-/path/to/Qemu221/bin/qemu-system-aarch64 -M virt \
- -cpu cortex-a57 -m 1024 -drive file=disk6G.img,if=none,id=blk \
- -device virtio-blk-device,drive=blk -net user,hostfwd=tcp::5555-:22 \
- -device virtio-net-device,vlan=0 -kernel boot/vmlinuz-3.16.0-4-arm64 \
- -initrd boot/initrd.img-3.16.0-4-arm64 \
- -append "root=/dev/vda2 rw console=ttyAMA0 --" -nographic
-
-Now you can ssh into the VM and install stuff as usual:
-
-ssh -XC -p 5555 username@localhost
-
- (on the guest)
- become root
- apt-get install make gcc g++ automake autoconf emacs subversion gdb
-
-Hack on, etc.
Modified: branches/ASPACEM_TWEAKS/drd/tests/Makefile.am
==============================================================================
--- branches/ASPACEM_TWEAKS/drd/tests/Makefile.am (original)
+++ branches/ASPACEM_TWEAKS/drd/tests/Makefile.am Tue May 5 21:33:17 2015
@@ -373,7 +373,6 @@
sem_as_mutex \
sem_open \
sigalrm \
- thread_name \
threaded-fork \
trylock \
unit_bitmap \
@@ -417,7 +416,7 @@
if HAVE_PTHREAD_BARRIER
check_PROGRAMS += matinv pth_barrier pth_barrier_race pth_barrier_reinit \
- pth_barrier_thr_cr
+ pth_barrier_thr_cr thread_name
endif
if HAVE_PTHREAD_CREATE_GLIBC_2_0
Modified: branches/ASPACEM_TWEAKS/exp-bbv/tests/Makefile.am
==============================================================================
--- branches/ASPACEM_TWEAKS/exp-bbv/tests/Makefile.am (original)
+++ branches/ASPACEM_TWEAKS/exp-bbv/tests/Makefile.am Tue May 5 21:33:17 2015
@@ -5,8 +5,10 @@
# Platform-specific tests
if VGCONF_ARCHS_INCLUDE_X86
+if !VGCONF_OS_IS_DARWIN
SUBDIRS += x86
endif
+endif
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
SUBDIRS += x86-linux
endif
Modified: branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/complex_rep.vgtest
==============================================================================
--- branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/complex_rep.vgtest (original)
+++ branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/complex_rep.vgtest Tue May 5 21:33:17 2015
@@ -1,3 +1,4 @@
+prereq: test -e complex_rep
prog: complex_rep
vgopts: --interval-size=100000 --bb-out-file=complex_rep.out.bb
cleanup: rm complex_rep.out.bb
Modified: branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/fldcw_check.vgtest
==============================================================================
--- branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/fldcw_check.vgtest (original)
+++ branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/fldcw_check.vgtest Tue May 5 21:33:17 2015
@@ -1,3 +1,4 @@
+prereq: test -e fldcw_check
prog: fldcw_check
vgopts: --interval-size=10000 --bb-out-file=fldcw_check.out.bb
cleanup: rm fldcw_check.out.bb
Modified: branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/million.vgtest
==============================================================================
--- branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/million.vgtest (original)
+++ branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/million.vgtest Tue May 5 21:33:17 2015
@@ -1,4 +1,5 @@
-prog: million
+prereq: test -e million
+prog: million
vgopts: --interval-size=100000 --bb-out-file=million.out.bb --pc-out-file=million.out.pc
post: cat million.out.bb
cleanup: rm million.out.bb million.out.pc
Modified: branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/rep_prefix.vgtest
==============================================================================
--- branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/rep_prefix.vgtest (original)
+++ branches/ASPACEM_TWEAKS/exp-bbv/tests/x86/rep_prefix.vgtest Tue May 5 21:33:17 2015
@@ -1,3 +1,4 @@
+prereq: test -e rep_prefix
prog: rep_prefix
vgopts: --interval-size=100000 --bb-out-file=rep_prefix.out.bb
cleanup: rm rep_prefix.out.bb
Modified: branches/ASPACEM_TWEAKS/helgrind/hg_main.c
==============================================================================
--- branches/ASPACEM_TWEAKS/helgrind/hg_main.c (original)
+++ branches/ASPACEM_TWEAKS/helgrind/hg_main.c Tue May 5 21:33:17 2015
@@ -3420,11 +3420,6 @@
* sizeof(Bool) );
// univ_laog_seen[*] set to 0 (False) by zalloc.
- if (VG_(clo_stats))
- VG_(message)(Vg_DebugMsg,
- "univ_laog_do_GC enter cardinality %'10d\n",
- (Int)univ_laog_cardinality);
-
VG_(initIterFM)( laog );
links = NULL;
while (VG_(nextIterFM)( laog, NULL, (UWord*)&links )) {
@@ -3482,8 +3477,8 @@
if (VG_(clo_stats))
VG_(message)
(Vg_DebugMsg,
- "univ_laog_do_GC exit seen %'8d next gc at cardinality %'10d\n",
- (Int)seen, next_gc_univ_laog);
+ "univ_laog_do_GC cardinality entered %d exit %d next gc at %d\n",
+ (Int)univ_laog_cardinality, (Int)seen, next_gc_univ_laog);
}
Modified: branches/ASPACEM_TWEAKS/helgrind/libhb_core.c
==============================================================================
--- branches/ASPACEM_TWEAKS/helgrind/libhb_core.c (original)
+++ branches/ASPACEM_TWEAKS/helgrind/libhb_core.c Tue May 5 21:33:17 2015
@@ -2541,19 +2541,23 @@
If .vts == NULL, then this entry is not in use, so:
- .rc == 0
- this entry is on the freelist (unfortunately, does not imply
- any constraints on value for .freelink)
+ any constraints on value for u.freelink)
If .vts != NULL, then this entry is in use:
- .vts is findable in vts_set
- .vts->id == this entry number
- no specific value for .rc (even 0 is OK)
- - this entry is not on freelist, so .freelink == VtsID_INVALID
+ - this entry is not on freelist, so u.freelink == VtsID_INVALID
*/
typedef
struct {
VTS* vts; /* vts, in vts_set */
UWord rc; /* reference count - enough for entire aspace */
- VtsID freelink; /* chain for free entries, VtsID_INVALID at end */
- VtsID remap; /* used only during pruning */
+ union {
+ VtsID freelink; /* chain for free entries, VtsID_INVALID at end */
+ VtsID remap; /* used only during pruning, for used entries */
+ } u;
+ /* u.freelink only used when vts == NULL,
+ u.remap only used when vts != NULL, during pruning. */
}
VtsTE;
@@ -2583,8 +2587,8 @@
VtsTE* ie = VG_(indexXA)( vts_tab, ii );
tl_assert(ie->vts == NULL);
tl_assert(ie->rc == 0);
- tl_assert(ie->freelink == VtsID_INVALID);
- ie->freelink = vts_tab_freelist;
+ tl_assert(ie->u.freelink == VtsID_INVALID);
+ ie->u.freelink = vts_tab_freelist;
vts_tab_freelist = ii;
}
@@ -2600,7 +2604,7 @@
ie = VG_(indexXA)( vts_tab, ii );
tl_assert(ie->vts == NULL);
tl_assert(ie->rc == 0);
- vts_tab_freelist = ie->freelink;
+ vts_tab_freelist = ie->u.freelink;
return ii;
}
@@ -2615,8 +2619,7 @@
return ii;
te.vts = NULL;
te.rc = 0;
- te.freelink = VtsID_INVALID;
- te.remap = VtsID_INVALID;
+ te.u.freelink = VtsID_INVALID;
ii = (VtsID)VG_(addToXA)( vts_tab, &te );
return ii;
}
@@ -2669,7 +2672,7 @@
VtsTE* ie = VG_(indexXA)( vts_tab, ii );
ie->vts = in_tab;
ie->rc = 0;
- ie->freelink = VtsID_INVALID;
+ ie->u.freelink = VtsID_INVALID;
in_tab->id = ii;
return ii;
}
@@ -2717,7 +2720,7 @@
old_id = *ii;
old_te = VG_(indexXA)( old_tab, old_id );
old_te->rc--;
- new_id = old_te->remap;
+ new_id = old_te->u.remap;
new_te = VG_(indexXA)( new_tab, new_id );
new_te->rc++;
*ii = new_id;
@@ -2793,7 +2796,7 @@
VTS__delete(te->vts);
te->vts = NULL;
/* and finally put this entry on the free list */
- tl_assert(te->freelink == VtsID_INVALID); /* can't already be on it */
+ tl_assert(te->u.freelink == VtsID_INVALID); /* can't already be on it */
add_to_free_list( i );
nFreed++;
}
@@ -2857,10 +2860,10 @@
verydead_thread_table_sort_and_check (verydead_thread_table_not_pruned);
/* We will run through the old table, and create a new table and
- set, at the same time setting the .remap entries in the old
+ set, at the same time setting the u.remap entries in the old
table to point to the new entries. Then, visit every VtsID in
the system, and replace all of them with new ones, using the
- .remap entries in the old table. Finally, we can delete the old
+ u.remap entries in the old table. Finally, we can delete the old
table and set. */
XArray* /* of VtsTE */ new_tab
@@ -2898,13 +2901,13 @@
/* For each old VTS .. */
VtsTE* old_te = VG_(indexXA)( vts_tab, i );
VTS* old_vts = old_te->vts;
- tl_assert(old_te->remap == VtsID_INVALID);
/* Skip it if not in use */
if (old_te->rc == 0) {
tl_assert(old_vts == NULL);
continue;
}
+ tl_assert(old_te->u.remap == VtsID_INVALID);
tl_assert(old_vts != NULL);
tl_assert(old_vts->id == i);
tl_assert(old_vts->ts != NULL);
@@ -2960,8 +2963,7 @@
VtsTE new_te;
new_te.vts = new_vts;
new_te.rc = 0;
- new_te.freelink = VtsID_INVALID;
- new_te.remap = VtsID_INVALID;
+ new_te.u.freelink = VtsID_INVALID;
Word j = VG_(addToXA)( new_tab, &new_te );
tl_assert(j <= i);
tl_assert(j == new_VtsID_ctr - 1);
@@ -2969,7 +2971,7 @@
nAfterPruning++;
nSTSsAfter += new_vts->usedTS;
}
- old_te->remap = new_vts->id;
+ old_te->u.remap = new_vts->id;
} /* for (i = 0; i < nTab; i++) */
@@ -2989,12 +2991,12 @@
}
/* At this point, we have:
- * the old VTS table, with its .remap entries set,
+ * the old VTS table, with its u.remap entries set,
and with all .vts == NULL.
* the old VTS tree should be empty, since it and the old VTSs
it contained have been incrementally deleted was we worked
through the old table.
- * the new VTS table, with all .rc == 0, all .freelink and .remap
+ * the new VTS table, with all .rc == 0, all u.freelink and u.remap
== VtsID_INVALID.
* the new VTS tree.
*/
@@ -3009,7 +3011,7 @@
Nowhere else, AFAICS. Not in the zsm cache, because that just
got invalidated.
- Using the .remap fields in vts_tab, map each old VtsID to a new
+ Using the u.remap fields in vts_tab, map each old VtsID to a new
VtsID. For each old VtsID, dec its rc; and for each new one,
inc it. This sets up the new refcounts, and it also gives a
cheap sanity check of the old ones: all old refcounts should be
@@ -3080,8 +3082,7 @@
VtsTE* te = VG_(indexXA)( vts_tab, i );
tl_assert(te->vts == NULL);
/* This is the assert proper. Note we're also asserting
- zeroness for old entries which are unmapped (hence have
- .remap == VtsID_INVALID). That's OK. */
+ zeroness for old entries which are unmapped. That's OK. */
tl_assert(te->rc == 0);
}
@@ -3123,8 +3124,8 @@
tl_assert(te->vts);
tl_assert(te->vts->id == i);
tl_assert(te->rc > 0); /* 'cos we just GC'd */
- tl_assert(te->freelink == VtsID_INVALID); /* in use */
- tl_assert(te->remap == VtsID_INVALID); /* not relevant */
+ tl_assert(te->u.freelink == VtsID_INVALID); /* in use */
+ /* value of te->u.remap not relevant */
}
/* And we're done. Bwahahaha. Ha. Ha. Ha. */
@@ -6075,6 +6076,7 @@
stats__vts_set__focaa, stats__vts_set__focaa_a );
VG_(printf)( " libhb: VTSops: indexAt_SLOW %'lu\n",
stats__vts__indexat_slow );
+ show_vts_stats ("libhb stats");
VG_(printf)("%s","\n");
VG_(printf)(
Modified: branches/ASPACEM_TWEAKS/include/pub_tool_xarray.h
==============================================================================
--- branches/ASPACEM_TWEAKS/include/pub_tool_xarray.h (original)
+++ branches/ASPACEM_TWEAKS/include/pub_tool_xarray.h Tue May 5 21:33:17 2015
@@ -104,6 +104,13 @@
/* How elements are there in this XArray now? */
extern Word VG_(sizeXA) ( const XArray* );
+/* If you know how many elements an XArray will have, you can
+ optimise memory usage and number of reallocation needed
+ to insert these elements. The call to VG_(hintSizeXA) must be
+ done just after the call to VG_(newXA), before any element
+ has been inserted. */
+extern void VG_(hintSizeXA) ( XArray*, Word);
+
/* Index into the XArray. Checks bounds and bombs if the index is
invalid. What this returns is the address of the specified element
in the array, not (of course) the element itself. Note that the
Modified: branches/ASPACEM_TWEAKS/memcheck/mc_translate.c
==============================================================================
--- branches/ASPACEM_TWEAKS/memcheck/mc_translate.c (original)
+++ branches/ASPACEM_TWEAKS/memcheck/mc_translate.c Tue May 5 21:33:17 2015
@@ -6303,6 +6303,7 @@
mce.tmpMap = VG_(newXA)( VG_(malloc), "mc.MC_(instrument).1", VG_(free),
sizeof(TempMapEnt));
+ VG_(hintSizeXA) (mce.tmpMap, sb_in->tyenv->types_used);
for (i = 0; i < sb_in->tyenv->types_used; i++) {
TempMapEnt ent;
ent.kind = Orig;
Modified: branches/ASPACEM_TWEAKS/none/tests/libvex_test.c
==============================================================================
--- branches/ASPACEM_TWEAKS/none/tests/libvex_test.c (original)
+++ branches/ASPACEM_TWEAKS/none/tests/libvex_test.c Tue May 5 21:33:17 2015
@@ -1,6 +1,10 @@
#include <stdio.h>
#include <stdlib.h>
+# if !defined(VGO_darwin)
#include <endian.h>
+# else
+#include <machine/endian.h>
+# endif
#include "../../VEX/pub/libvex.h"
Bool return_false(void*cb, Addr ad)
Modified: branches/ASPACEM_TWEAKS/perf/memrw.c
==============================================================================
--- branches/ASPACEM_TWEAKS/perf/memrw.c (original)
+++ branches/ASPACEM_TWEAKS/perf/memrw.c Tue May 5 21:33:17 2015
@@ -19,42 +19,44 @@
// model e.g. multiple threads, many different stack traces touching
// the memory, better working set distribution, ...
-static int nr_mb = 0; // total nr of mb used by the program
-static int nr_mb_ws = 0; // nr_mb in program working set
-static int nr_loops = 0; // nr of loops reading or writing the ws
+static int sz_b; // size of a block
+static int nr_b; // total nr of blocks used by the program
+static int nr_b_ws; // nr_b in program working set
+static int nr_loops; // nr of loops reading or writing the ws
static int nr_thr; // nr of threads (hardcoded to 1 currently)
+static int nr_repeat; // nr of times we will allocate, use, then free total+ws
-// Note: the total nr of mb is what is explicitely allocated.
+// Note: the total nr of MB is what is explicitely allocated.
// On top of that, we have the stacks, local vars, lib vars, ...
-// The working set is just the first nr_mb_ws of nr_mb.
+// The working set is just the first nr_b_ws blocks of nr_b.
static int verbose = 0;
-static unsigned char **mb;
+static unsigned char **t_b; // Pointers to all blocks
static void *memrw_fn(void *v)
{
int loops, m, b;
- int write;
+ int dowrite;
int differs = 0;
unsigned char prev = 0;
for (loops = 0; loops < nr_loops; loops++) {
- // printf("loop %d write %d\n", loops, write);
+ // printf("loop %d dowrite %d\n", loops, dowrite);
// Note: in case of multiple threads, we will have
// to add lock/unlock somewhere in the below, maybe to lock
// the MB we are reading or writing.
- for (m = 0; m < nr_mb_ws; m++) {
- for (b = 0; b < 1024 * 1024; b++) {
- write = b % 5 == 0;
+ for (m = 0; m < nr_b_ws; m++) {
+ for (b = 0; b < sz_b; b++) {
+ dowrite = b % 5 == 0;
// Do some write or read operations.
- if (write) {
- if (mb[m][b] < 255)
- mb[m][b] += differs;
+ if (dowrite) {
+ if (t_b[m][b] < 255)
+ t_b[m][b] += differs;
else
- mb[m][b] = 0;
+ t_b[m][b] = 0;
} else {
- differs = mb[m][b] != prev;
- prev = mb[m][b];
+ differs = t_b[m][b] != prev;
+ prev = t_b[m][b];
}
}
}
@@ -67,62 +69,80 @@
int a;
int ret;
int i;
+ int r;
pthread_t thr;
- // usage: memrw [-t nr_mb default 10] [-w nr_mb_ws default 10]
+ // usage: memrw [-b blocksize default 1MB ]
+ // [-t nr_b default 10] [-w nr_b_ws default 10]
// [-l nr_loops_on_ws default 3]
+ // [-r nr_repeat default 1]
// [-f fan_out default 0]
// [-v verbosity default 0]
- nr_mb = 10;
- nr_mb_ws = 10;
+ sz_b = 1024 * 1024;
+ nr_b = 10;
+ nr_b_ws = 10;
nr_loops = 3;
+ nr_repeat = 1;
verbose = 0;
for (a = 1; a < argc; a+=2) {
- if (strcmp(argv[a], "-t") == 0) {
- nr_mb = atoi(argv[a+1]);
+ if (strcmp(argv[a], "-b") == 0) {
+ sz_b = atoi(argv[a+1]);
+ } else if (strcmp(argv[a], "-t") == 0) {
+ nr_b = atoi(argv[a+1]);
} else if (strcmp(argv[a], "-w") == 0) {
- nr_mb_ws = atoi(argv[a+1]);
+ nr_b_ws = atoi(argv[a+1]);
} else if (strcmp(argv[a], "-l") == 0) {
nr_loops = atoi(argv[a+1]);
+ } else if (strcmp(argv[a], "-r") == 0) {
+ nr_repeat = atoi(argv[a+1]);
} else if (strcmp(argv[a], "-v") == 0) {
verbose = atoi(argv[a+1]);
} else {
printf("unknown arg %s\n", argv[a]);
}
}
- if (nr_mb_ws > nr_mb)
- nr_mb_ws = nr_mb; // to make it easy to do loops combining values
+ if (nr_b_ws > nr_b)
+ nr_b_ws = nr_b; // to make it easy to do loops combining values
nr_thr = 1;
printf ("total program memory -t %d MB"
- " working set -w %d MB"
- " working set R or W -l %d times"
- "\n",
- nr_mb,
- nr_mb_ws,
- nr_loops);
-
- printf ("creating and initialising the total program memory\n");
- mb = malloc(nr_mb * sizeof(char*));
- if (mb == NULL)
- perror("malloc mb");
- for (i = 0; i < nr_mb; i++) {
- mb[i] = calloc(1024*1024, 1);
- if (mb[i] == NULL)
- perror("malloc mb[i]");
+ " working set -w %d MB\n",
+ (nr_b * sz_b) / (1024*1024),
+ (nr_b_ws * sz_b) / (1024*1024));
+ printf (" working set R or W -l %d times"
+ " repeat the whole stuff -r %d times\n",
+ nr_loops,
+ nr_repeat);
+
+ for (r = 0; r < nr_repeat; r++) {
+ printf ("creating and initialising the total program memory\n");
+ t_b = malloc(nr_b * sizeof(char*));
+ if (t_b == NULL)
+ perror("malloc t_b");
+ for (i = 0; i < nr_b; i++) {
+ t_b[i] = calloc(sz_b, 1);
+ if (t_b[i] == NULL)
+ perror("malloc t_b[i]");
+ }
+
+ printf("starting thread that will read or write the working set\n");
+ ret = pthread_create(&thr, NULL, memrw_fn, &nr_thr);
+ if (ret != 0)
+ perror("pthread_create");
+ printf("waiting for thread termination\n");
+
+ ret = pthread_join(thr, NULL);
+ if (ret != 0)
+ perror("pthread_join");
+ printf("thread terminated\n");
+
+ /* Now, free the memory used, for the next repeat */
+ for (i = 0; i < nr_b; i++)
+ free (t_b[i]);
+ free (t_b);
+ printf("memory freed\n");
}
- printf("starting thread that will read or write the working set\n");
- ret = pthread_create(&thr, NULL, memrw_fn, &nr_thr);
- if (ret != 0)
- perror("pthread_create");
- printf("waiting for thread termination\n");
-
- ret = pthread_join(thr, NULL);
- if (ret != 0)
- perror("pthread_join");
- printf("thread terminated\n");
-
return 0;
}
|