Revision: 1280
Author: [email protected]
Date: Mon Jun  7 08:43:22 2010
Log: Bump the PL_scopestack_ix fudge for the "Unable to determine line number" warning.
(I guess 5.12 has a slightly higher PL_scopestack_ix)

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1280

Modified:
 /trunk/NYTProf.xs

=======================================
--- /trunk/NYTProf.xs   Mon Jun  7 08:07:31 2010
+++ /trunk/NYTProf.xs   Mon Jun  7 08:43:22 2010
@@ -1399,12 +1399,13 @@
* treats those as 'line 0', so we try not to warn in those cases.
              */
             char *pkg_name = CopSTASHPV(cop);
- int is_preamble = (PL_scopestack_ix <= 6 && strEQ(pkg_name,"main")); + int is_preamble = (PL_scopestack_ix <= 7 && strEQ(pkg_name,"main"));

             /* op is null when called via finish_profile called by END */
             if (!is_preamble && op) {
                 /* warn() can't either, in the cases I've encountered */
- logwarn("Unable to determine line number in %s\n", OutCopFILE(cop));
+                logwarn("Unable to determine line number in %s (ssix%d)\n",
+                    OutCopFILE(cop), PL_scopestack_ix);
                 if (trace_level > 5)
                     do_op_dump(1, PerlIO_stderr(), (OP*)cop);
             }

--
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]

Reply via email to