ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-tk
perl-tk
RE: assess what subroutines are currently being called
by Greg London other posts by this author
Apr 11 2007 1:11PM messages near this date
Re: assess what subroutines are currently being called | Re: assess what subroutines are currently being called
SOURCE What do you mean by "other subroutines"? 

If you are only interested in your own subroutines,

then that's probably do-able. If you want to know 

everything that's going on, then that might be a bit

more of a problem, because you have to hook into Tk

somehow.

 

If you just want to monitor all your callbacks, 

and all your callbacks are named subroutines,

you could use one of the profiling packages off

of CPAN to profile your subroutines, and then 

keep track of when each is getting called.

 

I wrote a profiling package called Devel::AutoProfiler

which will automatically find all your subroutines

in the symbol table and profile them for you. Someone

extended it and improved it, but the idea is the same:

pre- and post- process each subroutine to track when

it's called.

 

You might actually be able to use this to profile some of Tk itself,

just use autoprofiler, then use Tk, and see what it prints out.

(though it will slow things down)

 

If your callbacks are anonymous subs, then I think you'll

have to manually instrument them yourself. It's been a while

since I looked at autoprofiler, but i think it can only find

named subroutines.

 

Greg London

------------------------------------------------------------------------------

 

 

I have a top level widget event timer that calls a sub routine
periodically and does some checks.

I'd like to add some code, for specific reasons, to be able to assess
what other subroutines are currently being executed with the mainloop. 
Is this possible?  I'd expect the call to always indicate the event sub
to be running so any additional subs is what I am interested in.

--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
ptk@[...].edu
https://mailman.stanford.edu/mailman/listinfo/ptk
Thread:
Listmail
Ala Qumsieh
Greg London
Listmail
Darren Dunham
Listmail
Van Nieuwenhuize

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved