[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

acab (none) acab at 1337ness.
Sun Apr 4 01:04:51 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit c12fe59e2d2e0d5c954d036cab5847b363be30c1
Author: acab <acab at 1337ness.(none)>
Date:   Sat Sep 12 18:13:31 2009 +0200

    add grptr.pl, to me moved to some proper location

diff --git a/grptr.pl b/grptr.pl
new file mode 100644
index 0000000..7500e33
--- /dev/null
+++ b/grptr.pl
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my ($event, $trace);
+my %locks;
+my $t;
+
+while(<>) {
+	chomp;
+	next if /^#/;
+	if (/^\s+(.*)-\d+\s+\[\d+\]\s+[0-9.]+: (.*) \(([0-9.]+) us\)$/) {
+		$locks{$trace} += $t if defined $t;
+		$t = $3;
+		$trace="$1: $2\n";
+		next;
+	}
+	next unless s/^ => ([^\s])/$1/;
+	$trace.="$_\n";
+}
+$locks{$trace} += $t+0 if defined $t;
+
+foreach (sort { $locks{$b} <=> $locks{$a} } keys %locks) {
+	last unless $locks{$_} >= 100000;
+	my @bt = split "\n";
+	print "--- $locks{$_} us --- $bt[0]\n";
+	my $i;
+	for ($i = 1; $i <= $#bt; $i++) {
+		my $l = $bt[$i];
+		if ($l =~ /^(\/.*)\[\+(0x.*)\]$/) {
+			my $path = $1;
+			my $addr = $2;
+			my $code = `addr2line -fe "$path" $addr`;
+			my @spam = split("\n", $code);
+			if ($? != 0) {
+				$code = "$addr";
+			} else {
+				$code = "$spam[0] - $spam[1]";
+			}
+			$l = "$path [$code]";
+		} elsif ($l =~ /^ /) {
+			$l.=" (unknown)";
+		} else {
+			$l.=" (kernel)";
+		}
+
+		print "$l\n";
+	}
+	print "\n";
+}

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list