* update valgrind to 3.24.0-1

This commit is contained in:
Alexander Baldeck 2024-09-24 10:26:57 +02:00
parent 605bbaeb73
commit 661f472fd0
2 changed files with 8 additions and 197 deletions

View File

@ -4,8 +4,8 @@
# Contributor: Allan McRae <allan@archlinux.org>
pkgname=valgrind
pkgver=3.21.0
pkgrel=3
pkgver=3.24.0
pkgrel=1
pkgdesc='Tool to help find memory-management problems in programs'
arch=(riscv64)
license=('GPL')
@ -16,20 +16,17 @@ checkdepends=('procps-ng')
provides=('valgrind-multilib')
replaces=('valgrind-multilib')
options=('!emptydirs' '!strip')
_commit=71272b252977fe52f03ea4fa8306b457b098cca5
_commit=d087725c0d68908bdebe57c528ac86d3dc11418b
source=("git+https://github.com/petrpavlu/valgrind-riscv64.git#commit=${_commit}"
valgrind-3.7.0-respect-flags.patch
fix-perl-errors.patch)
valgrind-3.7.0-respect-flags.patch)
validpgpkeys=(
0E9FFD0C16A1856CF9C7C690BA0166E698FA6035 # Julian Seward <jseward@acm.org>
EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A # Mark Wielaard <mjw@gnu.org>
)
sha512sums=('9a490e337266a7b73d7bd4c6cb394ede0686f5514d9b157ad4f58dcd92ba760f287ff42cbd0df87f4fb9082fbeaa87ef1b9f2df72c0a83d494bbd8382d3f758b'
'e0cec39381cefeca09ae4794cca309dfac7c8693e6315e137e64f5c33684598726d41cfbb4edf764fe985503b13ff596184ca5fc32b159d500ec092e4cf8838c'
'20b251bfc7bef8dfd232f9b679e907114c575299916164a608e2fe7fab5f30bf7241f25e37ab4194c56b0a21e682b3cea2fd892aab30fa2ce3863ef744f27f18')
b2sums=('ae8d9adaa2e751ecbf597b0c0266fc03f60cecdbbfc1cddf9047b445d611af7f395e8386bc8068d4b24040317e343902646f9525609ba3b7ab452bcf409066e6'
'af556fdf3c02e37892bfe9afebc954cf2f1b2fa9b75c1caacfa9f3b456ebc02bf078475f9ee30079b3af5d150d41415a947c3d04235c1ea8412cf92b959c484a'
'78e5ebeda69302ad380923fe0e76ef8fc3443ffa29cc3104fe629335c8ceda1b4198cb5c72bdefb0e47c77ea02d2ca7bfb478cbf8731f8ded0e0c7c5d83981ee')
sha512sums=('b44c9d6c3997cf9f52a8767fca40f8e30667d6743dc0a1ddf324b832a1b0c286e2e3e3e1b1bc4dcfb7c1565b038b9f9f5a01f61fa6df1349633135f2b689756e'
'e0cec39381cefeca09ae4794cca309dfac7c8693e6315e137e64f5c33684598726d41cfbb4edf764fe985503b13ff596184ca5fc32b159d500ec092e4cf8838c')
b2sums=('748c7ddec23e6ca1aa1a67a665b0dd2bd22d84509358a262c8c0de5805e24e8dbf761e8bac546fe9dab8488a29c2da8c7975d3b5584c3ecc7515f621d7cef1d6'
'af556fdf3c02e37892bfe9afebc954cf2f1b2fa9b75c1caacfa9f3b456ebc02bf078475f9ee30079b3af5d150d41415a947c3d04235c1ea8412cf92b959c484a')
options=(!lto) # https://bugs.kde.org/show_bug.cgi?id=338252
pkgver() {
@ -40,7 +37,6 @@ pkgver() {
prepare() {
cd valgrind-riscv64
patch -Np1 < ../valgrind-3.7.0-respect-flags.patch
patch -Np1 < ../fix-perl-errors.patch
sed -i 's|sgml/docbook/xsl-stylesheets|xml/docbook/xsl-stylesheets-1.79.2-nons|' docs/Makefile.am
autoreconf -ifv

View File

@ -1,185 +0,0 @@
diff --git a/callgrind/callgrind_control.in b/callgrind/callgrind_control.in
index 083ffa29fc..bee6661efb 100644
--- a/callgrind/callgrind_control.in
+++ b/callgrind/callgrind_control.in
@@ -29,6 +29,12 @@ use File::Basename;
# vgdb_exe will be set to a vgdb found 'near' the callgrind_control file
my $vgdb_exe = "";
+my $vgdbPrefixOption = "";
+my $cmd = "";
+my %cmd;
+my %cmdline;
+my $pid = -1;
+my @pids = ();
sub getCallgrindPids {
@@ -50,6 +56,8 @@ sub getCallgrindPids {
close LIST;
}
+my $headerPrinted = 0;
+
sub printHeader {
if ($headerPrinted) { return; }
$headerPrinted = 1;
@@ -95,11 +103,17 @@ sub printHelp {
# Parts more or less copied from cg_annotate (author: Nicholas Nethercote)
#
+my $event = "";
+my $events = "";
+my %events = ();
+my @events = ();
+my @show_events = ();
+my @show_order = ();
+
sub prepareEvents {
@events = split(/\s+/, $events);
- %events = ();
- $n = 0;
+ my $n = 0;
foreach $event (@events) {
$events{$event} = $n;
$n++;
@@ -178,7 +192,7 @@ sub print_events ($)
{
my ($CC_col_widths) = @_;
- foreach my $i (@show_order) {
+ foreach my $i (@show_order) {
my $event = $events[$i];
my $event_width = length($event);
my $col_width = $CC_col_widths->[$i];
@@ -209,7 +223,7 @@ if (-x $controldir . "/vgdb") {
# To find the list of active pids, we need to have
# the --vgdb-prefix option if given.
-$vgdbPrefixOption = "";
+my $arg = "";
foreach $arg (@ARGV) {
if ($arg =~ /^--vgdb-prefix=.*$/) {
$vgdbPrefixOption=$arg;
@@ -219,15 +233,19 @@ foreach $arg (@ARGV) {
getCallgrindPids;
-$requestEvents = 0;
-$requestDump = 0;
-$switchInstr = 0;
-$headerPrinted = 0;
-$dumpHint = "";
+my $requestEvents = 0;
+my $requestDump = 0;
+my $switchInstr = 0;
+my $dumpHint = "";
+my $printBacktrace = 0;
+my $printStatus = 0;
+my $switchInstrMode = "";
+my $requestKill = "";
+my $requestZero = "";
-$verbose = 0;
+my $verbose = 0;
-%spids = ();
+my %spids = ();
foreach $arg (@ARGV) {
if ($arg =~ /^-/) {
if ($requestDump == 1) { $requestDump = 2; }
@@ -329,8 +347,8 @@ foreach $arg (@ARGV) {
}
if (defined $cmd{$arg}) { $spids{$arg} = 1; next; }
- $nameFound = 0;
- foreach $p (@pids) {
+ my $nameFound = 0;
+ foreach my $p (@pids) {
if ($cmd{$p} =~ /$arg$/) {
$nameFound = 1;
$spids{$p} = 1;
@@ -353,11 +371,11 @@ if (scalar @pids == 0) {
exit;
}
-@spids = keys %spids;
+my @spids = keys %spids;
if (scalar @spids >0) { @pids = @spids; }
-$vgdbCommand = "";
-$waitForAnswer = 0;
+my $vgdbCommand = "";
+my $waitForAnswer = 0;
if ($requestDump) {
$vgdbCommand = "dump";
if ($dumpHint ne "") { $vgdbCommand .= " ".$dumpHint; }
@@ -371,7 +389,7 @@ if ($printStatus || $printBacktrace || $requestEvents) {
}
foreach $pid (@pids) {
- $pidstr = "PID $pid: ";
+ my $pidstr = "PID $pid: ";
if ($pid >0) { print $pidstr.$cmdline{$pid}; }
if ($vgdbCommand eq "") {
@@ -385,24 +403,24 @@ foreach $pid (@pids) {
}
open RESULT, $vgdb_exe . " $vgdbPrefixOption --pid=$pid $vgdbCommand|";
- @tids = ();
- $ctid = 0;
- %fcount = ();
- %func = ();
- %calls = ();
- %events = ();
- @events = ();
- @threads = ();
- %totals = ();
-
- $exec_bbs = 0;
- $dist_bbs = 0;
- $exec_calls = 0;
- $dist_calls = 0;
- $dist_ctxs = 0;
- $dist_funcs = 0;
- $threads = "";
- $events = "";
+ my @tids = ();
+ my $tid;
+ my $ctid = 0;
+ my %fcount = ();
+ my %func = ();
+ my %calls = ();
+ my @threads = ();
+ my %totals = ();
+ my $totals_width = [];
+
+ my $exec_bbs = 0;
+ my $dist_bbs = 0;
+ my $exec_calls = 0;
+ my $dist_calls = 0;
+ my $dist_ctxs = 0;
+ my $dist_funcs = 0;
+ my $threads = "";
+ my $instrumentation = "";
while(<RESULT>) {
if (/function-(\d+)-(\d+): (.+)$/) {
@@ -485,10 +503,10 @@ foreach $pid (@pids) {
}
print "Backtrace for Thread $tid\n";
- $i = $fcount{$tid};
- $c = 0;
+ my $i = $fcount{$tid};
+ my $c = 0;
while($i>0 && $c<100) {
- $fc = substr(" $c",-2);
+ my $fc = substr(" $c",-2);
print " [$fc] ";
if ($requestEvents >0) {
print_CC($events{$tid,$i-1}, $totals_width);
--
2.39.3