Revision: 1062
Author: [email protected]
Date: Fri Feb 19 06:57:52 2010
Log: In load_profile_data_from_stream, in the time_line and time_block handler,
merge the two places with conditional code to read block_line_num and
sub_line_num into one.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1062

Modified:
 /trunk/NYTProf.xs

=======================================
--- /trunk/NYTProf.xs   Wed Feb 17 08:35:56 2010
+++ /trunk/NYTProf.xs   Fri Feb 19 06:57:52 2010
@@ -3716,6 +3716,13 @@
                 unsigned int ticks    = read_int();
                 unsigned int file_num = read_int();
                 unsigned int line_num = read_int();
+                unsigned int block_line_num = 0;
+                unsigned int sub_line_num = 0;
+
+                if (c == NYTP_TAG_TIME_BLOCK) {
+                    block_line_num = read_int();
+                    sub_line_num = read_int();
+                }

                 if (cb) {
                     PUSHMARK(SP);
@@ -3730,8 +3737,8 @@
sv_setiv(cb_args[i], line_num); XPUSHs(cb_args[i++]);

                     if (c == NYTP_TAG_TIME_BLOCK) {
- sv_setiv(cb_args[i], read_int()); XPUSHs(cb_args[i++]); /* block_line_num */ - sv_setiv(cb_args[i], read_int()); XPUSHs(cb_args[i++]); /* sub_line_num */ + sv_setiv(cb_args[i], block_line_num); XPUSHs(cb_args[i++]); + sv_setiv(cb_args[i], sub_line_num); XPUSHs(cb_args[i++]);
                     }

                     PUTBACK;
@@ -3772,9 +3779,6 @@
                 );

                 if (c == NYTP_TAG_TIME_BLOCK) {
-                    unsigned int block_line_num = read_int();
-                    unsigned int sub_line_num   = read_int();
-
                     if (!fid_block_time_av)
                         fid_block_time_av = newAV();
add_entry(aTHX_ fid_block_time_av, file_num, block_line_num,

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