[svn:mod_parrot] r618 - in mod_parrot/trunk: eg/pir lib lib/ModParrot src
[email protected] Sun, 1 Mar 2009 07:32:14 -0800 (PST)
| Newsgroups | perl.cvs.mod_parrot |
|---|---|
| Message-ID | <[email protected]> |
Author: jhorwitz
Date: Sun Mar 1 07:32:10 2009
New Revision: 618
Modified:
mod_parrot/trunk/eg/pir/interpinfo.pir
mod_parrot/trunk/lib/ModParrot/Context.pir
mod_parrot/trunk/lib/mod_parrot.pir
mod_parrot/trunk/src/nci.c
Log:
add pool_name method to ModParrot;Context for debugging
Modified: mod_parrot/trunk/eg/pir/interpinfo.pir
==============================================================================
--- mod_parrot/trunk/eg/pir/interpinfo.pir (original)
+++ mod_parrot/trunk/eg/pir/interpinfo.pir Sun Mar 1 07:32:10 2009
@@ -46,6 +46,10 @@
r.'puts'("<h1>Parrot interpreter statistics</h1>\n")
r.'puts'("<table>\n")
+ $P0 = new ['ModParrot'; 'Context']
+ $S0 = $P0.'pool_name'()
+ print_row(r, "POOL NAME", $S0)
+
$I0 = interpinfo .INTERPINFO_TOTAL_MEM_ALLOC
$S0 = $I0
print_row(r, "TOTAL_MEM_ALLOC", $S0)
Modified: mod_parrot/trunk/lib/ModParrot/Context.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/Context.pir (original)
+++ mod_parrot/trunk/lib/ModParrot/Context.pir Sun Mar 1 07:32:10 2009
@@ -148,6 +148,16 @@
.return($P1)
.end
+=item ctx_pool_name
+
+=cut
+
+.sub pool_name :method
+ $P0 = get_root_global [ 'ModParrot'; 'NCI' ], 'ctx_pool_name'
+ $S0 = $P0()
+ .return($S0)
+.end
+
=head1 TODO
=over 4
Modified: mod_parrot/trunk/lib/mod_parrot.pir
==============================================================================
--- mod_parrot/trunk/lib/mod_parrot.pir (original)
+++ mod_parrot/trunk/lib/mod_parrot.pir Sun Mar 1 07:32:10 2009
@@ -108,6 +108,9 @@
dlfunc func, lib, "mpnci_csd", "pJ"
set_root_global [ 'ModParrot'; 'NCI' ], "csd", func
+ dlfunc func, lib, "mpnci_ctx_pool_name", "tJ"
+ set_root_global [ 'ModParrot'; 'NCI' ], "ctx_pool_name", func
+
dlfunc func, lib, "mpnci_raw_srv_config", "pJ"
set_root_global [ 'ModParrot'; 'NCI' ], "raw_srv_config", func
Modified: mod_parrot/trunk/src/nci.c
==============================================================================
--- mod_parrot/trunk/src/nci.c (original)
+++ mod_parrot/trunk/src/nci.c Sun Mar 1 07:32:10 2009
@@ -146,6 +146,16 @@
return(ctxp->raw_dir_config);
}
+const char *mpnci_ctx_pool_name(Parrot_Interp interp)
+{
+ modparrot_context *ctxp;
+ const char *name;
+
+ ctxp = get_interp_ctx(interp);
+ name = modparrot_get_ctx_pool_name(ctxp->ctx_pool);
+ return(name);
+}
+
request_rec *mpnci_request_rec_main(Parrot_Interp interp, request_rec *r)
{
return(r->main);