17457 Commits

Author SHA1 Message Date
Nicholas Nethercote
ca5486d60c Add a .git-blame-ignore-revs file.
This prevents large-scale changes (e.g. auto-formatting) from negatively
affecting `git blame`.
2023-04-26 16:54:15 +10:00
Paul Floyd
8f1e09be16 Add new DHAT userreqs to NEWS 2023-04-25 07:36:10 +02:00
Paul Floyd
f86aee65ce Fix spelling in NEWS 2023-04-24 20:56:16 +02:00
Paul Floyd
402d720b38 Add memfd_create.stderr.exp-fcntl64 to EXTRA_DIST 2023-04-24 20:53:13 +02:00
Mark Wielaard
e896406e15 Add a memfd_create.stderr.exp-fcntl64 variant
On 32bit systems a glibc fcntl call results in a fcntl64 syscall.
2023-04-24 15:01:33 +02:00
Paul Floyd
a821780d8c solaris: aligned allocation issues
Solaris 11.3 doesn't have aligned_alloc - add a configure time test
memalign does not accept either a size or an alignment of zero
2023-04-23 13:51:37 +02:00
Mark Wielaard
8360205968 vgdb: Always check the result from asprintf and write calls 2023-04-22 18:04:21 +02:00
Paul Floyd
945b64a97f Typo in NEWS
(Try again, without a ton of changes from testing clang-format)

Thanks Tobias, on valgrind-developers
2023-04-22 16:31:45 +02:00
Paul Floyd
76d6b4591a Revert "Typo in NEWS"
This reverts commit bf347551c99313a4af9c38bdeda9b946c9795945.
2023-04-22 16:29:27 +02:00
Paul Floyd
bf347551c9 Typo in NEWS
Thanks Tobias, on valgrind-developers
2023-04-22 16:08:28 +02:00
Paul Floyd
3b93737876 regtest: add C++11 flag to build of user_histo1.cpp
For old compilers that don't default to C++11 or later
2023-04-22 09:38:35 +02:00
Mark Wielaard
c8832cb2dd Add helgrind/tests/garbage.filtered.out to .gitignore 2023-04-22 03:41:04 +02:00
Mark Wielaard
181b3f2467 Set version to 3.21.0-RC2 2023-04-22 03:00:27 +02:00
Paul Floyd
f5416b5edd regtest: dhat/tests/user_histo1 filter out summary
Too system dependent.
2023-04-21 23:35:37 +02:00
Paul Floyd
577912e62c regtest: add another expected for dhat/tests/user_histo1 2023-04-21 23:17:32 +02:00
Paul Floyd
869e6e28b1 regtest: filter error address from dhat/tests/user_histo1 2023-04-21 23:10:51 +02:00
Paul Floyd
dc5209d42b Add missing user_histo1.stdout.exp to EXTRA_DIST 2023-04-21 22:57:09 +02:00
Paul Floyd
424340403c Bug 464103 - Enhancement: add a client request to DHAT to mark memory to be histogrammed 2023-04-21 21:21:23 +02:00
Mark Wielaard
6fc239ed47 Add use strict and use warnings to perl callgrind scripts
This way we can simply use #! /usr/bin/env perl and don't need env -S
and perl -w flags which might confuse some packaging utilities.
2023-04-21 18:13:31 +02:00
Mark Wielaard
9d6d45cfde Add cachegrind/tests/ann-diff4b-aux/w.rs
Missing testfile from commit 1fdf0e728a047f0aab4de805576b6a3a84f37b79
"Add diff and merge capability to `cg_annotate`."
2023-04-21 16:15:19 +02:00
Nicholas Nethercote
b12703598a Fix two xmllint errors. 2023-04-21 23:00:39 +10:00
Nicholas Nethercote
c2e62127ad Rewrite Cachegrind docs.
For all the changes I've made recently. And also various other changes
that occurred over the past 20 years that didn't previously make it into
the docs.

Also, this change de-emphasises the cache and branch simulation aspect,
because they're no longer that useful. Instead it emphasises the
precision and reproducibility of instruction count profiling.
2023-04-21 22:18:10 +10:00
Nicholas Nethercote
24932ed449 Update NEWS about recent Cachegrind changes. 2023-04-21 22:18:10 +10:00
Nicholas Nethercote
15a11f98f5 Get rid of cache config warnings with --cache-sim=no.
By not configuring the caches in that case. This requires moving a few
assertions around, because they currently assume that the caches are
configured.
2023-04-21 22:18:09 +10:00
Nicholas Nethercote
2cccba7cae Tweak printing of I refs and D refs lines.
Because `--cache-sim=no` is the default now, and `I   refs:` looks weird
by itself.
2023-04-21 22:18:09 +10:00
Nicholas Nethercote
307f96a519 Reorder options in Cachegrind's -h output.
Put the commonly used ones first.
2023-04-21 22:18:09 +10:00
Nicholas Nethercote
1fdf0e728a Add diff and merge capability to cg_annotate.
And deprecate the use of `cg_diff` and `cg_merge`.

