Commit Graph

9730 Commits

Author SHA1 Message Date
Florian Krohm
792e08a5ce Fix VG_(cpuid) invocations.
Also call cache_info_is_sensible. I forgot to do that in r13053.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13055
2012-10-18 03:33:05 +00:00
Florian Krohm
5371dd0942 Fix some prototypes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13054
2012-10-18 03:17:32 +00:00
Florian Krohm
52cb6c14fa Change cache detection for x86/amd64 to fill in VexCacheInfo directly.
New function write_cache_info to dump what was detected for debugging
purposes. 
New function cache_info_is_sensible to ensure that autodetected
cache info lives up to the promises made in libvex.h.
Moved the trace-cache related kludgery to cachegrind where it belongs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13053
2012-10-18 03:16:45 +00:00
Philippe Waroquiers
aff39b640c Fix 308341 vgdb should report process exit (or fatal signal)
patch from Mark Wielaard.
(with small modifications).
Also clarified some comments related to the resume reply.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13052
2012-10-17 21:32:03 +00:00
Florian Krohm
c5b4ed0c1c Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13051
2012-10-16 01:27:54 +00:00
Bart Van Assche
109e687afd xen: include arg struct field names when marking memory as read.
Makes it easier to figure out what was not initialised.

Thanks, once again, to Julien Grall.

From: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13050
2012-10-15 18:46:08 +00:00
Bart Van Assche
af89e2e88a xen: Remove cast of ARG* to unsigned int before pointer conversion.
This is pretty dodgy on 64 bit systems.

Thanks to Julien Grall.

From: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13049
2012-10-15 18:45:28 +00:00
Bart Van Assche
c38ab89684 xen: adding missing break.
Thanks to Julien Grall.

From: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13048
2012-10-15 18:44:59 +00:00
Bart Van Assche
9a26cdcfce xen: Useful messages for sys/domctl interface_version mismatch
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13047
2012-10-15 18:44:18 +00:00
Christian Borntraeger
b46ca4108e add vgtest file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13046
2012-10-15 14:21:22 +00:00
Christian Borntraeger
a89f3defe1 make use of opcodes.h. The is part of extended immediate facility
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13045
2012-10-15 14:20:46 +00:00
Christian Borntraeger
37009382a6 Add testcase for checking the ltg + jhe handling
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13044
2012-10-15 14:01:31 +00:00
Philippe Waroquiers
bc8e05a56e fix 308321 testsuite memcheck filter interferes with gdb_filter
Patch from Mark Wielaard.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13043
2012-10-14 18:16:41 +00:00
Florian Krohm
a5928d2ac8 Fix some more Char / HChar mixups
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13042
2012-10-14 16:45:23 +00:00
Florian Krohm
0631f08e48 Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13041
2012-10-14 16:43:45 +00:00
Florian Krohm
4d1f391529 Fix compile errors following function prototype change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13040
2012-10-14 02:58:42 +00:00
Florian Krohm
786e11050a Char/ HChar cleanup: The various panic and printf-like functions
all take const HChar * arguments.
__FILE__ and __func__ expand into string literals (or character 
arrays initialised by them), as do strings created by the preprocessor 
e.g. #stuff.
This change reduces the number of warnings from 17000+ to ~5500


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13039
2012-10-14 00:16:28 +00:00
Julian Seward
21d3562b02 Rough initial triage for bugs that appeared in the past month or so.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13038
2012-10-12 22:49:50 +00:00
Philippe Waroquiers
3d14e1d1d7 Some wrong options silently ignored if starting with same letters as valid option
For example, options below are silently "accepted"+ignored:
  valgrind --profile-heaps=yes --max-stackframes=35 memcheck/tests/trivialleak
  valgrind --profile-heaps=oui --max-stackframes=3.141592654 memcheck/tests/trivialleak

Also fixed the on-line --help output for option --core-redzone-size



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13037
2012-10-12 21:46:55 +00:00
Julian Seward
ddbc41e9fb Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13036
2012-10-11 16:57:27 +00:00
Christian Borntraeger
1a3b5409fc newer versions of devel headers expose CLONE flags only with _GNU_SOURCE
defined


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13035
2012-10-08 20:35:13 +00:00
Christian Borntraeger
9a8022279b fix parent and child tid pointer mixup:
The linux kernel has parent tid pointer first.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13034
2012-10-08 20:26:48 +00:00
Petar Jovanovic
110060a9d2 Fix syntax error from r13028.
Typo in r130128 broke the build on MIPS arch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13033
2012-10-08 10:07:08 +00:00
Florian Krohm
83fbb427ee s390: Consolidate information about caches for older machines levels.
Unfortunately, there is only incomplete L2 data.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13032
2012-10-08 00:09:22 +00:00
Florian Krohm
7d59048401 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
2012-10-07 21:59:42 +00:00
Florian Krohm
bd10a6b0f9 Use last-level cache for simulation. Even if there are more than
3 cache levels. Update documentation.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13030
2012-10-07 21:03:27 +00:00
Florian Krohm
0d5a9a3523 Fix compile error on ppc. Followup to r13028
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13029
2012-10-07 20:27:38 +00:00
Florian Krohm
a9b2103cf2 This patch is the first installment of the cache info reorganisation.
It's reorg only. No new cache autodetection stuff has been added.

coregrind
pub_tool_cpuid.h is removed as it is no longer exposed to tools.
Its contents has moved to pub_core_cpuid.h.
New file: coregrind/m_cache.c to contain the autodetect code for
cache configurations and define other cache characteristics that
cannot be autodetected (i.e. icaches_maintain_coherence). Most of 
cg-arch/x86-amd64.c was moved here. The cache detection code for
x86-64 needs to be fixed to properly initialise VexCacheInfo. It
currently has cachegrind bias.
m_cache.c exports a single function (to coregrind): 
   VG_(machine_get_cache_info)(VexArchInfo *vai)
This function is called from VG_(machine_get_hwcaps) after hwcaps have
been detected.

cachegrind
Remove cachegrind/cg-{ppc32,ppc43,arm,mips32,s390x,x86-amd64}.c
With the exception of x86/mamd64 those were only establishing a
default cache configuration and that is so small a code snippet that
a separate file is no longer warranted. So, the code was moved to
cg-arch.c. Code was added to extract the relevant info from 
x86-amd64.
New function maybe_tweak_LLc which captures the code to massage the
LLc cache configuration into something the simulator can handle. This
was originally in cg-x86-amd64.c but should be used to all architectures.
Changed warning message about missing cache auto-detect feature
to be more useful. Adapted filter-stderr scripts accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13028
2012-10-07 19:47:04 +00:00
Florian Krohm
d5b07d8cf1 s390: Add a few more test from olden times.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13027
2012-10-07 04:00:48 +00:00
Florian Krohm
1e03eb7522 s390: Add a few more testcases from long time ago.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13026
2012-10-06 18:02:46 +00:00
Josef Weidendorfer
5b8eeb6545 Cachegrind: use memory block numbers as tags.
This saves instructions in hot path, resulting in
3% improvement on average with perf benchmarks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13025
2012-10-05 23:58:23 +00:00
Josef Weidendorfer
2a505ac120 cachegrind: replace huge macro with inlined functions
Makes modifications simpler in the future, and
should result in the same code.

This patch was already discussed some time ago on the
dev mailing list, and did not make a difference on
various architectures.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13024
2012-10-05 23:58:17 +00:00
Florian Krohm
9e5f501978 Some older kernels on s390 do not provide AT_PLATFORM.
Add a prerequisite condition to make sure it's there.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13023
2012-10-05 23:29:38 +00:00
Petar Jovanovic
127fcef31f Change uname based arch-check to match machine hardware name in sgcheck.
Some hardware platforms will return "unknown" for 'uname -i', so it is more
accurate and common to run 'uname -m' which returns machine hardware name.
This way, some platforms that do not support sgcheck will avoid running tests
for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13022
2012-10-04 23:53:03 +00:00
Tom Hughes
b387dedac0 Allow a null pointer as the second argument to capget.
Patch from Mark Wielaard to fix BZ#307101.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13021
2012-10-04 21:38:27 +00:00
Tom Hughes
c560f18eb7 Filter out memcpy symbol versions from test results.
Patch from Mark Wielaard to fix BZ#307290.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13020
2012-10-04 20:41:12 +00:00
Tom Hughes
f74befe896 Implement a fake /proc/self/auxv file for linux systems.
Patch from Mark Wielaard to fix BZ#253519.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13019
2012-10-04 20:27:38 +00:00
Tom Hughes
9cc8ee1ca0 Fix valt_load_address value in pkgconfig file.
Patch from Mark Wielaard to fix BZ#307729.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13018
2012-10-04 20:01:50 +00:00
Philippe Waroquiers
fef0367e6e Unbreak build on ppc64 (error: ‘EmWarn_PPC64_redir_underflow’ undeclared)
coregrind/m_translate.c does not compile on ppc64 (ppc32 maybe also?)
due to missing include file.
Note: libvex_emnote.h is unconditionally included, even if only
useful for ppc. I suppose we do not want #ifdef for that.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13017
2012-10-02 20:35:21 +00:00
Florian Krohm
7d6ff1f425 Add include file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13016
2012-09-30 20:30:40 +00:00
Philippe Waroquiers
ab2d33788e fix n-i-bz report error for vgdb snapshot requested before execution
Massif does not accept to take snapshots of heap before execution has started.
So, if such a snapshot is requested (using vgdb and option --vgdb-error=0),
then such a snapshot must be refused rather than causing an assert.
(problem reported by dark_footix@yahoo.fr)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13015
2012-09-24 21:50:16 +00:00
Philippe Waroquiers
76e93ca812 Unbreak build on Mac_OS where __NR_mprotect is not defined.
The test is not executed on Darwin but should compile.
(based on fix suggestion by Rich Coe)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13014
2012-09-24 21:37:02 +00:00
Philippe Waroquiers
8783c37469 fix 307155 filter_gdb should filter out syscall-template.S T_PSEUDO
With some glibc version (e.g. on fedora 16), gdb output contains
a line with T_PSEUDO which should be filtered out.

Patch from Mark Wielaard.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13013
2012-09-24 21:12:41 +00:00
Florian Krohm
75b7289d82 s390: Add testcase for some integer comparison insns
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13012
2012-09-23 00:42:49 +00:00
Petar Jovanovic
feeaf10d21 A new post.exp file that provides more details for overloaded-new test.
Valgrind for MIPS will give more details on the heap allocation functions
(operator new) than the existing post.exp presents.
This fixes massif/tests/overloaded-new for MIPS and likely other arch if they
provide the info.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13011
2012-09-21 22:44:45 +00:00
Tom Hughes
2ba34ab159 Implement some extra DW_OPs - more constants and some unary operators.
Patch from Mark Wielaard on BZ#307038.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13010
2012-09-21 09:12:30 +00:00
Tom Hughes
106fc73f9c Rename CfiOp to CfiBinop in preparation for adding unary operators.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13009
2012-09-21 09:04:27 +00:00
Tom Hughes
68757c25a3 When processing DW_OP_plus_uconst make sure we record an add, not
whatever binary operation we happened to see last.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13008
2012-09-21 08:57:46 +00:00
Florian Krohm
9a906610ec Update due to file renaming in VEX r2541.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13007
2012-09-20 01:22:53 +00:00
Florian Krohm
fae9a5f667 Update URLs for new Principles of Operations (SA22-7832-09).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13006
2012-09-19 16:43:30 +00:00