From: Gurusamy Sarathy Date: Wed, 2 Feb 2000 08:13:04 +0000 (+0000) Subject: Benchmark displays bogus CPU stats (suggested by Cedric Auzanne X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce9550df90b6136a9e0c062522e2fe9d093f297a;p=p5sagit%2Fp5-mst-13.2.git Benchmark displays bogus CPU stats (suggested by Cedric Auzanne ) p4raw-id: //depot/perl@4958 --- diff --git a/Changes b/Changes index 496de51..fce62c2 100644 --- a/Changes +++ b/Changes @@ -79,6 +79,231 @@ Version v5.5.640 Development release working toward 5.6 ---------------- ____________________________________________________________________________ +[ 4957] By: gsar on 2000/02/02 08:04:52 + Log: fix coredump on C<"x" =~ /x/; print @-> (from Ilya Zakharevich) + Branch: perl + ! pp_hot.c +____________________________________________________________________________ +[ 4956] By: gsar on 2000/02/02 08:02:57 + Log: flock() pod talks about "adding" in the sense of "or-ing" + Branch: perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 4955] By: gsar on 2000/02/02 07:58:35 + Log: fixes for switching files in the debugger (from Ilya Zakharevich) + Branch: perl + ! lib/perl5db.pl pod/perldebug.pod +____________________________________________________________________________ +[ 4954] By: gsar on 2000/02/02 07:53:51 + Log: use warnings rather than fiddling with $^W (from Paul Marquess) + Branch: perl + ! lib/Cwd.pm lib/English.pm lib/ExtUtils/MM_Unix.pm + ! lib/ExtUtils/MM_Win32.pm lib/ExtUtils/Manifest.pm lib/Fatal.pm + ! lib/File/Spec/Win32.pm lib/Math/BigFloat.pm + ! lib/Text/ParseWords.pm lib/utf8_heavy.pl +____________________________________________________________________________ +[ 4953] By: gsar on 2000/02/02 07:40:33 + Log: dynixptx hints tweak (from Martin J. Bligh ) + Branch: perl + ! hints/dynixptx.sh +____________________________________________________________________________ +[ 4952] By: gsar on 2000/02/02 07:36:39 + Log: deltanotes on weakrefs and Pod::Parser (from Tuomas Lukka and + Brad Appleton) + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 4951] By: gsar on 2000/02/02 06:54:22 + Log: avoid mismatched type warnings + Branch: perl + ! embed.pl perlapi.h +____________________________________________________________________________ +[ 4950] By: jhi on 2000/02/02 06:49:10 + Log: Integrate with Sarathy. + Branch: cfgperl + +> pod/perlunicode.pod + !> MANIFEST Makefile.SH lib/File/Spec/Win32.pm lib/Text/Tabs.pm + !> lib/byte.pm lib/byte_heavy.pl lib/utf8.pm lib/warnings.pm + !> makedef.pl op.c perl.h pod/perldelta.pod pp_ctl.c regcomp.c + !> regexec.c t/pragma/warn/2use utf8.h utils/perldoc.PL + !> vms/descrip_mms.template warnings.pl +____________________________________________________________________________ +[ 4949] By: gsar on 2000/02/02 06:41:17 + Log: fix broken abs2rel() (from François Allard ) + Branch: perl + ! lib/File/Spec/Win32.pm +____________________________________________________________________________ +[ 4948] By: gsar on 2000/02/02 06:30:41 + Log: makefile tweak + Branch: perl + ! Makefile.SH +____________________________________________________________________________ +[ 4947] By: gsar on 2000/02/02 06:27:43 + Log: future-proof unknown warning categories (from Greg Bacon + ) + Branch: perl + ! lib/warnings.pm t/pragma/warn/2use warnings.pl +____________________________________________________________________________ +[ 4946] By: gsar on 2000/02/02 06:21:34 + Log: doc tweak (from Michael G Schwern ) + Branch: perl + ! lib/Text/Tabs.pm +____________________________________________________________________________ +[ 4945] By: gsar on 2000/02/02 06:03:04 + Log: more meaningful message on invalid pattern argument (from + Kevin Meltzer ) + Branch: perl + ! utils/perldoc.PL +____________________________________________________________________________ +[ 4944] By: gsar on 2000/02/02 05:43:49 + Log: XSLoader build patch for VMS (from Craig A. Berry + ) + Branch: perl + ! vms/descrip_mms.template +____________________________________________________________________________ +[ 4943] By: gsar on 2000/02/02 03:40:49 + Log: reword some sections of perlunicode.pod + Branch: perl + ! pod/perlunicode.pod +____________________________________________________________________________ +[ 4942] By: gsar on 2000/02/01 21:02:01 + Log: AIX warning on undefined symbol + Branch: perl + ! makedef.pl +____________________________________________________________________________ +[ 4941] By: gsar on 2000/02/01 20:29:30 + Log: HINT_UTF8 is not propagated to the op tree anymore; add a + perlunicode.pod that reflects changes to unicode support so far + Branch: perl + + pod/perlunicode.pod + ! MANIFEST lib/byte.pm lib/byte_heavy.pl lib/utf8.pm op.c perl.h + ! pod/perldelta.pod pp_ctl.c regcomp.c regexec.c utf8.h +____________________________________________________________________________ +[ 4940] By: jhi on 2000/02/01 12:22:30 + Log: Integrate with Sarathy. + Branch: cfgperl + !> embed.pl embedvar.h global.sym gv.c intrpvar.h + !> lib/charnames.pm lib/utf8.pm mg.c objXSUB.h op.c op.h + !> perlapi.c perlapi.h pod/perlvar.pod pp.c sv.c sv.h + !> t/lib/charnames.t toke.c win32/win32.c win32/win32.h +____________________________________________________________________________ +[ 4939] By: gsar on 2000/02/01 08:52:16 + Log: export pregexec(), Tk uses it + Branch: perl + ! embed.pl global.sym objXSUB.h perlapi.c +____________________________________________________________________________ +[ 4938] By: gsar on 2000/02/01 04:00:09 + Log: mark literal utf8 in string literals properly + Branch: perl + ! toke.c +____________________________________________________________________________ +[ 4937] By: gsar on 2000/01/31 20:19:34 + Log: introduce $^U, a global bit to indicate whether system + calls should using widechar APIs; chr and sprintf "%c" also + follow this flag in the absense of "use byte"; "use utf8" + sets $^U=1 (this appears kludgey) + Branch: perl + ! embedvar.h gv.c intrpvar.h lib/charnames.pm lib/utf8.pm mg.c + ! op.c op.h perlapi.h pod/perlvar.pod pp.c sv.c sv.h + ! t/lib/charnames.t win32/win32.h +____________________________________________________________________________ +[ 4936] By: jhi on 2000/01/31 20:17:44 + Log: HP-UX (induced) fixes. + Branch: cfgperl + ! Configure config_h.SH hints/hpux.sh + Branch: metaconfig + ! U/modified/Oldconfig.U U/modified/libs.U + Branch: metaconfig/U/perl + ! quadfio.U +____________________________________________________________________________ +[ 4935] By: jhi on 2000/01/31 19:15:43 + Log: Cosmetics. + Branch: metaconfig + ! U/compline/d_gconvert.U +____________________________________________________________________________ +[ 4934] By: jhi on 2000/01/31 19:15:22 + Log: Cppsym saga continues. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4933] By: gsar on 2000/01/31 18:45:07 + Log: !USING_WIDE() branch is busted in win32_stat() + Branch: perl + ! win32/win32.c +____________________________________________________________________________ +[ 4932] By: jhi on 2000/01/31 06:41:47 + Log: Reveal even more symbols. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4931] By: jhi on 2000/01/31 06:21:41 + Log: Integrate with Sarathy. + Branch: cfgperl + - lib/caller.pm + !> (integrate 29 files) +____________________________________________________________________________ +[ 4930] By: gsar on 2000/01/31 04:57:42 + Log: runtime now looks at the SVf_UTF8 bit on the SV to decide + whether to use widechar semantics; lexer and RE engine continue + to need "use utf8" to enable unicode awareness in literals + and patterns (TODO: this needs to be fixed); $1 et al are marked + SvUTF8 if the pattern was compiled for utf8 (TODO: propagating + it from the data is probably better) + Branch: perl + ! doop.c gv.c mg.c op.c op.h pp.c pp_ctl.c pp_hot.c regcomp.c + ! sv.c t/pragma/warn/doop t/pragma/warn/pp t/pragma/warn/sv + ! t/pragma/warn/toke t/pragma/warn/utf8 toke.c utf8.h +____________________________________________________________________________ +[ 4929] By: gsar on 2000/01/31 04:17:09 + Log: remove caller.pm from change#3534 (flawed idea) + Branch: perl + - lib/caller.pm + ! MANIFEST pod/perldelta.pod pod/perlfunc.pod +____________________________________________________________________________ +[ 4928] By: gsar on 2000/01/31 04:16:01 + Log: fix factual regression (-e doesn't create temporary files anymore) + Branch: perl + ! pod/perlfilter.pod +____________________________________________________________________________ +[ 4927] By: gsar on 2000/01/30 21:27:12 + Log: introduce $^V (eq chr($revision) . chr($version) . chr($subversion)); + document version tuples + Branch: perl + ! gv.c pod/perldelta.pod pod/perlfunc.pod pod/perlop.pod + ! pod/perlvar.pod +____________________________________________________________________________ +[ 4926] By: gsar on 2000/01/28 18:10:12 + Log: implement -follow option in find2perl (from Helmut Jarausch + ) + Branch: perl + ! lib/File/Find.pm x2p/find2perl.PL +____________________________________________________________________________ +[ 4925] By: gsar on 2000/01/28 18:03:28 + Log: document what chdir() without an argument does (from Mark-Jason + Dominus ) + Branch: perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 4924] By: gsar on 2000/01/28 17:49:34 + Log: README.cygwin update (from Eric Fifer ) + Branch: perl + ! README.cygwin +____________________________________________________________________________ +[ 4923] By: gsar on 2000/01/28 17:10:08 + Log: avoid leaking lexicals into program being debugged (from Ilya + Zakharevich) + Branch: perl + ! lib/perl5db.pl +____________________________________________________________________________ +[ 4922] By: gsar on 2000/01/28 16:36:13 + Log: perldelta note about export list changes + Branch: perl + ! Changes pod/perldelta.pod +____________________________________________________________________________ [ 4921] By: gsar on 2000/01/28 15:49:04 Log: alias realpath() to abs_path() (from Tom Christiansen) Branch: perl diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index 7cb78eb..5157aad 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -423,14 +423,14 @@ sub timestr { my @t = @$tr; warn "bad time value (@t)" unless @t==6; my($r, $pu, $ps, $cu, $cs, $n) = @t; - my($pt, $ct, $t) = ($tr->cpu_p, $tr->cpu_c, $tr->cpu_a); + my($pt, $ct, $tt) = ($tr->cpu_p, $tr->cpu_c, $tr->cpu_a); $f = $defaultfmt unless defined $f; # format a time in the required style, other formats may be added here $style ||= $defaultstyle; $style = ($ct>0) ? 'all' : 'noc' if $style eq 'auto'; my $s = "@t $style"; # default for unknown style $s=sprintf("%2d wallclock secs (%$f usr %$f sys + %$f cusr %$f csys = %$f CPU)", - @t,$t) if $style eq 'all'; + $r,$pu,$ps,$cu,$cs,$tt) if $style eq 'all'; $s=sprintf("%2d wallclock secs (%$f usr + %$f sys = %$f CPU)", $r,$pu,$ps,$pt) if $style eq 'noc'; $s=sprintf("%2d wallclock secs (%$f cusr + %$f csys = %$f CPU)",