Because `cg_annotate` can do a better job, even annotating source files
when doing diffs in some cases.

The user requests merging by passing multiple cgout files to
`cg_annotate`, and diffing by passing two cgout files to `cg_annotate`
along with `--diff`.
2023-04-21 22:18:09 +10:00
Paul Floyd
a2af9adec4 Bug 397083 - Likely false positive "uninitialised value(s)" for __wmemchr_avx2 and __wmemcmp_avx2_movbe 2023-04-20 22:11:31 +02:00
Mark Wielaard
e1684bc775 Add 436413 Warn about realloc of size zero to NEWS 2023-04-20 21:17:46 +02:00
Mark Wielaard
9fcac92ab3 vgdb --multi: fix various typos, indentation and such (followup)
commit 56ccb1e36c4722b56e3e602b986bc45025cb685d missed a few small
fixlets:

- one more comment at the top describing the three usages of vgdb.
- fixed up a few places where tabs were used for indentation (we are
  not very consistent in that either, after the release we'll look
  into adopting something like clang-format so you don't have to do
  all this by hand).
- Add a missing newline in coregrind/m_main.c to make
  none/tests/cmdline2 pass.
2023-04-20 15:04:03 +02:00
Alexandra Hájková
56ccb1e36c vgdb --multi: fix various typos, indentation and such
Remove --launched-with-multi from --help-debug output since it is not
a real user option. Do add a comment in m_main.c explaining the
internal usage.

Add a top-level comment describing the three usages of vgdb.

Fix comment description of decode_hexstring, create_packet,
split_hexdecode.

Consistently use 3 space indention in send_packet and receive_packet
and next_delim_string and split_hexdecode, count_delims,
do_multi_mode.

Fix return type of count_delims to size_t.

Add a note in coregrind/m_gdbserver/server.c to sync qSupported
replies with coregrind/vgdb.c.

Use vgdb (all lowercase) and GDB (all caps) consistently in the
manual.
2023-04-20 14:29:45 +02:00
Mark Wielaard
0ead4c39f0 vgdb: Handle EAGAIN in read_buf
The file descriptor is on non-blocking mode and read_buf should only
be called when poll gave us an POLLIN event signaling the file
descriptor is ready for reading from. Still sometimes we do get an
occasional EAGAIN. Just do as told in that case and try to read again.

Also fix an ERROR errno in getpkt. This has never been observed, but
not getting the actual errno if the write fails in that case would be
really confusing.
2023-04-20 13:00:49 +02:00
Mark Wielaard
6effd73e90 gdbserver_tests/hginfo.vgtest: Use --ignore-thread-creation=yes
The testcase might notice an extra lock created by pthread_create.

https://bugs.kde.org/show_bug.cgi?id=444487
2023-04-20 12:46:55 +02:00
Mark Wielaard
d270b7b15b Bug 439685 compiler warning in callgrind/main.c
main.c: In function 'vgCallgrind_post_syscalltime':
main.c:1779:25: warning: '*((void *)&ts_now+8)'
    may be used uninitialized in this function [-Wmaybe-uninitialized]
     struct vki_timespec ts_now;
main.c:1779:25: warning: 'ts_now'
    may be used uninitialized in this function [-Wmaybe-uninitialized]

In function collect_time the conditional expression in the switch
statement has type int (after integral promotions). GCC assumes that
it may have values other than the ones listed in the enumerated type
it was promoted from.  In that case the memory pointed to by its 1st
argument remains unintialised.  Later on vki_timespec_diff will read
the contents of ts_now undoditionally.  Hence the warning.

Using the default case for the tl_assert () removes the warning and
makes the code more robust should another enumerator ever be added to
Collect_Systime.

