From: codesite-nore...@google.com
Date: Tue, 29 Jul 2008 17:25:03 -0700
Local: Tues, Jul 29 2008 8:25 pm
Subject: [perl-devel-nytprof commit] r368 - trunk
Author: tim.bunce
Date: Tue Jul 29 09:45:08 2008 New Revision: 368 Modified: Log: Modified: trunk/NYTProf.xs @@ -520,11 +519,7 @@ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
| |||||||||||||
From: Nicholas Clark <n...@ccl4.org>
Date: Wed, 30 Jul 2008 09:53:55 +0100
Local: Wed, Jul 30 2008 4:53 am
Subject: Re: [develnytprof-dev: 526] [perl-devel-nytprof commit] r368 - trunk
On Tue, Jul 29, 2008 at 05:25:03PM -0700, codesite-nore...@google.com wrote: I missed it's corresponding read loop though, didn't I? :-) > Author: tim.bunce > Modified: > Log: Still no error checking. Not sure of the best way to deal with that. The way I read headers in PerlIO::gzip and ex::lib::zip was to fread() in Nicholas Clark Index: NYTProf.xs You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: Tim Bunce <Tim.Bu...@pobox.com>
Date: Wed, 30 Jul 2008 18:15:39 +0100
Local: Wed, Jul 30 2008 1:15 pm
Subject: Re: [develnytprof-dev: 528] Re: [perl-devel-nytprof commit] r368 - trunk
On Wed, Jul 30, 2008 at 09:53:55AM +0100, Nicholas Clark wrote: Applied, thanks. > On Tue, Jul 29, 2008 at 05:25:03PM -0700, codesite-nore...@google.com wrote: > > Author: tim.bunce > > Modified: > > Log: > I missed it's corresponding read loop though, didn't I? :-) > Still no error checking. Not sure of the best way to deal with that. I added: /* no error checking on the assumption that a later token read will * detect the error/eof condition */ :) > The way I read headers in PerlIO::gzip and ex::lib::zip was to fread() in Hey, fancy adding zip support to NYTProf? :) > enough bytes (and error check that) then copy them out to the places they > were needed. No faffing with fgetc()/fputc() loops. Meanwhile, want a commit bit? Tim. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: Nicholas Clark <n...@ccl4.org>
Date: Thu, 31 Jul 2008 12:29:44 +0100
Local: Thurs, Jul 31 2008 7:29 am
Subject: Re: [develnytprof-dev: 535] Re: [perl-devel-nytprof commit] r368 - trunk
On Wed, Jul 30, 2008 at 06:15:39PM +0100, Tim Bunce wrote: Not yet. I *think* that it might be as simple as > Hey, fancy adding zip support to NYTProf? :) #include <zlib.h> and then using gzopen() rather than fopen(), and using its gz*() functions > Meanwhile, want a commit bit? Why not? I can add it to my collection. :-) Nicholas Clark You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
| |||||||||||||
From: Nicholas Clark <n...@ccl4.org>
Date: Wed, 6 Aug 2008 21:39:46 +0100
Local: Wed, Aug 6 2008 4:39 pm
Subject: compressed profiles (was Re: [develnytprof-dev: 542] Re: [perl-devel-nytprof commit] r368 - trunk)
On Thu, Jul 31, 2008 at 12:29:44PM +0100, Nicholas Clark wrote: Right. I tried. Because right now I'm generating over 4Gb of profile data > On Wed, Jul 30, 2008 at 06:15:39PM +0100, Tim Bunce wrote: > > Hey, fancy adding zip support to NYTProf? :) > Not yet. I *think* that it might be as simple as > #include <zlib.h> trying to profile the harness in the Perl 5 core running tests in parallel. I got to the appended in about an hour. It fails the tests, in a major way, /* any data that was unflushed in the parent when it forked and the underling implementation of zlib's compressed file handles uses stdio, Well, I think that there's no way of cheating. I can't see any way to If I'm not wrong, then the way to go seems to be to avoid fprintf, fscanf, Nicholas Clark Index: Makefile.PL my @LIBS = (); # See lib/ExtUtils/MakeMaker.pm for details of how to influence +#define HAS_ZLIB 1 +#ifdef HAS_ZLIB /* defaults */ /* options and overrides */ #define END_OUTPUT_PID(pid) STMT_START { \ /*********************************** assert(out != NULL); /* XXX add options, $0, etc, but beware of embedded newlines */ OUTPUT_PID(); @@ -273,9 +291,9 @@ @@ -283,10 +301,10 @@ len = read_int(); buf = SvPV_nolen(sv); @@ -415,7 +433,7 @@ /* general case. handles all integers */ @@ -626,7 +644,7 @@ @@ -928,7 +946,7 @@ - fputc( (profile_blocks) ? NYTP_TAG_TIME_BLOCK : NYTP_TAG_TIME_LINE, out); if (trace_level >= 4) { - out = fopen(filename, "wb"); You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: Tim Bunce <Tim.Bu...@pobox.com>
Date: Thu, 7 Aug 2008 09:28:11 +0100
Local: Thurs, Aug 7 2008 4:28 am
Subject: Re: [develnytprof-dev: 567] compressed profiles (was Re: [develnytprof-dev: 542] Re: [perl-devel-nytprof commit] r368 - trunk)
Ouch!
(We also need a way to turn off the statement profiler, just leaving the gzopen(), open a file ourselves, note the fd, then close it. Then when gzopen() it'll _probably_ open a file with the same fd. (An extra level of safety could be added by opening two files, getting Tim. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: Nicholas Clark <n...@ccl4.org>
Date: Fri, 8 Aug 2008 17:28:58 +0100
Local: Fri, Aug 8 2008 12:28 pm
Subject: Re: [develnytprof-dev: 568] Re: compressed profiles (was Re: [develnytprof-dev: 542] Re: [perl-devel-nytprof commit] r368 - trunk)
On Thu, Aug 07, 2008 at 09:28:11AM +0100, Tim Bunce wrote: That feels very fragile to me. > We could perhaps use this trick... just before opening the file using > gzopen(), open a file ourselves, note the fd, then close it. Then when > gzopen() it'll _probably_ open a file with the same fd. > (An extra level of safety could be added by opening two files, getting Nicholas Clark You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: Nicholas Clark <n...@ccl4.org>
Date: Sun, 10 Aug 2008 18:08:51 +0100
Local: Sun, Aug 10 2008 1:08 pm
Subject: Re: compressed profiles (was Re: [develnytprof-dev: 542] Re: [perl-devel-nytprof commit] r368 - trunk)
On Wed, Aug 06, 2008 at 09:39:46PM +0100, Nicholas Clark wrote: Which doesn't seem to be that hard, so I've started on it. > If I'm not wrong, then the way to go seems to be to avoid fprintf, fscanf, > fputc, fgetc, and fgets, and instead recast all the input and output code > solely in terms of fread() and fwrite(). At which point they can be > conditionally replaced with routines that read or write blocks of data into > deflate() and inflate(), and we have to do all the manual handling ourselves. > However, it does mean that we can keep the current textual header, before > dropping into a deflated stream, if we so choose. To me, currently, it seems that the way to go might well be to keep the current Nicholas Clark You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: Tim Bunce <tim.bu...@gmail.com>
Date: Sun, 10 Aug 2008 22:28:49 +0100
Local: Sun, Aug 10 2008 5:28 pm
Subject: Re: [develnytprof-dev: 583] Re: compressed profiles (was Re: [develnytprof-dev: 542] Re: [perl-devel-nytprof commit] r368 - trunk)
Sounds good to me! Thanks.
It'll be interesting to see how it affects performance. I think Any portability issues? Tim. Sent from my iPhone On 10 Aug 2008, at 18:08, Nicholas Clark <n...@ccl4.org> wrote: You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
From: "Adam Kaplan" <akap...@nytimes.com>
Date: Mon, 11 Aug 2008 16:52:53 -0400
Local: Mon, Aug 11 2008 4:52 pm
Subject: Re: [develnytprof-dev: 595] Re: compressed profiles (was Re: [develnytprof-dev: 542] Re: [perl-devel-nytprof commit] r368 - trunk)
On Sun, Aug 10, 2008 at 17:28, Tim Bunce <tim.bu...@gmail.com> wrote: Wow, that would be incredible. > Sounds good to me! Thanks. > It'll be interesting to see how it affects performance. I think > Any portability issues? > Tim. -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2013 Google |