On Tue, Jan 05, 2010 at 07:23:38AM -0800, Markus Peter wrote:
> Hello
> 
> First off, NYTProf rocks :-)

Thanks!

> I have two suggestions, though. I hope I'm at the right place here,
> did not find any information where else to submit feature requests:
> 
> 1) Just a minor annoyance: "is_pmc"
> 
> I mainly run NYTProf in a setup, where Perl's .pmc files are used to
> store cached copies of source-filtered perl files. Unfortunately,
> using pmc files that way leads to most links between subroutines in
> the report being wrong (linking to unknown.html because there's no
> html_safe value).
> 
> The problem is caused by the line $filename .= "c" if $fid_fileinfo->
> [$fid]->is_pmc; in _map_new_to_old in Reader.pm. I don't know, whether
> this is a bug, or actually the desired behaviour for other possible
> uses of pmc files. I currently patch this myself (commenting it out)
> before I install NYTProf on my machine, but maybe an option could be
> added, so the line could simply be skipped depending on the startup
> options of nytprofhtml.

The is_pmc logic was added for Larry Wall so he could profile his
STD.pm Perl6 compiler.  I've forgotten the details now, except that the
way it currently works suited his needs at the time.

If you give me detailed instructions to reproduce the problem you're
seeing I'll ponder what changes I might make.

> 2) Hi-Resolution Clocks on Mac OS X
> 
> It's possible to at least simulate clock_gettime on Mac OS X by using
> the Mach time functions. A code example for that is e.g. here:
> http://le-depotoir.googlecode.com/svn/trunk/misc/clock_gettime_stub.c

Thanks. Based on http://developer.apple.com/mac/library/qa/qa2004/qa1398.html
it seems.

> Maybe something similar could be integrated into NYTProf to increase
> the accuracy of its reports on Mac OS X.

That would be great! Could you produce a patch for that?

Pretty simple. Something along the lines of... adding the file and
$mm_opts{DEFINE} .= '-DHAS_CLOCK_GETTIME -DCLOCK_GETTIME_OSX_EMU';
into Makefile.PL at an appropriate spot, and something like
    #ifdef CLOCK_GETTIME_OSX_EMU
    #include "clock_gettime_stub.c"
    #endif
in NYTProf.xs.

Thanks!

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