Contributed-by: Florian Krohm <florian@eich-krohm.de>
2023-04-20 00:49:28 +02:00
Igor Nunes
b8a9da078b Enable getcpu on arm 32
https://bugs.kde.org/show_bug.cgi?id=419054
2023-04-19 23:54:28 +02:00
Carl Love
19c9e2418c PowerPC:, Update test test_isa_3_1_R1_RT.c, test_isa_3_1_R1_XT.c
The commit:

  commit 20cc0680c3491e062c76605b24e76dc02e16ef47
  Author: Carl Love <cel@us.ibm.com>
  Date:   Mon Apr 17 17:12:25 2023 -0400

      PowerPC:, Fix test test_isa_3_1_R1_RT.c, test_isa_3_1_R1_XT.c

Fixes an issue with the PAD_ORI used in the the tests by explicitly adding
SAVE_REGS and RESTORE_REGS macros.  The macros ensure that the block of
immediate OR instructions don't inadvertently change the contents of the
registers.

John Reiser suggested that the PAD_ORI asm statements in the PAD_ORI
macro be updated to inform the compiler which register the ori instruction
is clobbering.  The compiler will then generate the code to save and
restore the register automatically.  This is a cleaner solution then
explicitly adding the macros to store and restore the registers.  It is
functionally cleaner in that the value fetched by the instruction under
test is not modified by the PAD_ORI instructions.

This patch removes the SAVE_REG and RESTORE_REG macros and updates the
PAD_ORI macro.
2023-04-19 14:43:48 -04:00
Nicholas Nethercote
b0e9fef201 cg_annotate: Remove the -I/--include option.
For much the same reasons that I removed user annotations recently: it's
rarely/never used, and complicates things.
2023-04-19 08:41:08 +10:00
Paul Floyd
1e784548a1 Bug 468606 - build: remove "Valgrind relies on GCC" check/output 2023-04-18 22:27:55 +02:00
Carl Love
20cc0680c3 PowerPC:, Fix test test_isa_3_1_R1_RT.c, test_isa_3_1_R1_XT.c
Test adds a block of xori instructions for use with the PC relative tests.
The registers used by the xori instructions need to be saved and restored,
otherwise the register changes can impact the execution of the for loops
in the test as registers are randomly changed.  The issue occcurs when
GCC is optimizing and inlining the test functions.
2023-04-18 15:44:19 -04:00
Paul Floyd
04054f36be regtest: try to make the nightly script independent of test times 2023-04-18 21:18:12 +02:00
Paul Floyd
54982ab5c5 Forgot to add the modified file for 374596 2023-04-17 22:57:39 +02:00
Paul Floyd
1b3430761f Bug 468401 - [PATCH] Add a style file for clang-format
Patch submitted by:
	Petr Pavlu <petr.pavlu@dagobah.cz>
2023-04-17 22:05:30 +02:00
Paul Floyd
41a7f59a88 Bug 374596 - inconsistent RDTSCP support on x86_64 2023-04-17 21:53:23 +02:00
Paul Floyd
0bc69d40a5 illunmos: fix configure scf_handle_bind check
Migration to GCC 10 changes to 64bit load, see
https://github.com/omniosorg/omnios-extra/blob/master/build/valgrind/patches/libscf.patch
2023-04-16 14:27:04 +02:00
Mark Wielaard
932332e660 Use pipe in vgdb if system doesn't have pipe2
Add a configure check for pipe2. If it isn't available use pipe
and fcntl F_SETFD FD_CLOEXEC in vgdb.c.

https://bugs.kde.org/show_bug.cgi?id=468556
2023-04-16 13:18:00 +02:00
Mark Wielaard
03d9229f0b Fixup vgdb --help message
The --valgrind and the --vargs were missingin the OPTIONS summary.
A \n was missing after the --vargs description.
2023-04-16 01:55:55 +02:00
Mark Wielaard
5383480042 Set version to 3.21.0-RC1 2023-04-15 03:49:15 +02:00
Mark Wielaard
68cf3b5dbf Add bug 467036 Add time cost statistics for Regtest to NEWS 2023-04-15 01:04:23 +02:00
Mark Wielaard
f7ddfc7cfd Regtest: add time cost statistics
Add running time of each (sub) directory in seconds

https://bugs.kde.org/show_bug.cgi?id=467036

Contributed-by: Jojo R <rjiejie@linux.alibaba.com>
2023-04-15 00:59:34 +02:00
Mark Wielaard
16be0ca4ba tests fdleak.h close all open file descriptors > 2
Use sysconf (_SC_OPEN_MAX) to find the upper limit. Or use 1024
if that fails.

https://bugs.kde.org/show_bug.cgi?id=467714
2023-04-15 00:14:01 +02:00