CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 1602
content-type: text/html; charset=utf-8
last-modified: Sat, 11 Oct 2025 12:02:53 GMT
traceparent: 2f3ae80bc97c1dfca8030013930a1314
strict-transport-security: max-age=15768000
Code review request for the perl guts vodoo in NYTProf v2 - nntp.perl.org
Front page | perl.perl5.porters |
Postings from July 2008
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

Code review request for the perl guts vodoo in NYTProf v2
From:
Tim BunceDate:
July 20, 2008 17:47Subject:
Code review request for the perl guts vodoo in NYTProf v2Message ID:
20080721004737.GB85786@timac.localIn my headlong charge to get Devel::NYTProf v2 out before OSCON I've not had much time to review the code I'd cooked up to dig around in perl internals. For example: #if (PERL_VERSION < 8) || ((PERL_VERSION == 8) && (PERL_SUBVERSION < 8)) /* If we're using DB::DB() instead of opcode redirection with an old perl * then PL_curcop in DB() will refer to the DB() wrapper in Devel/NYTProf.pm * so we'd have to crawl the stack to find the right cop. However, for some * reason that I don't pretend to understand the following expression works: */ #define PL_curcop_nytprof (use_db_sub ? ((cxstack + cxstack_ix)->blk_oldcop) : PL_curcop) #else #define PL_curcop_nytprof PL_curcop #endif Others include the visit_contexts(), check_context(), start_cop_of_context() and closest_cop() functions. I've been playing with magic beyond my powers and have, so far, survived unscathed (not counting too many late night hacking sessions). I suspect that the code is suboptimal in places. Perhaps lots of places. Any feedback gratefully recieved. Tim. https://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/ https://code.google.com/p/perl-devel-nytprof/source/browse/trunk/NYTProf.xs
- Code review request for the perl guts vodoo in NYTProf v2 by Tim Bunce
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About