Admin/profiling_report
author berghofe
Wed, 07 May 2008 10:59:19 +0200
changeset 26809 da662ff93503
parent 17001 51ff2bc32774
child 36859 51af1657263b
permissions -rwxr-xr-x
- Instantiated parts_insert_substD to avoid problems with HO unification - Replaced auto by fastsimp in proof of parts_invKey, since auto looped because of the new encoding of sets

#!/usr/bin/env perl
#
# $Id$
# Author: Makarius
#
# DESCRIPTION: Simple report generator for Poly/ML profiling output.

use strict;

my %log = ();
my @output = ();

while (<ARGV>) {
    if (m,^([ 0-9]{10}) (\S+$|GARBAGE COLLECTION.*$),) {
	my $count = $1;
	my $fun = $2;
	$fun =~ s,-?\(\d+\).*$,,g;
	$fun =~ s,/\d+$,,g;
	if ($count =~ m,^\s*(\d)+$,) {
	    if (defined($log{$fun})) {
		$log{$fun} += $count;
	    } else {
		$log{$fun} = $count;
	    }
	}
    }
}

foreach my $fun (keys %log) {
    push @output, (sprintf "%14u %s\n", $log{$fun}, $fun);
}

print (sort @output);