On Thu, 4 May 2000 [EMAIL PROTECTED] wrote:
 
> Sounds like a good plan.  The first piece to put together is the
> script that can register callbacks, and iterate through the perl
> threads.  Do we have a devel version that's got the mip->avail type
> stuff together, or is this something that will be coming together in
> the next few weeks?

it's in there now.

>  Okay so this is a module that would be loaded via
> httpd.conf so that the thread can be spun off, and it can begin
> analyzing.  It should have some parameters so that it doesn't suck up
> too much CPU time, like sleep n seconds between jumping to the next
> apache embedded interpreter thread, blah, blah.  Are we going to dump
> this info to perlmemorylogs?  (Configurable to some location, etc)  Or
> integrate it with some sort of online status program?
> <mod_perl_status :)>  Or both..., hehe, well, of course that's all
> later, first piece is to get the iterator built that registers
> callbacks.  As an aside, I think the callback thing was a really good
> idea on your part, that way you can analyze how much memory your
> programs are using and whether you need to re-think your design
> strategy or implement a cleaner.  Any cleaner, a real aggresive one,
> or a really kick back one.  In any event, I just wanted to mention
> that this was a really good idea of yours (the callbacks).

assuming your moving forward with this (making you a hero :), you should
be able to put the majority of it together without looking at the
mod_perl-2.0 source first.  the only thing you need to keep in mind is
that the c functions need to accept a PerlInterpreter argument with
-Dusethreads Perls.  Perl has some macros to deal with this "implicit
context", which would look something like so:

void symbol_table_walk(pTHX_ char *package, int recurse, ...)

testing with a vanilla Perl, you would call that like so:

symbol_table_walk(aTHX_ "main", TRUE, ...);

once it's integrated into mod_perl, something like so:

{
#ifdef USE_ITHREADS;
    pTHX;
    modperl_interp_t *interp = modperl_interp_get(...);
    aTHX = interp->perl;
#endif

    symbol_table_walk(aTHX_ "main", TRUE, ...);
    ...
}

that PerlInterpreter structure is used when macros such as:
gv_fetchpv("main", FALSE);

 translate into:

Perl_gv_fetchpv(my_perl, "main", FALSE);



Reply via email to