Revision: 1107
Author: [email protected]
Date: Mon Mar  8 01:46:44 2010
Log: Add a wrapper for NYTP_write_new_fid and use it from nytprofmerge.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1107

Modified:
 /trunk/FileHandle.xs
 /trunk/bin/nytprofmerge

=======================================
--- /trunk/FileHandle.xs        Mon Mar  8 01:46:38 2010
+++ /trunk/FileHandle.xs        Mon Mar  8 01:46:44 2010
@@ -919,3 +919,23 @@
 NYTP_file handle
 unsigned int pid
 NV time_of_day
+
+size_t
+NYTP_write_new_fid(handle, id, eval_fid, eval_line_num, flags, size, mtime, name)
+NYTP_file handle
+unsigned int id
+unsigned int eval_fid
+int eval_line_num
+unsigned int flags
+unsigned int size
+unsigned int mtime
+SV *name
+    PREINIT:
+        STRLEN len;
+        const char *const p = SvPV(name, len);
+    CODE:
+        RETVAL = NYTP_write_new_fid(handle, id, eval_fid, eval_line_num,
+                                    flags, size, mtime, p,
+                                    SvUTF8(name) ? -(I32)len : (I32)len );
+    OUTPUT:
+        RETVAL
=======================================
--- /trunk/bin/nytprofmerge     Mon Mar  8 01:46:31 2010
+++ /trunk/bin/nytprofmerge     Mon Mar  8 01:46:44 2010
@@ -148,9 +148,8 @@
         return unless $pending_fids[$fid];
         my ($new_fid, $new_eval_fid) = @{$pending_fids[$fid]};

-        $out->write('@');
- $out->output_int($new_fid, $new_eval_fid, $eval_line, $flags, $size, $mtime);
-        $out->output_str($name);
+        $out->write_new_fid($new_fid, $new_eval_fid, $eval_line, $flags,
+                            $size, $mtime, $name);
      },
      TIME_BLOCK => \&_time_block_or_line,
      TIME_LINE => \&_time_block_or_line,

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