Revision: 873 Author: tim.bunce Date: Thu Oct 22 09:24:17 2009 Log: Added t/test62-subcaller1 Bumped VERSIONs ready for an early devel release (to flush out portability issues) [Anyone want to contribute DistZilla support?]
http://code.google.com/p/perl-devel-nytprof/source/detail?r=873 Added: /trunk/t/test62-subcaller1.p /trunk/t/test62-subcaller1.rdt /trunk/t/test62-subcaller1.t Modified: /trunk/Changes /trunk/MANIFEST /trunk/lib/Devel/NYTProf/Core.pm /trunk/lib/Devel/NYTProf/Data.pm /trunk/lib/Devel/NYTProf/ReadStream.pm /trunk/lib/Devel/NYTProf/Reader.pm /trunk/lib/Devel/NYTProf/Util.pm ======================================= --- /dev/null +++ /trunk/t/test62-subcaller1.p Thu Oct 22 09:24:17 2009 @@ -0,0 +1,24 @@ +# test determination of subroutine caller in unusual cases + +{ + package MyTie; + # this TIESCALAR call isn't seen by perl < 5.8.9 and 5.10.1 + sub TIESCALAR { bless {}, shift; } + sub FETCH { } + sub STORE { } +} + +tie my $tied, 'MyTie', 42; # TIESCALAR +$tied = 1; # STORE +if ($tied) { 1 } # FETCH + +# test dying from an xsub +require Devel::NYTProf::Test; +eval { Devel::NYTProf::Test::example_xsub(0, "die") }; + +# test dying from an xsub where the surrounding eval is an +# argument to a sub call. This used to coredump. +sub use_eval_arg { } +use_eval_arg eval { Devel::NYTProf::Test::example_xsub(0, "die") }; + +exit 0; ======================================= --- /dev/null +++ /trunk/t/test62-subcaller1.rdt Thu Oct 22 09:24:17 2009 @@ -0,0 +1,106 @@ +attribute application test62-subcaller1.p +attribute basetime 0 +attribute clock_id 0 +attribute nv_size 0 +attribute perl_version 0 +attribute profiler_duration 0 +attribute profiler_end_time 0 +attribute profiler_start_time 0 +attribute ticks_per_sec 0 +attribute total_stmts_discounted 0 +attribute total_stmts_duration 0 +attribute total_stmts_measured 0 +attribute total_sub_calls 0 +attribute xs_version 0 +fid_block_time 1 4 [ 0 1 ] +fid_block_time 1 6 [ 0 1 ] +fid_block_time 1 7 [ 0 1 ] +fid_block_time 1 8 [ 0 1 ] +fid_block_time 1 11 [ 0 1 ] +fid_block_time 1 12 [ 0 1 ] +fid_block_time 1 13 [ 0 1 ] +fid_block_time 1 16 [ 0 1 ] +fid_block_time 1 17 [ 0 2 ] +fid_block_time 1 21 [ 0 1 ] +fid_block_time 1 22 [ 0 2 ] +fid_block_time 1 24 [ 0 1 ] +fid_block_time 2 7 [ 0 1 ] +fid_block_time 2 8 [ 0 1 ] +fid_block_time 2 9 [ 0 1 ] +fid_block_time 2 11 [ 0 1 ] +fid_block_time 2 15 [ 0 1 ] +fid_fileinfo 1 [ test62-subcaller1.p 1 2 0 0 ] +fid_fileinfo 1 sub MyTie::FETCH 7-7 +fid_fileinfo 1 sub MyTie::STORE 8-8 +fid_fileinfo 1 sub MyTie::TIESCALAR 6-6 +fid_fileinfo 1 sub main::BEGIN 0-0 +fid_fileinfo 1 sub main::CORE:require 0-0 +fid_fileinfo 1 sub main::RUNTIME 1-1 +fid_fileinfo 1 sub main::use_eval_arg 21-21 +fid_fileinfo 1 call 12 MyTie::STORE [ 1 0 0 0 0 0 0 main::NULL ] +fid_fileinfo 1 call 13 MyTie::FETCH [ 1 0 0 0 0 0 0 main::NULL ] +fid_fileinfo 1 call 16 main::CORE:require [ 1 0 0 0 0 0 0 main::RUNTIME ] +fid_fileinfo 1 call 17 Devel::NYTProf::Test::example_xsub [ 1 0 0 0 0 0 0 main::RUNTIME ] +fid_fileinfo 1 call 22 Devel::NYTProf::Test::example_xsub [ 1 0 0 0 0 0 0 main::RUNTIME ] +fid_fileinfo 1 call 22 main::use_eval_arg [ 1 0 0 0 0 0 0 main::RUNTIME ] +fid_fileinfo 2 [ Devel/NYTProf/Test.pm 2 2 0 0 ] +fid_fileinfo 2 sub Devel::NYTProf::Test::CORE:require 0-0 +fid_fileinfo 2 sub Devel::NYTProf::Test::example_sub 13-13 +fid_fileinfo 2 call 7 Devel::NYTProf::Test::CORE:require [ 1 0 0 0 0 0 0 main::RUNTIME ] +fid_fileinfo 2 call 8 main::CORE:require [ 1 0 0 0 0 0 0 main::RUNTIME ] +fid_fileinfo 3 [ Exporter.pm 3 2 0 0 ] +fid_line_time 1 4 [ 0 1 ] +fid_line_time 1 6 [ 0 1 ] +fid_line_time 1 7 [ 0 1 ] +fid_line_time 1 8 [ 0 1 ] +fid_line_time 1 11 [ 0 1 ] +fid_line_time 1 12 [ 0 1 ] +fid_line_time 1 13 [ 0 1 ] +fid_line_time 1 16 [ 0 1 ] +fid_line_time 1 17 [ 0 2 ] +fid_line_time 1 21 [ 0 1 ] +fid_line_time 1 22 [ 0 2 ] +fid_line_time 1 24 [ 0 1 ] +fid_line_time 2 7 [ 0 1 ] +fid_line_time 2 8 [ 0 1 ] +fid_line_time 2 9 [ 0 1 ] +fid_line_time 2 11 [ 0 1 ] +fid_line_time 2 15 [ 0 1 ] +fid_sub_time 1 4 [ 0 1 ] +fid_sub_time 1 6 [ 0 1 ] +fid_sub_time 1 7 [ 0 1 ] +fid_sub_time 1 8 [ 0 1 ] +fid_sub_time 1 11 [ 0 1 ] +fid_sub_time 1 12 [ 0 1 ] +fid_sub_time 1 13 [ 0 1 ] +fid_sub_time 1 16 [ 0 1 ] +fid_sub_time 1 17 [ 0 2 ] +fid_sub_time 1 21 [ 0 1 ] +fid_sub_time 1 22 [ 0 2 ] +fid_sub_time 1 24 [ 0 1 ] +fid_sub_time 2 7 [ 0 1 ] +fid_sub_time 2 8 [ 0 1 ] +fid_sub_time 2 9 [ 0 1 ] +fid_sub_time 2 11 [ 0 1 ] +fid_sub_time 2 15 [ 0 1 ] +profile_modes fid_block_time block +profile_modes fid_line_time line +profile_modes fid_sub_time sub +sub_subinfo Devel::NYTProf::Test::CORE:require [ 2 0 0 1 0 0 0 0 ] +sub_subinfo Devel::NYTProf::Test::CORE:require called_by 2 7 [ 1 0 0 0 0 0 0 main::RUNTIME ] +sub_subinfo Devel::NYTProf::Test::example_sub [ 2 13 13 0 0 0 0 0 ] +sub_subinfo Devel::NYTProf::Test::example_xsub [ undef undef undef 2 0 0 0 0 ] +sub_subinfo Devel::NYTProf::Test::example_xsub called_by 1 17 [ 1 0 0 0 0 0 0 main::RUNTIME ] +sub_subinfo Devel::NYTProf::Test::example_xsub called_by 1 22 [ 1 0 0 0 0 0 0 main::RUNTIME ] +sub_subinfo MyTie::FETCH [ 1 7 7 1 0 0 0 0 ] +sub_subinfo MyTie::FETCH called_by 1 13 [ 1 0 0 0 0 0 0 main::NULL ] +sub_subinfo MyTie::STORE [ 1 8 8 1 0 0 0 0 ] +sub_subinfo MyTie::STORE called_by 1 12 [ 1 0 0 0 0 0 0 main::NULL ] +sub_subinfo MyTie::TIESCALAR [ 1 6 6 0 0 0 0 0 ] +sub_subinfo main::BEGIN [ 1 0 0 0 0 0 0 0 ] +sub_subinfo main::CORE:require [ 1 0 0 2 0 0 0 0 ] +sub_subinfo main::CORE:require called_by 1 16 [ 1 0 0 0 0 0 0 main::RUNTIME ] +sub_subinfo main::CORE:require called_by 2 8 [ 1 0 0 0 0 0 0 main::RUNTIME ] +sub_subinfo main::RUNTIME [ 1 1 1 0 0 0 0 0 ] +sub_subinfo main::use_eval_arg [ 1 21 21 1 0 0 0 0 ] +sub_subinfo main::use_eval_arg called_by 1 22 [ 1 0 0 0 0 0 0 main::RUNTIME ] ======================================= --- /dev/null +++ /trunk/t/test62-subcaller1.t Thu Oct 22 09:24:17 2009 @@ -0,0 +1,9 @@ +use strict; +use Test::More; +use lib qw(t/lib); +use NYTProfTest; + +plan skip_all => "needs perl >= 5.8.9 or >= 5.10.1" + if $] < 5.008009 or $] eq "5.010000"; + +run_test_group; ======================================= --- /trunk/Changes Thu Oct 22 07:42:40 2009 +++ /trunk/Changes Thu Oct 22 09:24:17 2009 @@ -8,7 +8,6 @@ XXX subroutine profiler docs need update XXX note here and doc goto behaviour -XXX update and test JIT XXX OP_SUBSTCONT Note: The file format has changed. Old files can't be read. @@ -32,7 +31,7 @@ Added sigexit option to enable a useable profile when the process exits due to a signals. Thanks to Andrew Sterling Hanenkamp for the seed of this idea. - Added inital support for profiling PostgreSQL PL/Perl code + Added initial support for profiling PostgreSQL PL/Perl code via Devel::NYTProf::PgPLPerl module. Changes to subroutine profiler: ======================================= --- /trunk/MANIFEST Sat Sep 19 14:03:28 2009 +++ /trunk/MANIFEST Thu Oct 22 09:24:17 2009 @@ -149,6 +149,9 @@ t/test61-submerge.p t/test61-submerge.rdt t/test61-submerge.t +t/test62-subcaller1.p +t/test62-subcaller1.rdt +t/test62-subcaller1.t t/test70-subexcl.p t/test70-subexcl.t t/test80-recurs.p ======================================= --- /trunk/lib/Devel/NYTProf/Core.pm Mon Sep 28 02:24:24 2009 +++ /trunk/lib/Devel/NYTProf/Core.pm Thu Oct 22 09:24:17 2009 @@ -14,7 +14,7 @@ use XSLoader; -our $VERSION = '2.10'; # increment with XS changes too +our $VERSION = '2.11'; # increment with XS changes too XSLoader::load('Devel::NYTProf', $VERSION); ======================================= --- /trunk/lib/Devel/NYTProf/Data.pm Thu Oct 22 09:12:40 2009 +++ /trunk/lib/Devel/NYTProf/Data.pm Thu Oct 22 09:24:17 2009 @@ -52,7 +52,7 @@ use Devel::NYTProf::SubInfo; use Devel::NYTProf::Util qw(make_path_strip_editor strip_prefix_from_paths get_abs_paths_alternation_regex); -our $VERSION = '2.10'; +our $VERSION = '2.11'; my $trace = (($ENV{NYTPROF}||'') =~ m/\b trace=(\d+) /x) && $1; # XXX a hack ======================================= --- /trunk/lib/Devel/NYTProf/ReadStream.pm Tue Jul 14 23:28:44 2009 +++ /trunk/lib/Devel/NYTProf/ReadStream.pm Thu Oct 22 09:24:17 2009 @@ -3,7 +3,7 @@ use warnings; use strict; -our $VERSION = '2.10'; +our $VERSION = '2.11'; use base 'Exporter'; our @EXPORT_OK = qw( ======================================= --- /trunk/lib/Devel/NYTProf/Reader.pm Thu Jul 2 13:12:46 2009 +++ /trunk/lib/Devel/NYTProf/Reader.pm Thu Oct 22 09:24:17 2009 @@ -11,7 +11,7 @@ ########################################################### package Devel::NYTProf::Reader; -our $VERSION = '2.10'; +our $VERSION = '2.11'; use warnings; use strict; ======================================= --- /trunk/lib/Devel/NYTProf/Util.pm Tue Jul 7 06:24:31 2009 +++ /trunk/lib/Devel/NYTProf/Util.pm Thu Oct 22 09:24:17 2009 @@ -40,7 +40,7 @@ use List::Util qw(sum); #use UNIVERSAL qw( isa can VERSION ); -our $VERSION = '2.10'; +our $VERSION = '2.11'; our @EXPORT_OK = qw( fmt_float --~--~---------~--~----~------------~-------~--~----~ You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected] -~----------~----~----~----~------~----~------~--~---
