History log of /external/valgrind/lackey/lk_main.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ed39800a83baf5bffbe391f3974eb2af0f415f80 21-Jun-2017 Elliott Hughes <enh@google.com> Upgrade to valgrind 3.13.0 (15 June 2017).

Release 3.13.0 (15 June 2017)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.13.0 is a feature release with many improvements and the usual collection of
bug fixes.

This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux,
PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux,
MIPS64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android,
X86/Solaris, AMD64/Solaris and AMD64/MacOSX 10.12.

* ==================== CORE CHANGES ===================

* The translation cache size has been increased to keep up with the demands of
large applications. The maximum number of sectors has increased from 24 to
48. The default number of sectors has increased from 16 to 32 on all
targets except Android, where the increase is from 6 to 12.

* The amount of memory that Valgrind can use has been increased from 64GB to
128GB. In particular this means your application can allocate up to about
60GB when running on Memcheck.

* Valgrind's default load address has been changed from 0x3800'0000 to
0x5800'0000, so as to make it possible to load larger executables. This
should make it possible to load executables of size at least 1200MB.

* A massive spaceleak caused by reading compressed debuginfo files has been
fixed. Valgrind should now be entirely usable with gcc-7.0 "-gz" created
debuginfo.

* The C++ demangler has been updated.

* Support for demangling Rust symbols has been added.

* A new representation of stack traces, the "XTree", has been added. An XTree
is a tree of stacktraces with data associated with the stacktraces. This is
used by various tools (Memcheck, Helgrind, Massif) to report on the heap
consumption of your program. Reporting is controlled by the new options
--xtree-memory=none|allocs|full and --xtree-memory-file=<file>.

A report can also be produced on demand using the gdbserver monitor command
'xtmemory [<filename>]>'. The XTree can be output in 2 formats: 'callgrind
format' and 'massif format. The existing visualisers for these formats (e.g.
callgrind_annotate, KCachegrind, ms_print) can be used to visualise and
analyse these reports.

Memcheck can also produce XTree leak reports using the Callgrind file
format. For more details, see the user manual.

* ================== PLATFORM CHANGES =================

* ppc64: support for ISA 3.0B and various fixes for existing 3.0 support

* amd64: fixes for JIT failure problems on long AVX2 code blocks

* amd64 and x86: support for CET prefixes has been added

* arm32: a few missing ARMv8 instructions have been implemented

* arm64, mips64, mips32: an alternative implementation of Load-Linked and
Store-Conditional instructions has been added. This is to deal with
processor implementations that implement the LL/SC specifications strictly
and as a result cause Valgrind to hang in certain situations. The
alternative implementation is automatically enabled at startup, as required.
You can use the option --sim-hints=fallback-llsc to force-enable it if you
want.

* Support for OSX 10.12 has been improved.

* On Linux, clone handling has been improved to honour CLONE_VFORK that
involves a child stack. Note however that CLONE_VFORK | CLONE_VM is handled
like CLONE_VFORK (by removing CLONE_VM), so applications that depend on
CLONE_VM exact semantics will (still) not work.

* The TileGX/Linux port has been removed because it appears to be both unused
and unsupported.

* ==================== TOOL CHANGES ====================

* Memcheck:

- Memcheck should give fewer false positives when running optimised
Clang/LLVM generated code.

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- New command line options --xtree-leak=no|yes and --xtree-leak-file=<file>
to produce the end of execution leak report in a xtree callgrind format
file.

- New option 'xtleak' in the memcheck leak_check monitor command, to produce
the leak report in an xtree file.

* Massif:

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- For some workloads (typically, for big applications), Massif memory
consumption and CPU consumption has decreased significantly.

* Helgrind:

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- addition of client request VALGRIND_HG_GNAT_DEPENDENT_MASTER_JOIN, useful
for Ada gnat compiled applications.

* ==================== OTHER CHANGES ====================

* For Valgrind developers: in an outer/inner setup, the outer Valgrind will
append the inner guest stacktrace to the inner host stacktrace. This helps
to investigate the errors reported by the outer, when they are caused by the
inner guest program (such as an inner regtest). See README_DEVELOPERS for
more info.

* To allow fast detection of callgrind files by desktop environments and file
managers, the format was extended to have an optional first line that
uniquely identifies the format ("# callgrind format"). Callgrind creates
this line now, as does the new xtree functionality.

* File name template arguments (such as --log-file, --xtree-memory-file, ...)
have a new %n format letter that is replaced by a sequence number.

* "--version -v" now shows the SVN revision numbers from which Valgrind was
built.

* ==================== FIXED BUGS ====================

The following bugs have been fixed or resolved. Note that "n-i-bz"
stands for "not in bugzilla" -- that is, a bug that was reported to us
but never got a bugzilla entry. We encourage you to file bugs in
bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.

To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed below.

