17469 Commits

Author SHA1 Message Date
1b3bb8cbec Adapted cachegrind's cache simulation to ftmemsim_trace. 2023-07-06 06:02:36 +01:00
5d9110d640 Adapted lackey's --trace-mem to ftmemsim_trace. 2023-07-06 05:38:25 +01:00
28b737ae44 Started work on ftmemsim_trace tool. 2023-07-04 07:33:15 +01:00
Mark Wielaard
d97fed7c3e -> 3.21.0 final 2023-04-28 17:30:04 +02:00
Mark Wielaard
071742f11b Add bug 469049 (--enable-lto=yes) to known issues 2023-04-28 17:27:35 +02:00
Mark Wielaard
b4ec6a6ff7 Support SCV_FLAG also on VGP_ppc64be_linux
Running on a kernel that supports the SCV instruction (sets
PPC_FEATURE2_SCV in auxv AT_HWCAPS2) valgrind will assert: valgrind:
m_syswrap/syswrap-main.c:549 (getSyscallArgsFromGuestState): Assertion
'gst->guest_syscall_flag == SC_FLAG' failed.

Removing that assert makes most things work. But also filter out
PPC_FEATURE2_SCV from AT_HWCAPS2 for the client, so it shouldn't try
using the SCV instruction.

https://bugs.kde.org/show_bug.cgi?id=469097
2023-04-28 15:08:44 +02:00
Nicholas Nethercote
d061b81f40 Only do git configuration if in a git repo. 2023-04-28 10:30:56 +10:00
Paul Floyd
be26a1773e dhat: remove initial count value from access count histogram user requests
Based on feedback from Nick Nethercote.
2023-04-27 09:29:44 +02:00
Paul Floyd
11af866797 FreeBSD: add libc suppressions for Helgrind and DRD 2023-04-26 22:17:16 +02:00
Alexandra Hájková
476d036084 vgdb: Use --wait argument in multi mode
when waiting for valgrind to start.
2023-04-26 21:35:30 +02:00
Mark Wielaard
f83f269dd1 Fix typos in NEWS and valgrind-monitor-def.py
NEWS: who_point_at -> who_points_at
valgrind-monitor-def.py: MEN -> LEN
2023-04-26 21:31:33 +02:00
Nicholas Nethercote
15313a5580 Clarify try push instructions. 2023-04-26 17:00:32 +10:00
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