Use platform specific pre-wrapper for fadvise64 system call and respect
size of parameters, instead of using generic wrapper written for 32bit
architectures.
Issue reported by Marcin Juszkiewicz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16163
For fadvise64 system call, 7th 32-bit argument slot (third on the stack)
will also be used due to MIPS O32 calling convention in passing 64-bit
values.
sys_fadvise64(int fd, loff_t offset, loff_t len, int advice);
NR_fadvise64 -> v0 (sysno)
fd -> a0 (ARG1)
offset -> a2, a3 (ARG3, ARG4)
len -> SP + 16, SP + 20 (ARG5, ARG6)
advise -> SP + 24 (ARG7)
Change the code according to it.
Patch by Aleksandar Rikalo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16162
For this, we must directly check the command line option, as
the VG_(gdbserver_stop_at) function returns False if the gdbserver
is not yet initialised
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16157
Canceling the thread slp2 before the case 5 makes behaviour of this test
more deterministic.
Also, as Philippe W. pointed out, adding --fair-sched=try seems to avoid
variable and sometimes very long run time for these tests.
Related BZ #358213
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16154
with no size/direction hints. (DVD_READ_STRUCT)
Patch from Austin English (austinenglish@gmail.com).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16153
with no size/direction hints. (CDROMSTOP).
Patch from Austin English (austinenglish@gmail.com).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16152
When signal SIGINT was used, it got propagated to the parent shell
and therefore the regression test suite was terminated.
With SIGTERM only the parent exits, as is supposed.
Verified that this changed test case still reproduces the original problem
on Linux and Solaris, when r16140 is temporarily undone.
Follow up to r16140 and r16143 and BZ#372600.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16147
on Solaris so that only shared library is considered.
Previously a binary was checked which now started to produce
incorrect results with regards to vg_preload.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16142
Note that it is unclear if the PRE syscall for rt_sigsuspend
is properly setting up a temporary mask in the thread state
tmp_sig_mask: if an handler is called while a thread is
calling sigsuspend, the mask during the handler run must be
the temporary mask set by sigsuspend.
It is not clear if/where the valgrind sigframe builder/handler
sets the tmp_sig_mask to the value as expected by the user
(i.e. the value of the temporary mask which was given to
the sigsuspend syscall)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16141
Note: the outer now unconditionally report the inner guest stacktrace.
If that would be a problem, we might add a sim-hint no-inner-guest-stacktrace
to optionally disable such outer behaviour.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16139
* sym name cache to cache the 'isText' characteristic of the cached sym_name
* implement the match anywhere also in the cache
Not handling matchAnywhere has bad performance effect on callgrind, as almost many
IPs were considered as a fn entry, while they were not.
* use the same convention to name the findText argument
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16136
* main is more likely to be an outermost frame rather than an innermost
frame. So, searching from the outermost frame will more quickly find it.
* Also, in case the stacktrace contains twice the main functionn, this
ensures we only removes the functions below the outermost main.
Having 2 mains in a stacktrace does not happen normally.
However, this prepares for some future commit that improves
the outer/inner setup: the outer will append the inner guest stack trace.
The inner stack trace sometimes already contains main.
Searching from outermost frame main allows to keep the interesting
part of the stacktrace.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16135
The none/tests/nocwd creates a really deep temporary directory structure
that is also inaccessible after the test. This causes issues with some
build wrappers like koji which fail to cleanup such deep subdirectories.
So explicitly cleanup the directory after the test.
https://bugzilla.redhat.com/show_bug.cgi?id=1390282
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16134
* Similarly to what was done in revision r16104 for vg_perf, have a way
to append to predefined vg_regtest outer args, rather than only be able
to replace them.
* increase the num callers for outer tool to 40.
(This is in preparation of a future commit, that will allow outer tool
to append the inner guest stack trace to reported errors in the inner)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16133
Final patch of the xtree serie, which provides the documentation.
The xtree concept was committed in the revisions
16120 : Support pool of unique string in pub_tool_deduppoolalloc.h
16121 : Implement a cache 'address -> symbol name' in m_debuginfo.c
16122 : Add VG_(strIsMemberXA) in pub_tool_xarray.h
16123 : Addition of the pub_tool_xtree.h and pub_tool_xtmemory.h modules, and of the --xtree-memory* options
16124 : Addition of the options --xtree-memory and --xtree-memory-file
16125 : Small changes in callgrind_annotate and callgrind manual
16126 : Locally define vgPlain_scrcmp in 2 unit tests
16127 : Support for xtree memory profiling and xtmemory gdbsrv monitor command in helgrind
16128 : Support for xtree memory profiling and xtmemory gdbsrv monitor command in memcheck
16129 : Update massif implementation to xtree
Some smaller follow-up patches to be expected to add some regtests,
and refine documentation.
Thanks to Ivo, Julian and Josef for the review comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16131
* update massif code so as to replace the massif specific XTree implementation
by calls to pub_tool_xtree.h
This improves the massif performance in CPU (a few percents to a factor
2 gained, depending on the implementation). The memory use is also
decreased.
With this patch, massif behaves similarly to the previous implementation.
The differences are:
* some massif stats output have changed, as the new implementation
differs completely from the previous one.
* when 2 'branches' of the call tree have consumed the same amount
of heap, the order in which the branches are output in the massif
output file can differ between the old and new implementation.
No other functional difference is expected, waiting for new bugs to
be discovered.
* Also add support for xtree memory profiling and xtmemory gdbsrv monitor
command in massif :
* massif will produce xtree memory profiling according to the options
--xtree-memory.
* addition of the xtmemory gdbserver monitor command.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16129
* memcheck will produce xtree memory profiling according to the options
--xtree-memory.
* addition of the xtmemory gdbserver monitor command.
(this is the second real xtree functional difference)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16128
* helgrind will produce xtree memory profiling according to the options
--xtree-memory.
* addition of the xtmemory gdbserver monitor command.
(this is the first real xtree functional difference)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16127
Humph, this should have been part of :
16122 Add VG_(strIsMemberXA) in pub_tool_xarray.h
which means that between 16122 and this revision, these 2 unit tests
will (very probably) not compile.
That will make bissect not easy :(
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16126
* callgrind_annotate: ignore the lines giving the long names of the
events: such lines are used by kcachegrind for the GUI, so are better
accepted (and ignored) by callgrind_annotate
* Document in callgrind_annotate manual that thresholds can be given
per event kind.
* Avoid a division by zero in callgrind_annotate, for 'special data'
such as produced by (some) xtrees.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16125
Option is added, parsed, explained in --help
but is not used yet by any other code.
So, apart of the --help, no functional effect.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16124
This commit is the bulk of the new code.
There is however no functional impact yet : the new modules are not used by anybody.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16123
This allows to search more efficiently a string in an xarray of string.
(support work for xtree)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16122
Support work for xtree: as xtree implementation makes a high
nr of calls to get_sym_name, this cache improves the performance
as usually, stacktraces are repeatitively querying the same
addresses.
The cache follows the same principle as the cfsi_m_cache.
In particular, cache is cleared together with the cfsi_m cache.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16121
VEX commit 3284 listed Bugzilla 148000 which is incorrect.
Tweeked comments so the file VEX/priv/guest_ppc_toIR.c can be committed again.
VEX commit 3285.
Bugzilla is 372185.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16119
Explicitly check that the symbol starts with "_Z" to only demangle
modern style (gnu_v3) mangled C++ (and Rust) symbols.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16118
Redirect index function in ld.so.1.
Optimize the existing strlen function implementations.
This removes warnings coming from optimized index and strlen functions
in ld.so.1.
Patch by Aleksandar Rikalo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16117