162848 --log-file output isn't split when a program forks
340777 Illegal instruction on mips (ar71xx)
341481 MIPS64: Iop_CmpNE32 triggers false warning on MIPS64 platforms
342040 Valgrind mishandles clone with CLONE_VFORK | CLONE_VM that clones
to a different stack.
344139 x86 stack-seg overrides, needed by the Wine people
344524 store conditional of guest applications always fail - observed on
Octeon3(MIPS)
348616 Wine/valgrind: noted but unhandled ioctl 0x5390 [..] (DVD_READ_STRUCT)
352395 Please provide SVN revision info in --version -v
352767 Wine/valgrind: noted but unhandled ioctl 0x5307 [..] (CDROMSTOP)
356374 Assertion 'DRD_(g_threadinfo)[tid].pt_threadid !=
INVALID_POSIX_THREADID' failed
358213 helgrind/drd bar_bad testcase hangs or crashes with new glibc pthread
barrier implementation
358697 valgrind.h: Some code remains even when defining NVALGRIND
359202 Add musl libc configure/compile
360415 amd64 instructions ADCX and ADOX are not implemented in VEX
== 372828 (vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10)
360429 unhandled ioctl 0x530d with no size/direction hints (CDROMREADMODE1)
362223 assertion failed when .valgrindrc is a directory instead of a file
367543 bt/btc/btr/bts x86/x86_64 instructions are poorly-handled wrt flags
367942 Segfault vgPlain_do_sys_sigaction (m_signals.c:1138)
368507 can't malloc chunks larger than about 34GB
368529 Android arm target link error, missing atexit and pthread_atfork
368863 WARNING: unhandled arm64-linux syscall: 100 (get_robust_list)
368865 WARNING: unhandled arm64-linux syscall: 272 (kcmp)
368868 disInstr(arm64): unhandled instruction 0xD53BE000 = cntfrq_el0 (ARMv8)
368917 WARNING: unhandled arm64-linux syscall: 218 (request_key)
368918 WARNING: unhandled arm64-linux syscall: 127 (sched_rr_get_interval)
368922 WARNING: unhandled arm64-linux syscall: 161 (sethostname)
368924 WARNING: unhandled arm64-linux syscall: 84 (sync_file_range)
368925 WARNING: unhandled arm64-linux syscall: 130 (tkill)
368926 WARNING: unhandled arm64-linux syscall: 97 (unshare)
369459 valgrind on arm64 violates the ARMv8 spec (ldxr/stxr)
370028 Reduce the number of compiler warnings on MIPS platforms
370635 arm64 missing syscall getcpu
371225 Fix order of timer_{gettime,getoverrun,settime} syscalls on arm64
371227 Clean AArch64 syscall table
371412 Rename wrap_sys_shmat to sys_shmat like other wrappers
371471 Valgrind complains about non legit memory leaks on placement new (C++)
371491 handleAddrOverrides() is [incorrect] when ASO prefix is used
371503 disInstr(arm64): unhandled instruction 0xF89F0000
371869 support '%' in symbol Z-encoding
371916 execution tree xtree concept
372120 c++ demangler demangles symbols which are not c++
372185 Support of valgrind on ARMv8 with 32 bit executable
372188 vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10 0x10 0x48 (PCMPxSTRx $0x10)
372195 Power PC, xxsel instruction is not always recognized.
372504 Hanging on exit_group
372600 process loops forever when fatal signals are arriving quickly
372794 LibVEX (arm32 front end): 'Assertion szBlg2 <= 3' failed
373046 Stacks registered by core are never deregistered
373069 memcheck/tests/leak_cpp_interior fails with GCC 5.1+
373086 Implement additional Xen hypercalls
373192 Calling posix_spawn in glibc 2.24 completely broken
373488 Support for fanotify API on ARM64 architecture
== 368864 WARNING: unhandled arm64-linux syscall: 262 (fanotify_init)
373555 Rename BBPTR to GSPTR as it denotes guest state pointer only
373938 const IRExpr arguments for matchIRExpr()
374719 some spelling fixes
374963 increase valgrind's load address to prevent mmap failure
375514 valgrind_get_tls_addr() does not work in case of static TLS
375772 +1 error in get_elf_symbol_info() when computing value of 'hi' address
for ML_(find_rx_mapping)()
375806 Test helgrind/tests/tc22_exit_w_lock fails with glibc 2.24
375839 Temporary storage exhausted, with long sequence of vfmadd231ps insns
== 377159 "vex: the `impossible' happened" still present
== 375150 Assertion 'tres.status == VexTransOK' failed
== 378068 valgrind crashes on AVX2 function in FFmpeg
376142 Segfaults on MIPS Cavium Octeon boards
376279 disInstr(arm64): unhandled instruction 0xD50320FF
376455 Solaris: unhandled syscall lgrpsys(180)
376518 Solaris: unhandled fast trap getlgrp(6)
376611 ppc64 and arm64 don't know about prlimit64 syscall
376729 PPC64, remove R2 from the clobber list
== 371668
376956 syswrap of SNDDRV and DRM_IOCTL_VERSION causing some addresses
to be wrongly marked as addressable
377066 Some Valgrind unit tests fail to compile on Ubuntu 16.10 with
PIE enabled by default
377376 memcheck/tests/linux/getregset fails with glibc2.24
377427 PPC64, lxv instruction failing on odd destination register
377478 PPC64: ISA 3.0 setup fixes
377698 Missing memory check for futex() uaddr arg for FUTEX_WAKE
and FUTEX_WAKE_BITSET, check only 4 args for FUTEX_WAKE_BITSET,
and 2 args for FUTEX_TRYLOCK_PI
377717 Fix massive space leak when reading compressed debuginfo sections
377891 Update Xen 4.6 domctl wrappers
377930 fcntl syscall wrapper is missing flock structure check
378524 libvexmultiarch_test regression on s390x and ppc64
378535 Valgrind reports INTERNAL ERROR in execve syscall wrapper
378673 Update libiberty demangler
378931 Add ISA 3.0B additional isnstructions, add OV32, CA32 setting support
379039 syscall wrapper for prctl(PR_SET_NAME) must not check more than 16 bytes
379094 Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper
379371 UNKNOWN task message [id 3444, to mach_task_self(), reply 0x603]
(task_register_dyld_image_infos)
379372 UNKNOWN task message [id 3447, to mach_task_self(), reply 0x603]
(task_register_dyld_shared_cache_image_info)
379390 unhandled syscall: mach:70 (host_create_mach_voucher_trap)
379473 MIPS: add support for rdhwr cycle counter register
379504 remove TileGX/Linux port
379525 Support more x86 nop opcodes
379838 disAMode(x86): not an addr!
379703 PC ISA 3.0 fixes: stxvx, stxv, xscmpexpdp instructions
379890 arm: unhandled instruction: 0xEBAD 0x1B05 (sub.w fp, sp, r5, lsl #4)
379895 clock_gettime does not execute POST syscall wrapper
379925 PPC64, mtffs does not set the FPCC and C bits in the FPSCR correctly
379966 WARNING: unhandled amd64-linux syscall: 313 (finit_module)
380200 xtree generated callgrind files refer to files without directory name
380202 Assertion failure for cache line size (cls == 64) on aarch64.
380397 s390x: __GI_strcspn() replacement needed
n-i-bz Fix pub_tool_basics.h build issue with g++ 4.4.7.

(3.13.0.RC1: 2 June 2017, vex r3386, valgrind r16434)
(3.13.0.RC2: 9 June 2017, vex r3389, valgrind r16443)
(3.13.0: 14 June 2017, vex r3396, valgrind r16446)

Bug: N/A
Test: manual
Change-Id: Id4498a49f462c3689cbcb35c15f96a8c7e3cea17
/external/valgrind/lackey/lk_main.c
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
866862a87a06a70e2e0c0d7e5c773e252db8ecdd 13-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix BZ #116002.
Left justification of strings in myvprintf_str was mixed up.
Now fixed and %s formats changed accordingly.
In function myvprintf_int64: the local buffer was not large
enough to hold ULONG_MAX in binary notation. Numbers were
truncated at 39 digits.
Testcases added.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14808 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
227a1ecca7f44cb07e74aa8f1bd24b29df629499 12-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add limited support for printing floating point numbers to
VG_(debugLog_vprintf).
Remove function VG_(percentify) and fix up its call sites (part of
fixing BZ #337869.
Allow the width in a format specification to be '*', i.e. the width is
given as an additional function argument.

The limitations for printing floating point numbers are:
(1) %f is the only supported format. Width and precision can be
specified.
(2) Funny numbers (NaN and such) are not supported.
(3) Floating point numbers need to be benign in the sense that their
integral part fits into an ULong.
This is good enough for our purposes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
46cc04521acf2827eb33310fadc119bf2dc039e4 25-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r14202 from the BUF_REMOVAL branch to trunk.
This patch changes the interface and behaviour of VG_(demangle) and
VG_(maybe_Z_demangle). Instead of copying the demangled name into a
fixed sized buffer that is passed in from the caller (HChar *buf, Int n_buf),
the demangling functions will now return a pointer to the full-length
demangled name (HChar **result). It is the caller's responsiblilty to
make a copy if needed.

This change in function parameters ripples upward
- first: to get_sym_name
- then to the convenience wrappers
- VG_(get_fnname)
- VG_(get_fnname_w_offset)
- VG_(get_fnname_if_entry)
- VG_(get_fnname_raw)
- VG_(get_fnname_no_cxx_demangle)
- VG_(get_datasym_and_offset)

The changes in foComplete then forces the arguments of
- VG_(get_objname) to be changed as well

There are some issues regarding the ownership and persistence of
character strings to consider.
In general, the returned character string is owned by "somebody else"
which means the caller must not free it. Also, the caller must not
modify the returned string as it possibly points to read only memory.
Additionally, the returned string is not necessarily persistent. Here are
the scenarios:
- the returned string is a demangled function name in which case the
memory holding the string will be freed when the demangler is called again.
- the returned string hangs off of a DebugInfo structure in which case
it will be freed when the DebugInfo is discarded
- the returned string hangs off of a segment in the address space manager
in which case it may be overwritten when the segment is merged with
another segment
So the rule of thunb here is: if in doubt strdup the string.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14664 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
3c0c94777f547bcb5eadbe8cb4328debf0f51875 24-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Ripple from constifying parameters of instrumentation functions and
callbacks from VexTranslateArgs. See VEX r2958.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14564 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
cd70d499366ac80ba0e8fc677a1dd92860a7d309 17-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix type2index. It did not handle decimal floating point types.
nameOfTypeIndex likewise.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14546 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
5686b2d7e97a6f65e436531dac999a52a3d3dac9 29-Jan-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Infrastructure cleanup part 2. valgrind side changes.
Replace Iex_Mux0X with Iex_ITE (if-then-else).
Companion patch to VEX r2668.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13273 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
cafe50502ae73d6d6d0f214e06a4619e6cb1b278 17-Jan-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge, from branches/COMEM, revisions 13139 to 13235.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13236 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
d40533210bb15e00e4396030f81ab6650839d660 26-Nov-2012 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> Before LL, instrument outstanding helper calls.

Callgrind, Cachegrind, and Lackey call
helpers for memory accesses in bunches, to reduce
register save/restore overhead (and merge load/store
within same instruction into a "modify" event).

The calls should not be done within a RMW section
enclosed by LL/SC instructions, as this reduces the
chance of SC to succeed, and can result in hangs.
For Callgrind, this definitly helped MIPS, and was
committed in r13136. Do the same for Cachegrind/Lackey.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13143 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
19f91bbaedb4caef8a60ce94b0f507193cc0bc10 10-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix more Char/HChar mixups. Closing in...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
83bda72db94e9c02de72a62f0a7c3290bd5dfb7e 20-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Char/HChar fixes for lackey.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13062 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
ca503be79ca377d89b1692c37c97a06ed14dad3b 07-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> This is the 2nd installment of the cache info reorganisation.
The host's VexArchInfo is passed to the tool instrumentation
functions. Purely mechanic patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13031 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
574d9a858a549542bae996c5ab1fda3e0c4f87c2 21-May-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle 32-byte loads/stores, as created by recently added AVX support.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12571 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
8a5c06b1e1347c873f6f0cda7c4bc1643ec05dca 30-Sep-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a couple of buffer overruns. n-i-bz.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12074 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
21aa17f44c7857e914515b2f7898632b41f7a1b9 26-Jul-2011 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> Unbreak lackey --detailed-counts=yes after r11604

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11915 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
b5b87408c0c99f9f6938d8cd921e2a5f420577c4 07-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>). Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
db5907d7b94ce492f29a96c95e186fdcda23a149 26-Nov-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Track vex r1930 (Change the IR representation of load linked and store
conditional.) Completes the fix of #215771.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10957 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
6fb923b691f20bf6a38314663a80d637054aaef7 05-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> - Rejigged Lackey's manual
- Made it count calls to main() by default, since _dl_runtime_resolve() no
longer appears to exist.
- A couple of other minor Lackey things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10717 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
b5dc2d6122f87dcb20fe14b3f4fb6f33af8dee5c 15-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge lackey/ changes from branches/MESSAGING_TIDYUP r10464.
See trunk r10465 commit message for details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10474 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
1c0ce7a9edf8772773f6216dbad4bb04317d23b6 01-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in branches/DCAS.

This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

These changes track the IR changes added by vex r1901. They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
6f74a7ef1768dd3925cc22869b4e5e24e9338d08 12-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added some shortcuts for VG_(message)(), and used them in a few places (but
certainly not all).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9367 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
22b05ece333d1c0d5b25d71bd4f6899ab98dcf2a 26-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r9283 (lackey testing fixes) from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9284 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
83df0b67a14425c484d8dda42b53f3ff0b598894 25-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> atoll() is a terrible function -- you can't do any error checking with it.
Some of our option processing code uses it. This means that eg.
'--log-fd=9xxx' logs to fd 9, and '--log-fd=blahblahblah' logs to 0 (because
atoll() returns 0 if the string doesn't contain a number!)

It turns out that most of our option processing uses VG_(strtoll*) instead
of VG_(atoll). The reason that not all of it does is that the
option-processing macros are underpowered -- they currently work well if you
just want to assign the value to a variable, eg:

VG_BOOL_CLO(arg, "--heap", clo_heap)
else VG_BOOL_CLO(arg, "--stacks", clo_stacks)

else VG_NUM_CLO(arg, "--heap-admin", clo_heap_admin)
else VG_NUM_CLO(arg, "--depth", clo_depth)

(This works because they are actually an if-statement, but it looks odd.)

VG_NUM_CLO uses VG_(stroll10). But if you want to do any checking or
processing, you can't use those macros, leading to code like this:

else if (VG_CLO_STREQN(9, arg, "--log-fd=")) {
log_to = VgLogTo_Fd;
VG_(clo_log_name) = NULL;
tmp_log_fd = (Int)VG_(atoll)(&arg[9]);
}

So this commit:
- Improves the *_CLO_* macros so that they can be used in all circumstances.
They're now just expressions (albeit ones with side-effects, setting the
named variable appropriately). Thus they can be used as if-conditions,
and any post-checking or processing can occur in the then-statement. And
malformed numeric arguments (eg. --log-fd=foo) aren't accepted. This also
means you don't have to specify the lengths of any option strings anywhere
(eg. the 9 in the --log-fd example above). The use of a wrong number
caused at least one bug, in Massif.
- Updates all places where the macros were used.
- Updates Helgrind to use the *_CLO_* macros (it didn't use them).
- Updates Callgrind to use the *_CLO_* macros (it didn't use them), except
for the more esoteric option names (those with numbers in the option
name). This allowed getUInt() and getUWord() to be removed.
- Improves the cache option parsing in Cachegrind and Callgrind -- now uses
VG_(strtoll10)(), detects overflow, and is shorter.
- Uses INT instead of NUM in the macro names, to distinguish better vs. the
DBL macro.
- Removes VG_(atoll*) and the few remaining uses -- they're wretched
functions and VG_(strtoll*) should be used instead.
- Adds the VG_STREQN macro.
- Changes VG_BINT_CLO and VG_BHEX_CLO to abort if the given value is outside
the range -- the current silent truncation is likely to cause confusion as
much as anything.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9255 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
a0b6b2cf9abc7b0d87be1215a245eaccc0452af9 07-Jul-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged FORMATCHECK branch (r8368) to trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
f36ae99840c45960187073d140934e45daa6b066 23-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid some compiler warnings.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7201 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
72d75132068882b52b67dddc9af85ffaae5ac14f 10-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Track vex r1793: make all tools able to handle the new IR memory bus
event statement (Ist_MBE).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7119 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
8a7b41b41b46c0aa7bd4b6678b82285437e7f08c 23-Sep-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix various format string errors, courtesy of Florian Krohm.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6902 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
ab9c37e3ab245724b6bcd4792a65d513b4dd6cd2 28-Aug-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> fixed a couple of minor things



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6785 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
ba5b3b26beedd3741ed84a9f913280ef75f73aa0 16-Feb-2007 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> lackey: Take possible condition invertion for Jccs into account


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6591 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
dbb9c8e327781376552ddbfcb151e21883217f49 12-Feb-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> This code shouldn't be run unless --trace-mem was specified.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6587 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
5d1c901f185fd1600ffdaf8c92cf475688049ad5 12-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> * make the --trace-mem output format more concise
* new option --trace-superblocks for getting a log of superblock entries



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6585 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
0b9d74abd0a663b530d290b2b788ddeda46e5400 24-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Non-functional commit: track IR renaming in vex r1689.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6416 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
149aed8dbfb2432fcc4785219f4620de5b8a8e10 25-Nov-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use the newly-added dopyIRBBExceptStmts() in tools.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6372 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
e8d217d5e261473a5bb39f02e2eeb34c4d651129 19-Oct-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Improve comments.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6321 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
40823565bcbc33e9b6eff5e99d9ab8409471ec53 17-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r6214 (some parts):

Futz with the estimated-translation sizes to make them more plausible [..]



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6296 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
eaf0ca90c6d7d62b3cedb7e2ebf3add3a692db7a 09-Apr-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Redid the --trace-mem=yes option of Lackey properly. Updated some related
stuff along with it, such as the NEWS file.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5840 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
d99644db668b2177b2e546a831b8223648936445 07-Apr-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Tweaked Lackey. Main change is that the default instrumentation is now only
added if you specify --basic-counts=yes (which is the default). So
all of the instrumentation is now controlled by a command-line option (one
of --basic-counts, --detailed-counts or --trace-mem) and so if you turn them
all off it behaves like Nulgrind. This makes it clearer what's going on and
easier for newbies to modify.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5834 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
9dd72776bc183169dfc39f56450bdc4f62bb40cc 11-Mar-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a comment.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5744 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
e91cea71129edc807428c8228d0d9f5b13894a5a 08-Feb-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Track vex r1573 (introduction of 4-arg IR primops for ppc fmadd/fmsub).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5619 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
461df9c36f6a07e4f0c14ae068e8e8e9bd383b26 17-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> These files all speak about instrumentation functions.
Instrumentation functions now take a callback closure structure
(VgCallbackClosure*), so this commit changes the signatures
accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5535 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
fd73ebb56f414b2d1807160cabffab4ebb20e3ab 30-Dec-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a --trace-mem option to Lackey to print out a memory access trace, if
only so people will stop asking how to do it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5462 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
5fed8c07ba7759b1e2eb0a5eae1b953577b308fa 23-Dec-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> ppc64-linux fixes


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5422 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
7a26f022e1879920c6306f26f00577edd4b449cb 01-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Reinstate and extend lackey's functionality (a major overhaul), from
Jeroen N. Witmond. Thanks for that.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4979 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
4ba057cce1d81a949f5a899b5abb99e90a731bcc 18-Oct-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change the core-tool interface so that tools are fully aware of both
the guest extents for the presented translation and also its original
un-redirected guest address. These changes are needed in particular
to make cachegrind's code cache management work properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4943 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
45f4e7c91119c7d01a59f5e827c67841632c9314 27-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive). That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome. The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
and include it in a couple of places. Building etc seems to still
work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
stuff was moved from -generic to -linux after the branch was created.
I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
is strange, and makes it hard to diagnose regtest failures. In
particular memcheck/tests/x86/scalar.stderr.exp remains in a
conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable. I'll
attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
c7561b931e249acf3768ead77638545b0ccaa8f1 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Final commit for the initial modularisation pass:

- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
f39e9a36dca9642668a66c6b054f81c88650bcb9 12-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Finished the modularisation of vg_mylibc.c, which meant it could be removed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3894 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
69f80cff88b55515237c4c4761b89f28732d3c02 11-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid compiler warnings.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3879 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
36a20fa5f779a0a6fb7b4a90dcaa6376481f1faa 03-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularise printing functions in m_libcprint.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3840 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
43b9a8abb139b86a24457fa3c19b9cb60ca17c3a 10-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised the core/tool interface ('details', 'needs' and VG_(tdict))
into a new module m_tooliface. Pretty straightforward. Touches a lot
of files because many files use this interface and so need to include
the headers for the new module.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3652 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
51d827bcd88ce045a383ea1ca81768757df2d1fa 09-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Big clean-up: changed the core/tool interface to be mediated entirely
through the VG_(tdict) function dictionary, rather than using TL_(foo)
functions.

This facilitated the following changes:

- Removed the "TL_" prefix, which is no longer needed.

- Removed the auto-generated files vg_toolint.[ch], which were no longer
needed, which simplifies the build a great deal. Their (greatly
streamlined) contents went into core.h and vg_needs.h (and will soon
go into a new module defining the core/tool interface).

This also meant that tool.h.base reverted to tool.h (so no more
accidentally editing tool.h and not having the changes go into the
repo, hooray!) And gen_toolint.pl was removed. And toolfuncs.def was
removed.

- Removed VG_(missing_tool_func)(), no longer used.

- Bumped the core/tool interface major version number to 8. And I
killed the minor version number, which was never used. The layout
of the ToolInfo struct is such that this should not cause problems.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3644 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
2bc10126a94b421a490b2759dc50ab67ec4ee116 08-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> A crucial, crucial change: update my email address.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3632 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
8a97c6d61ccd93aae5034e2f3f619c62c9a9cc41 31-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> This change reduces the number of calls to dlsym() when loading tools from a
lot to one. This required two basic changes.

1. Tools are responsible for telling the tool about any functions they
provide that the tool may call. This includes basic functions like
TL_(instrument)(), functions that assist core services such as
TL_(pp_Error)(), and malloc-replacement-related functions like
TL_(malloc)().

2. Tools that replace malloc now specify the size of the heap block redzones
through an arg to the VG_(malloc_funcs)() function, rather than with a
variable VG_(vg_malloc_redzone_szB).

One consequence of these changes is that VG_(tool_init_dlsym)() no longer
needs to be generated by gen_toolint.pl.

There are a number of further improvements that could follow on from this one.
- Avoid the confusingly different definitions of the TL_() macro in the
core vs. for tools. Indeed, the functions provided by the tools now don't
need to use the TL_() macro at all, as they can have arbitrary names.
- Remove a lot of the auto-generated stuff in vg_toolint.c and vg_toolint.h
(indeed, it might be possible to not auto-generate these at all, which
would be nice).
- The handling of VgToolInterface is currently split across vg_needs.c and
vg_toolint.c, which isn't nice.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3487 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
d54babf82db303dfe43082bfe1af75d7b58b3267 21-Mar-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Track Vex API change in rev 1062: pass both the guest and host word
sizes to the instrumentatation functions. Make most of the tools
abort if they are not the same; we can't handle that case yet.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3397 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
5361242f022b38fadb4cdf02428cea8b8d901a90 12-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright notice for 2005 on all relevant files. Don't bother trying
to be selective about it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3303 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
bd598e1577f3e9c70978d2f7c77cbbd5af0c7ecd 07-Jan-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Handle IRStmt_MFence in the tools.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3217 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
9f649aa98a89c7d4d26267ce4a0cdd40a6e3aeb9 22-Nov-2004 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make various other tools compile; also fix the stage2 linker script.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3068 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
26f025100805e561354c8c98b5ebb0c4a517d9a9 22-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Converted the SK_ prefix to TL_ everywhere.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3060 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
7e08f067b55e825d0ac2de8e31d6a2964fadb120 20-Oct-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Arch-abstraction:
- Make Lackey talk about "machine instructions" rather than "x86 instructions".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2814 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
46063201cea329c862bed94ffffae9c82a706be5 02-Sep-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Arch-abstraction: renamed "vg_skin.h" as "tool.h". Kept a residual vg_skin.h
(which just #includes tool.h) for backward-compatibility.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2647 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
bb1c99123c95fb9a4a2617d6e1d09559ac68db80 04-Jan-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright dates for 2004. Also added a couple of missing headers and
footers to some new files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2177 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
98abfc7bb7798c4ac4580f7e0bc7171de94a0255 16-Dec-2003 fitzhardinge <fitzhardinge@a5019735-40e9-0310-863c-91ae7b9d1cf9> This jumbo-checkin is the Full Virtualization checkin. This eliminates
Valgrind's dependency on the dynamic linker for getting started, and
instead takes things into its own hands.

This checkin doesn't add much in the way of new functionality, but it
is the basis for all future work on Valgrind. It allows us much more
flexibility in implementation, and well as increasing the reliability
of Valgrind by protecting it more from its clients.

This patch requires some changes to tools to update them to the changes
in the tool API, but they are straightforward. See the posting "Heads
up: Full Virtualization" on valgrind-developers for a more complete
description of this change and its effects on you.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2118 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
421281e98e4ffc5e5fc034398707b8523676555d 20-Nov-2003 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated all "report bugs to..." messages to point to valgrind.kde.org; also
updated the docs to refer to valgrind.kde.org instead of the old website.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2055 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
137bc55f216bc7d9528f159a78cdf9025e0b02ff 14-Nov-2003 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Started to rescind the name "skin", replacing it with "tool". Did this in all
the places that normal users will see:

- command line: --tool=foo (although --skin=foo still works)
- docs: removed all traces (included renaming coregrind_skins.html to
coregrind_tools.html)
- in the usage messages
- in error messages

Also did in in some places that I judged were unlikely to cause clashes with
existing workspaces:

- in the header comments of many files (eg. "This file is part of Memcheck, a
Valgrind tool for...")
- in the regtests script
- in the .supp files
- in AUTHORS
- in README_MISSING_SYSCALL_OR_IOCTL

Also update the AUTHORS file to mention Jeremy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2027 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
b2b8f1062e91b4719b06018e3e87aa3068b612b2 30-Sep-2003 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't panic on MMX UInstrs. In effect, makes it work for MMX, as well
as SSE/SSE2.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1861 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
4fbe6e9ff89567e4c8cc7fdf579ad5b8c25ce1d0 15-Jun-2003 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rename the SSE and MMX uinstrs which read/write integer registers, in
a way consistent with the position of the register field in the
instruction. In Intel encoding parlance, the G register is in bits
5,4,3 and the E register is bits 2,1,0, and so we adopt this scheme
consistently. Considering how much confusion this has caused me in
this recent bout of SSE hacking, consistent renaming can only be a
good thing. It makes it a lot easier to figure out if parts of the
SSE handling machinery are correct, or not.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1698 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
7d9f94dda63c0e604774f491ed6b3decbf5c3ce5 22-Apr-2003 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added "Int exitcode" argument to SK_(fini)(), because it could be useful
for skins.

Changed lackey to print out the exit code.

Changed AUTOMAKE_OPTIONS back to 1.5 (whoops)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1538 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
0e1b514ab8e837f75a207a037ea53a6a721e9d28 15-Apr-2003 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright notices for 2003. Only 4 months late.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1526 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
3d7c9c8c2e4882c787a9b63befe095785f3d5d07 26-Mar-2003 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement support for the MMX instruction set. The scheme used is
the same as that for FPU instructions. That is, regard the MMX state
(which is the same as the FPU state) opaquely, and every time we
need to do a MMX instruction, move the simulated MMX state into the
real CPU, do the instruction, and move it back. JeremyF's optimisation
to minimise FPU saves/restores applies automatically here.

So, this scheme is simple. It will cause memcheck to complain bitterly
if uninitialised data is copied through the MMX registers, in the same
way that memcheck complains if you move uninit data through the FPU
registers. Whether this turns out to be a problem remains to be seen.

Most instructions are done, and doing the rest is easy enough, I just
need people to send test cases so I can do them on demand.

(Core) UCode has been extended with 7 new uinstrs:

MMX1 MMX2 MMX3
-- 1/2/3 byte mmx insns, no references to
integer regs or memory, copy exactly to the output stream.

MMX_MemRd MMX_MemWr
-- 2 byte mmx insns which read/write memory and therefore need
to have an address register patched in at code generation
time. These are the analogues to FPU_R / FPU_W.

MMX_RegRd MMX_RegWr
-- These have no analogues in FPU land. They hold 2 byte insns
which move data to/from a normal integer register (%eax etc),
and so this has to be made explicit so that (1) a suitable
int reg can be patched in at codegen time, and (2) so that
memcheck can do suitable magic with the V bits going into/
out of the MMX regs.

Nulgrind (ok, this is a nop, but still ...) and AddrCheck's
instrumenters have been extended to cover these new UInstrs. All
others (cachesim, memcheck, lackey, helgrind, did I forget any)
abort when they see any of them. This may be overkill but at least
it ensures we don't forget to implement it in those skins.
[A bad thing would be that some skin silently passes along
MMX uinstrs because of a default: case, when it should actually
do something with them.]

If this works out well, I propose to backport this to 2_0_BRANCH.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1483 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
c0d8f68810eb79a5a6cb6049d6a4ab1de7dc4e18 30-Nov-2002 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Complete integration of the new code management (sectored FIFO) story.

This commit adds stats gathering / printing (use -v -v), and selection
of sector size decided by asking skins, via
VG_(details).avg_translation_sizeB, the average size of their
translations.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1334 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
810086f9489e1cb373bcfc15ab94a3fa3ec403f3 14-Nov-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Lots of changes to future-proof the core/skin interface, making it less likely
that changes will cause binary incompatibilities. Mostly done by hiding naked
structs with function calls.

Structs hidden in this way were: UCodeBlock, SkinSupp and SkinError (which were
merged back with CoreSupp and CoreError into single types Supp and Error),
ShadowChunk, VgDetails, VgNeeds and VgTrackEvents. The last three are the most
important ones, as they are (I think) the most likely to change.

Suitable get()/set() methods were defined for each one. The way UCodeBlocks
are copied for instrumentation by skins is a little different now, using
setup_UCodeBlock. Had to add a few other functions here n there. Changed
how SK_(complete_shadow_chunk) works a bit.

Added a file coregrind/vg_needs.c which contains all the get/set functions.
It's pretty simple.

The changes are not totally ideal -- eg. ShadowChunks has get()/set() methods
for its `next' field which arguably shouldn't be exposed (betraying the fact
that it's a linked list), and the get()/set() methods are a bit cumbersome at
times, esp. for `Error' because the fields are accessed quite a few times, and
the treatment of Supps and Errors is a bit inconsistent (but they are used in
different ways), and sizeof_shadow_blocks is still a hack. But still better
than naked structs. And one advantage is that a bit of sanity checking can be
performed by the get()/set() methods, as is done for VG_({get,set}_sc_extra)()
to make sure no reading/writing occurs outside the allowed area.

I didn't do it for UInstr, because its fields are accessed directly in lots and
lots of spots, which would have been a great big pain and I was a little
worried about overhead of calling lots of extra functions, although in practice
translation times are small enough that it probably doesn't matter.

Updated the example skin and the docs, too, hurrah.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1314 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
7a5ebcf66cfbd2fefa261cfbaf5f03527c299a29 13-Nov-2002 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge patch from JeremyF:

39-lock-prefix

Add a new UInstr LOCK to represent a "lock" prefix in the instruction
stream. This has the same semantics as NOP, but allows a skin to tell
whether a group of UInstrs associated with an x86 instruction are
meant to be locked.

HELGRIND: uses the LOCK UInstr to automatically take and release a
special __BUS_HARDWARE_LOCK__ around locked instructions. This only
works properly if all instructions touching a given address are locked
(even reads).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1310 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
27f1a386dce7eb9e1d30b841771c71f0de27f34f 08-Nov-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added a basic core/skin interface versioning system. Each skin must use the
macro VG_DETERMINE_INTERFACE_VERSION exactly once. If the X.Y core and skin
versions don't have a matching X (indicating binary incompatibility), Valgrind
will abort execution immediately at startup.

I even documented it in the skins guide!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1279 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
4aa62bafc2c28dc14153ce8c765687cfb8aa7dde 05-Oct-2002 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Naming wibbles -- start skin names with a capital letter (they deserve it)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1198 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
ac6c17667e489215a0795c24cc1b202254582a4f 04-Oct-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved the following macros, which were defined multiple times in multiple
files, into vg_skin.h:

uInstr0, uInstr1, uInstr2, uInstr3, nameIReg, nameISize, nameSReg,
newTemp, newShadow, uLiteral, uCCall

As macros they avoid namespace problems (they expand to VG_(whatever)) so
this should work fine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1182 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
d04b7c6801102481b53ba2dccb9f693eea01004b 03-Oct-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changed startup message to give information about skin and core separately.
Added "version" and "copyright_author" fields for skins to supply.

Now startup message looks something like this:

==12698== cachegrind, an I1/D1/L2 cache profiler for x86-linux.
==12698== Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.
==12698== Built with valgrind-HEAD, a program execution monitor.
==12698== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==12698== Estimated CPU clock rate is 1422 MHz
==12698== For more details, rerun with: -v

The skin can specify a version number, but the skins that will be distributed
with Valgrind don't.

Also changed "x86 GNU/Linux" to the wicked "x86-linux" at Julian's request.

Updated default regression test filter to handle this new startup message.

----

Also moved the skin's name, description, etc., fields out of VG_(needs) into a
new struct VG_(details), since they are logically quite different to the needs.
Did a little code formatting, etc., for this. Updated skin docs
correspondingly, too.

Also renamed the need `run_libc_freeres' --> `libc_freeres' so it's a noun
phrase rather than a verb phrase.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1172 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
83157fcf04eecd3fc1c4a8a29509a35f82a7b875 03-Oct-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added basic docs for Helgrind, Lackey, CoreCheck.

Minor wibbles in AUTHORS.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1170 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
c953984b8ee34ac55830b9871138b409d9d9476c 02-Oct-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated file descriptions in the copyright notices to reflect the core/skin
split. Each skin now has its own two-line description.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1166 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
e427a6636de5b2d34c2223821ff5cbf79bad4fad 02-Oct-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changes made so that skin error "report this bug to" messages are distinguished
from core error ones:

- Split up VG_(panic) into VG_(core_panic) and VG_(skin_panic)

- Likewise, split vg_assert into vg_assert and sk_assert

- Added a new need string: `bug_reports_to'

- Removed VG_(skin_error) which was a previous wussy attempt at this change.
This removed the need for the hacky redeclaration of VG_(skin_error) in
vg_profile.c, which is good.

At the moment, Julian and Nick's email addresses are hard-coded into each skin
individually, rather than using a #define in vg_skin.h, because that didn't
feel quite right to me... jseward@acm.org is still done with a #define for
core errors, though.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1164 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
4ba5a79d946b22c52856d62dca7c927cb306dfa3 30-Sep-2002 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Converted all functions visible from vg_skin.h with names in CamelCaps to
use_under_scores instead, to be consistent.

Also added some missing 'extern's on function declarations in vg_skin.h.

Also added a quick note in vg_regtest.in on the simplest way to run regression
tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1135 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
cac76cb18577b9c51d331f56e8ea241f6effaf31 23-Sep-2002 njn25 <njn25@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changed lots of files for the new core/ + skin/ directory structure:

- changed lots of Makefile.am files
- changed configure.in
- changed lots of #include lines for changed file names
- changed lots of file headers n footers for changed file names
- changed vg_regtest to handle new directory structure -- recursively
traverses subdirectories for .vgtest test files
- changed lots of paths in memcheck/ regression test expected outputs


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1090 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c
e49d8e7dfd3a9c96feb9935b5920973dfc0b170a 23-Sep-2002 njn25 <njn25@a5019735-40e9-0310-863c-91ae7b9d1cf9> Files updated, added and removed in order to turn the ERASER branch into HEAD


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1086 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/lackey/lk_main.c