From: simonmar Date: Wed, 20 Dec 2000 10:42:54 +0000 (+0000) Subject: [project @ 2000-12-20 10:42:54 by simonmar] X-Git-Tag: Approximately_9120_patches~3033 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=799ba0256a0098c662ac195362f5e426bd52024f;p=ghc-hetmet.git [project @ 2000-12-20 10:42:54 by simonmar] Remove now-unused stats script. --- diff --git a/ghc/driver/Makefile b/ghc/driver/Makefile index d4304ef..524abd4 100644 --- a/ghc/driver/Makefile +++ b/ghc/driver/Makefile @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# $Id: Makefile,v 1.49 2000/12/11 16:15:03 simonmar Exp $ +# $Id: Makefile,v 1.50 2000/12/20 10:42:54 simonmar Exp $ # TOP=.. @@ -21,7 +21,7 @@ else SRC_HC_OPTS += -fglasgow-exts -cpp -syslib concurrent -syslib posix -syslib misc endif -SUBDIRS = mangler split stats +SUBDIRS = mangler split # ----------------------------------------------------------------------------- # Create compiler configuration diff --git a/ghc/driver/stats/Makefile b/ghc/driver/stats/Makefile deleted file mode 100644 index 8605be9..0000000 --- a/ghc/driver/stats/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# $Id: Makefile,v 1.2 2000/11/03 16:54:52 simonmar Exp $ - -TOP=../.. -include $(TOP)/mk/boilerplate.mk - -SCRIPT_PROG = ghc-stats - -INTERP=perl - -SCRIPT_SUBST_VARS := TARGETPLATFORM - -INSTALL_LIBEXEC_SCRIPTS += $(SCRIPT_PROG) - -CLEAN_FILES += $(SCRIPT_OBJS) - -include $(TOP)/mk/target.mk diff --git a/ghc/driver/stats/ghc-stats.lprl b/ghc/driver/stats/ghc-stats.lprl deleted file mode 100644 index fed6f94..0000000 --- a/ghc/driver/stats/ghc-stats.lprl +++ /dev/null @@ -1,85 +0,0 @@ -%************************************************************************ -%* * -\section[Driver-stats]{Collecting garbage collection statistics for a ghc run} -%* * -%************************************************************************ - -\begin{code} -$StatsFile = $ARGV[0]; -&process_ghc_timings(); - -sub process_ghc_timings { - local($SysSpecificTiming) = 'ghc'; - - open(STATS, $StatsFile) || die "Failed when opening $StatsFile\n"; - local($max_live) = 0; - local($tot_live) = 0; # for calculating residency stuff - local($tot_samples) = 0; - - while () { - if (! /Gen:\s+0/ && ! /Minor/ && /^\s*\d+\s+\d+\s+(\d+)\s+\d+\.\d+/ ) { - $max_live = $1 if $max_live < $1; - $tot_live += $1; - $tot_samples += 1; - } - $BytesAlloc = $1 if /^\s*([0-9,]+) bytes allocated in the heap/; - - if ( /^\s*([0-9,]+) bytes maximum residency .* (\d+) sample/ ) { - $MaxResidency = $1; $ResidencySamples = $2; - } - - $GCs = $1 if /^\s*([0-9,]+) (collections? in generation 0|garbage collections? performed)/; - - if ( /^\s+([0-9]+)\s+Mb total memory/ ) { - $TotMem = $1; - } - - # The presence of -? in the following pattern is only there to - # accommodate 0.29 && <= 2.05 RTS' - if ( /^\s*INIT\s+time\s*(\d+\.\d\d)s\s*\(\s*-?(\d+\.\d\d)s elapsed\)/ ) { - $InitTime = $1; $InitElapsed = $2; - } elsif ( /^\s*MUT\s+time\s*(\d+\.\d\d)s\s*\(\s*(\d+\.\d\d)s elapsed\)/ ) { - $MutTime = $1; $MutElapsed = $2; - } elsif ( /^\s*GC\s+time\s*(\d+\.\d\d)s\s*\(\s*(\d+\.\d\d)s elapsed\)/ ) { - $GcTime = $1; $GcElapsed = $2; - } - } - close(STATS) || die "Failed when closing $StatsFile\n"; - if ( $tot_samples > 0 ) { - $ResidencySamples = $tot_samples; - $MaxResidency = $max_live; - $AvgResidency = int ($tot_live / $tot_samples) ; - } - - # warn about what we didn't find - print STDERR "Warning: BytesAlloc not found in stats file\n" unless defined($BytesAlloc); - print STDERR "Warning: GCs not found in stats file\n" unless defined($GCs); - print STDERR "Warning: InitTime not found in stats file\n" unless defined($InitTime); - print STDERR "Warning: InitElapsed not found in stats file\n" unless defined($InitElapsed); - print STDERR "Warning: MutTime not found in stats file\n" unless defined($MutTime); - print STDERR "Warning: MutElapsed not found in stats file\n" unless defined($MutElapsed); - print STDERR "Warning: GcTime inot found in stats file\n" unless defined($GcTime); - print STDERR "Warning: GcElapsed not found in stats file\n" unless defined($GcElapsed); - - # things we didn't necessarily expect to find - $MaxResidency = 0 unless defined($MaxResidency); - $AvgResidency = 0 unless defined($AvgResidency); - $ResidencySamples = 0 unless defined($ResidencySamples); - - # a bit of tidying - $BytesAlloc =~ s/,//g; - $MaxResidency =~ s/,//g; - $GCs =~ s/,//g; - $InitTime =~ s/,//g; - $InitElapsed =~ s/,//g; - $MutTime =~ s/,//g; - $MutElapsed =~ s/,//g; - $GcTime =~ s/,//g; - $GcElapsed =~ s/,//g; - - # print out what we found - print STDERR "<<$SysSpecificTiming: ", - "$BytesAlloc bytes, $GCs GCs, $AvgResidency/$MaxResidency avg/max bytes residency ($ResidencySamples samples), ${TotMem}M in use, $InitTime INIT ($InitElapsed elapsed), $MutTime MUT ($MutElapsed elapsed), $GcTime GC ($GcElapsed elapsed)", - " :$SysSpecificTiming>>\n"; -} -\end{code}