r25892 - in /branches/upstream/libdevel-nytprof-perl/current: ./ lib/Devel/ lib/Devel/NYTProf/ t/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Oct 10 11:58:26 UTC 2008
Author: gregoa
Date: Fri Oct 10 11:58:23 2008
New Revision: 25892
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25892
Log:
[svn-upgrade] Integrating new upstream version, libdevel-nytprof-perl (2.05)
Modified:
branches/upstream/libdevel-nytprof-perl/current/Changes
branches/upstream/libdevel-nytprof-perl/current/META.yml
branches/upstream/libdevel-nytprof-perl/current/NYTProf.xs
branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf.pm
branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Apache.pm
branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Core.pm
branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Data.pm
branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Reader.pm
branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Util.pm
branches/upstream/libdevel-nytprof-perl/current/t/50.errno.t
branches/upstream/libdevel-nytprof-perl/current/t/test01.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test02.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test03.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test05.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test06.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test07.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test08.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test09.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test10.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test11.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test12.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test13.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test14.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test16.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.0.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.1.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test40pmc.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.p
branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.rdt
branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.x
branches/upstream/libdevel-nytprof-perl/current/t/test60-subname.rdt
Modified: branches/upstream/libdevel-nytprof-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/Changes?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/Changes (original)
+++ branches/upstream/libdevel-nytprof-perl/current/Changes Fri Oct 10 11:58:23 2008
@@ -1,8 +1,18 @@
=head1 NAME
-Devel::NYTProf:Changes - List of significant changes to Devel::NYTProf
+Devel::NYTProf::Changes - List of significant changes to Devel::NYTProf
-(As of $Date: 2008-10-03 10:53:51 +0100 (Fri, 03 Oct 2008) $ $Revision: 483 $)
+(As of $Date: 2008-10-08 23:40:43 +0100 (Wed, 08 Oct 2008) $ $Revision: 498 $)
+
+=head2 Changes in Devel::NYTProf 2.05 (svn r498) 8th Oct 2008
+
+ Fixed alteration of $! during profiling thanks to Slaven Rezic.
+ Fixed clock_gettime() clock selection to fallback to CLOCK_REALTIME
+ if CLOCK_MONOTONIC is not available, e.g, on linux 2.4.
+ Fixed error when application ends after DB::disable_profile().
+
+ Added some docs to Devel::NYTProf::Apache
+ Added clock=N option to enable user to select the clock.
=head2 Changes in Devel::NYTProf 2.04 (svn r483) 1st Oct 2008
Modified: branches/upstream/libdevel-nytprof-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/META.yml?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/META.yml (original)
+++ branches/upstream/libdevel-nytprof-perl/current/META.yml Fri Oct 10 11:58:23 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Devel-NYTProf
-version: 2.04
+version: 2.05
abstract: Powerful feature-rich perl source code profiler
license: perl
author:
Modified: branches/upstream/libdevel-nytprof-perl/current/NYTProf.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/NYTProf.xs?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/NYTProf.xs (original)
+++ branches/upstream/libdevel-nytprof-perl/current/NYTProf.xs Fri Oct 10 11:58:23 2008
@@ -12,7 +12,7 @@
* Steve Peters, steve at fisharerojo.org
*
* ************************************************************************
- * $Id: NYTProf.xs 481 2008-10-01 15:17:03Z tim.bunce $
+ * $Id: NYTProf.xs 495 2008-10-08 16:50:46Z tim.bunce $
* ************************************************************************
*/
#ifndef WIN32
@@ -186,10 +186,12 @@
{ "use_db_sub", 0 },
#define compression_level options[7].option_value
#ifdef HAS_ZLIB
- { "compress", 6 }
+ { "compress", 6 },
#else
- { "compress", 0 }
-#endif
+ { "compress", 0 },
+#endif
+#define profile_clock options[8].option_value
+ { "clock", -1 }
};
/* time tracking */
@@ -200,11 +202,7 @@
* http://sean.chittenden.org/news/2008/06/01/
*/
typedef struct timespec time_of_day_t;
-# ifdef CLOCK_MONOTONIC
-# define CLOCK_GETTIME(ts) clock_gettime(CLOCK_MONOTONIC, ts)
-# else
-# define CLOCK_GETTIME(ts) clock_gettime(CLOCK_REALTIME, ts)
-# endif
+# define CLOCK_GETTIME(ts) clock_gettime(profile_clock, ts)
# define CLOCKS_PER_TICK 10000000 /* 10 million - 100ns */
# define get_time_of_day(into) if (!profile_zero) CLOCK_GETTIME(&into)
# define get_ticks_between(s, e, ticks, overflow) STMT_START { \
@@ -323,6 +321,9 @@
}
}
+#ifdef HASATTRIBUTE_NORETURN
+__attribute__noreturn__
+#endif
static void
compressed_io_croak(NYTP_file file, const char *function) {
const char *what;
@@ -798,6 +799,7 @@
NYTP_printf(out, ":%s=%lu\n", "basetime", (unsigned long)PL_basetime);
NYTP_printf(out, ":%s=%s\n", "xs_version", XS_VERSION);
NYTP_printf(out, ":%s=%d.%d.%d\n", "perl_version", PERL_REVISION, PERL_VERSION, PERL_SUBVERSION);
+ NYTP_printf(out, ":%s=%d\n", "clock_id", profile_clock);
NYTP_printf(out, ":%s=%u\n", "ticks_per_sec", ticks_per_sec);
NYTP_printf(out, ":%s=%lu\n", "nv_size", (long unsigned int)sizeof(NV));
/* $0 - application name */
@@ -1007,6 +1009,7 @@
SV *pmcsv = Perl_newSVpvf(aTHX_ "%s%c", SvPV_nolen(pmsv), 'c');
Stat_t pmstat;
Stat_t pmcstat;
+ int saved_errno = errno;
if (PerlLIO_lstat(SvPV_nolen(pmcsv), &pmcstat) == 0) {
/* .pmc exists, is it newer than the .pm (if that exists) */
if (PerlLIO_lstat(SvPV_nolen(pmsv), &pmstat) < 0 ||
@@ -1014,6 +1017,7 @@
is_pmc = 1; /* hey, maybe it's Larry working on the perl6 comiler */
}
}
+ SETERRNO(saved_errno, 0);
SvREFCNT_dec(pmcsv);
SvREFCNT_dec(pmsv);
}
@@ -1149,7 +1153,7 @@
if (src_av) {
I32 lines = av_len(src_av);
int line;
- for (line = 1; line < lines; ++line) { /* lines start at 1 */
+ for (line = 1; line <= lines; ++line) { /* lines start at 1 */
SV **svp = av_fetch(src_av, line, 0);
STRLEN len = 0;
char *src = (svp) ? SvPV(*svp, len) : "";
@@ -2093,12 +2097,15 @@
disable_profile(pTHX)
{
int prev_is_profiling = is_profiling;
- sv_setiv(PL_DBsingle, 0);
- is_profiling = 0;
- if (out)
- NYTP_flush(out);
+ if (is_profiling) {
+ if (use_db_sub)
+ sv_setiv(PL_DBsingle, 0);
+ if (out)
+ NYTP_flush(out);
+ is_profiling = 0;
+ }
if (trace_level)
- warn("NYTProf disable_profile");
+ warn("NYTProf disable_profile %d->%d", prev_is_profiling, is_profiling);
return prev_is_profiling;
}
@@ -2107,8 +2114,8 @@
finish_profile(pTHX)
{
if (trace_level >= 1)
- warn("finish_profile (last_pid %d, getpid %d, overhead %"NVff"s)\n",
- last_pid, getpid(), cumulative_overhead_ticks/ticks_per_sec);
+ warn("finish_profile (last_pid %d, getpid %d, overhead %"NVff"s, is_profiling %d)\n",
+ last_pid, getpid(), cumulative_overhead_ticks/ticks_per_sec, is_profiling);
/* write data for final statement, unless DB_leave has already */
if (!profile_leave || use_db_sub)
@@ -2143,8 +2150,30 @@
last_pid = getpid();
ticks_per_sec = (usecputime) ? CLOCKS_PER_SEC : CLOCKS_PER_TICK;
+#ifdef HAS_CLOCK_GETTIME
+ if (profile_clock == -1) { /* auto select */
+# ifdef CLOCK_MONOTONIC
+ profile_clock = CLOCK_MONOTONIC;
+# else
+ profile_clock = CLOCK_REALTIME;
+# endif
+ }
+ /* downgrade to CLOCK_REALTIME if desired clock not available */
+ if (clock_gettime(profile_clock, &start_time) != 0) {
+ if (trace_level)
+ warn("clock_gettime clock %d not available (%s) using CLOCK_REALTIME instead",
+ profile_clock, strerror(errno));
+ profile_clock = CLOCK_REALTIME;
+ /* check CLOCK_REALTIME as well, just in case */
+ if (clock_gettime(profile_clock, &start_time) != 0)
+ croak("clock_gettime CLOCK_REALTIME not available (%s), aborting",
+ strerror(errno));
+ }
+#endif
+
if (trace_level || profile_zero)
- warn("NYTProf init pid %d%s\n", last_pid, profile_zero ? ", zero=1" : "");
+ warn("NYTProf init pid %d, clock %d%s\n", last_pid, profile_clock,
+ profile_zero ? ", zero=1" : "");
if (get_hv("DB::sub", 0) == NULL) {
warn("NYTProf internal error - perl not in debug mode");
@@ -2498,6 +2527,7 @@
HV *live_pids_hv = newHV();
HV *attr_hv = newHV();
AV* fid_fileinfo_av = newAV();
+ AV* fid_filecontents_av = newAV();
AV* fid_line_time_av = newAV();
AV* fid_block_time_av = NULL;
AV* fid_sub_time_av = NULL;
@@ -2506,6 +2536,7 @@
SV *tmp_str_sv = newSVpvn("",0);
av_extend(fid_fileinfo_av, 64); /* grow it up front. */
+ av_extend(fid_filecontents_av, 64);
av_extend(fid_line_time_av, 64);
if (2 != NYTP_scanf(in, "NYTProf %d %d\n", &file_major, &file_minor)) {
@@ -2664,6 +2695,19 @@
unsigned int file_num = read_int();
unsigned int line_num = read_int();
SV *src = read_str(aTHX_ NULL);
+ AV *file_av;
+
+ /* first line in the file seen */
+ if (!av_exists(fid_filecontents_av, file_num)) {
+ file_av = newAV();
+ av_store(fid_filecontents_av, file_num, newRV_noinc((SV*)file_av));
+ }
+ else {
+ file_av = (AV *)SvRV(*av_fetch(fid_filecontents_av, file_num, 1));
+ }
+
+ av_store(file_av, line_num, src);
+
if (trace_level >= 4) {
warn("Fid %2u:%u: %s\n", file_num, line_num, SvPV_nolen(src));
}
@@ -2710,8 +2754,8 @@
subname_sv = read_str(aTHX_ tmp_str_sv);
if (trace_level >= 3)
- warn("Sub %s called by fid %u line %u: count %d\n",
- SvPV_nolen(subname_sv), fid, line, count);
+ warn("Sub %s called by fid %u line %u: count %d, incl %f, excl %f, ucpu %f scpu %f\n",
+ SvPV_nolen(subname_sv), fid, line, count, incl_time, excl_time, ucpu_time, scpu_time);
subinfo_av = lookup_subinfo_av(aTHX_ subname_sv, sub_subinfo_hv);
@@ -2856,6 +2900,7 @@
profile_hv = newHV();
(void)hv_stores(profile_hv, "attribute", newRV_noinc((SV*)attr_hv));
(void)hv_stores(profile_hv, "fid_fileinfo", newRV_noinc((SV*)fid_fileinfo_av));
+ (void)hv_stores(profile_hv, "fid_filecontents", newRV_noinc((SV*)fid_filecontents_av));
(void)hv_stores(profile_hv, "fid_line_time", newRV_noinc((SV*)fid_line_time_av));
(void)hv_stores(profile_modes, "fid_line_time", newSVpvf("line"));
if (fid_block_time_av) {
Modified: branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf.pm?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf.pm (original)
+++ branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf.pm Fri Oct 10 11:58:23 2008
@@ -7,11 +7,11 @@
## http://search.cpan.org/dist/Devel-NYTProf/
##
###########################################################
-## $Id: NYTProf.pm 482 2008-10-01 15:30:43Z tim.bunce $
+## $Id: NYTProf.pm 497 2008-10-08 22:34:59Z tim.bunce $
###########################################################
package Devel::NYTProf;
-our $VERSION = '2.04';
+our $VERSION = '2.05';
package # hide the package from the PAUSE indexer
DB;
@@ -253,14 +253,11 @@
Set to 1 to enable use of the traditional DB::DB() subroutine to perform
profiling, instead of the faster 'opcode redirection' technique that's used by
-default. It also disables some extra mechanisms that help ensure more accurate
-results for things like the last statements in subroutines.
+default. Also effectively sets C<leave=0> (see above).
The default 'opcode redirection' technique can't profile subroutines that were
compiled before NYTProf was loaded. So using use_db_sub=1 can be useful in
cases where you can't load the profiler early in the life of the application.
-If this proves to be useful to you then please let us know, otherwise this
-vestige of old slower ways is likely to be removed.
=head2 usecputime=1
@@ -288,6 +285,17 @@
rise significantly. Using level 1 still gives you a significant reduction in file size.
If NYTProf was not compiled with compression support, this option is silently ignored.
+
+=head2 clock=N
+
+Systems which support the C<clock_gettime()> system call typically
+support several clocks. By default NYTProf uses CLOCK_MONOTONIC.
+This option enables you to select a different clock by specifying the
+integer id of the clock (which may vary between systems). If the clock
+you select isn't available then CLOCK_REALTIME is used.
+
+This is a wizardly option and best avoided unless you really know what
+you're doing and understand the subtle differences between the clocks.
=head1 SELECTIVE PROFILING
Modified: branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Apache.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Apache.pm?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Apache.pm (original)
+++ branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Apache.pm Fri Oct 10 11:58:23 2008
@@ -7,11 +7,11 @@
# http://search.cpan.org/dist/Devel-NYTProf/
#
###########################################################
-# $Id: Apache.pm 467 2008-09-18 09:51:06Z tim.bunce $
+# $Id: Apache.pm 496 2008-10-08 18:03:16Z tim.bunce $
###########################################################
package Devel::NYTProf::Apache;
-our $VERSION = 0.01;
+our $VERSION = 0.02;
BEGIN {
@@ -82,13 +82,40 @@
This module allows mod_perl applications to be profiled using
C<Devel::NYTProf>.
-If the NYTPROF environment variable isn't set then Devel::NYTProf::Apache
-will issue a warning and default it to:
+If the NYTPROF environment variable isn't set I<at the time
+Devel::NYTProf::Apache is loaded> then Devel::NYTProf::Apache will issue a
+warning and default it to:
file=/tmp/nytprof.$$.out
See L<Devel::NYTProf/"ENVIRONMENT VARIABLES"> for
more details on the settings effected by this environment variable.
+
+Try using C<PerlPassEnv> so you can set the NYTPROF environment variable externally.
+
+Each profiled mod_perl process will need to have terminated before you can
+successfully read the profile data file. The simplest approach is to start the
+httpd, make some requests (e.g., 100 of the same request), then stop it and
+process the profile data.
+
+Alternatively you could send a TERM signal to the httpd worker process to
+terminate that one process. The parent httpd process will start up another one
+for you ready for more profiling.
+
+=head2 Example httpd.conf
+
+It's often a good idea to use just one child process when profiling, which you
+can do by setting the C<MaxClients> to 1 in httpd.conf.
+
+Using an C<IfDefine> blocks lets you leave the profile configuration in place
+and enable it whenever it's needed by adding C<-D NYTPROF> to the httpd startup
+command line.
+
+ <IfDefine NYTPROF>
+ MaxClients 1
+ PerlModule Devel::NYTProf::Apache
+ </IfDefine>
+
=head1 SEE ALSO
Modified: branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Core.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Core.pm?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Core.pm (original)
+++ branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Core.pm Fri Oct 10 11:58:23 2008
@@ -7,14 +7,14 @@
# http://search.cpan.org/dist/Devel-NYTProf/
#
###########################################################
-# $Id: Core.pm 482 2008-10-01 15:30:43Z tim.bunce $
+# $Id: Core.pm 497 2008-10-08 22:34:59Z tim.bunce $
###########################################################
package Devel::NYTProf::Core;
use XSLoader;
-our $VERSION = '2.04'; # increment with XS changes too
+our $VERSION = '2.05'; # increment with XS changes too
XSLoader::load('Devel::NYTProf', $VERSION);
Modified: branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Data.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Data.pm?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Data.pm (original)
+++ branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Data.pm Fri Oct 10 11:58:23 2008
@@ -7,7 +7,7 @@
# http://search.cpan.org/dist/Devel-NYTProf/
#
###########################################################
-# $Id: Data.pm 482 2008-10-01 15:30:43Z tim.bunce $
+# $Id: Data.pm 497 2008-10-08 22:34:59Z tim.bunce $
###########################################################
package Devel::NYTProf::Data;
@@ -50,7 +50,7 @@
use Devel::NYTProf::Core;
use Devel::NYTProf::Util qw(strip_prefix_from_paths get_abs_paths_alternation_regex);
-our $VERSION = '2.04';
+our $VERSION = '2.05';
my $trace = (($ENV{NYTPROF}||'') =~ m/\b trace=(\d+) /x) && $1; # XXX a hack
@@ -328,6 +328,8 @@
$value = $value->_values_for_dump
if blessed $value && $value->can('_values_for_dump');
+ next if $key eq 'fid_filecontents';
+
# special case some common cases to be more compact:
# fid_*_time [fid][line] = [N,N]
# sub_subinfo {subname} = [fid,startline,endline,calls,incl_time]
@@ -417,11 +419,8 @@
The data normalized is:
- profile timing data: set to 0
- - basetime attribute: set to 0
- - xs_version attribute: set to 0
- - perl_version attribute: set to 0
- - nv_size attribute: set to 0
- subroutines: timings are set to 0
+ - attributes, like basetime, xs_version, etc., are set to 0
- filenames: path prefixes matching absolute paths in @INC are removed
- filenames: eval sequence numbers, like "(re_eval 2)" are changed to 0
- calls remove_internal_data_of() for files loaded from absolute paths in @INC
@@ -436,6 +435,7 @@
$self->{attribute}{basetime} = 0;
$self->{attribute}{xs_version} = 0;
$self->{attribute}{perl_version} = 0;
+ $self->{attribute}{clock_id} = 0;
$self->{attribute}{ticks_per_sec} = 0;
$self->{attribute}{nv_size} = 0;
Modified: branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Reader.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Reader.pm?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Reader.pm (original)
+++ branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Reader.pm Fri Oct 10 11:58:23 2008
@@ -7,11 +7,11 @@
## http://search.cpan.org/dist/Devel-NYTProf/
##
###########################################################
-## $Id: Reader.pm 482 2008-10-01 15:30:43Z tim.bunce $
+## $Id: Reader.pm 497 2008-10-08 22:34:59Z tim.bunce $
###########################################################
package Devel::NYTProf::Reader;
-our $VERSION = '2.04';
+our $VERSION = '2.05';
use warnings;
use strict;
Modified: branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Util.pm?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Util.pm (original)
+++ branches/upstream/libdevel-nytprof-perl/current/lib/Devel/NYTProf/Util.pm Fri Oct 10 11:58:23 2008
@@ -7,7 +7,7 @@
# http://search.cpan.org/dist/Devel-NYTProf/
#
###########################################################
-# $Id: Util.pm 482 2008-10-01 15:30:43Z tim.bunce $
+# $Id: Util.pm 497 2008-10-08 22:34:59Z tim.bunce $
###########################################################
package Devel::NYTProf::Util;
@@ -40,7 +40,7 @@
use List::Util qw(sum);
use UNIVERSAL qw( isa can VERSION );
-our $VERSION = '2.04';
+our $VERSION = '2.05';
our @EXPORT_OK = qw(
fmt_float
Modified: branches/upstream/libdevel-nytprof-perl/current/t/50.errno.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/50.errno.t?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/50.errno.t (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/50.errno.t Fri Oct 10 11:58:23 2008
@@ -1,7 +1,8 @@
-use Test::More tests => 3;
+use Test::More tests => 4;
my $nytprof_out;
BEGIN {
+ $ENV{NYTPROF} = "start=init";
$nytprof_out = "nytprof.out";
unlink $nytprof_out;
}
@@ -21,6 +22,12 @@
my $size1 = -s $nytprof_out;
ok $size1, "$nytprof_out should be non-empty";
+$! = 9999;
+new Benchmark;
+fill("", "", ("foo bar baz") x 100);
+is 0+$!, 9999, '$! should not be altered by assigning fids to previously unprofiled modules';
+
+$! = 9999;
while (-s $nytprof_out == $size1) {
# execute lots of statements to force some i/o even if zipping
# none of this should alter $!
@@ -29,7 +36,6 @@
fill("", "", ("foo bar baz") x 100);
pack_sockaddr_un("foo"); # call xs sub
}
-
is 0+$!, 9999, '$! should not be altered by NYTProf i/o';
exit 0;
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test01.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test01.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test01.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test01.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test01.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test02.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test02.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test02.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test02.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test02.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test03.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test03.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test03.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test03.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test03.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test05.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test05.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test05.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test05.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test05.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test06.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test06.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test06.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test06.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test06.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test07.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test07.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test07.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test07.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test07.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test08.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test08.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test08.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test08.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test08.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test09.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test09.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test09.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test09.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test09.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test10.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test10.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test10.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test10.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test10.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test11.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test11.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test11.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test11.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test11.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test12.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test12.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test12.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test12.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test12.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test13.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test13.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test13.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test13.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test13.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test14.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test14.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test14.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test14.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test14.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test16.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test16.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test16.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test16.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test16.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.0.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.0.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.0.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.0.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test30-fork.0.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.1.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.1.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.1.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test30-fork.1.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test30-fork.0.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test40pmc.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test40pmc.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test40pmc.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test40pmc.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test40pmc.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.p
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.p?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.p (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.p Fri Oct 10 11:58:23 2008
@@ -3,3 +3,5 @@
1;
DB::enable_profile();
1;
+DB::disable_profile();
+1; # finish with profile disabled
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test50-disable.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.x
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.x?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.x (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test50-disable.x Fri Oct 10 11:58:23 2008
@@ -6,3 +6,5 @@
0,0,0,1;
0,0,0,DB::enable_profile();
0,1,0,1;
+0,0,0,DB::disable_profile();
+0,0,0,1; # finish with profile disabled
Modified: branches/upstream/libdevel-nytprof-perl/current/t/test60-subname.rdt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-nytprof-perl/current/t/test60-subname.rdt?rev=25892&op=diff
==============================================================================
--- branches/upstream/libdevel-nytprof-perl/current/t/test60-subname.rdt (original)
+++ branches/upstream/libdevel-nytprof-perl/current/t/test60-subname.rdt Fri Oct 10 11:58:23 2008
@@ -1,5 +1,6 @@
attribute application test60-subname.p
attribute basetime 0
+attribute clock_id 0
attribute nv_size 0
attribute perl_version 0
attribute ticks_per_sec 0
More information about the Pkg-perl-cvs-commits
mailing list