[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-167-g4319a8f
edwin
edwin at 77e5149b-7576-45b1-b177-96237e5ba77b
Fri Jun 12 19:11:30 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4491f1987c5ab6acd394727ee62b3deb1b0f725c
Author: edwin <edwin at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date: Fri Apr 17 13:47:49 2009 +0000
add new mpool debug output parsing
git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5047 77e5149b-7576-45b1-b177-96237e5ba77b
diff --git a/ChangeLog b/ChangeLog
index 16fafed..b1dd047 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Apr 17 16:47:44 EEST 2009 (edwin)
+-------------------------------------
+ * contrib/mpoolparse/mpoolparse.pl, contrib/mpoolparse/process.pl:
+ add new mpool debug output parsing
+
Fri Apr 17 16:44:50 EEST 2009 (edwin)
-------------------------------------
* libclamav/mpool.c: update mpool frag sizes.
diff --git a/contrib/mpoolparse/mpoolparse.pl b/contrib/mpoolparse/mpoolparse.pl
deleted file mode 100644
index 70b1ad8..0000000
--- a/contrib/mpoolparse/mpoolparse.pl
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-my %frags = ();
-
-while (<>) {
- chomp;
- next unless /^LibClamAV Warning: [mc]alloc .* size (\d+) .*$/;
- $frags{$1}++;
-}
-
-foreach (sort {$a<=>$b} (keys(%frags))) {
- print "$_, /* ($frags{$_}) */\n";
-}
-
diff --git a/contrib/mpoolparse/process.pl b/contrib/mpoolparse/process.pl
new file mode 100644
index 0000000..f3a01b3
--- /dev/null
+++ b/contrib/mpoolparse/process.pl
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my %reallocs;
+my %mallocs;
+while (<>) {
+ if (/realloc @ 0x([0-9a-f]+)/) {
+ $reallocs{$1}="";
+ }
+ if (/malloc 0x([0-9a-f]+) size ([0-9]+)/) {
+ $mallocs{$1}=$2;
+ }
+}
+my %sizes;
+while (my ($address, $size) = each(%mallocs)) {
+ if (not defined $reallocs{$address}) {
+ $sizes{$size}++;
+ }
+}
+while (my ($size, $count) = each(%sizes)) {
+ print "$size, /* $count */\n";
+}
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list