perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve...@apache.org
Subject svn commit: r1602093 - in /perl/modperl/trunk: ./ src/modules/perl/ t/modperl/ t/response/TestModperl/ xs/ModPerl/Interpreter/ xs/maps/ xs/tables/current/Apache2/ xs/tables/current/ModPerl/
Date Thu, 12 Jun 2014 08:39:46 GMT
Author: stevehay
Date: Thu Jun 12 08:39:46 2014
New Revision: 1602093

URL: http://svn.apache.org/r1602093
Log:
[Oops. Merging from httpd24threading back to trunk isn't going to work yet. The branches httpd24
and threading were both copied from trunk. The threading branch was then merged into httpd24threading,
which was copied from httpd24 so all of the threading branch's changes will find their way
back to trunk when httpd24threading is merged back, but the changes on httpd24 prior to httpd24threading
being copied from it have been missed: there are no *revisions* on httpd24threading containing
those changes, so httpd24 needs merging back to trunk first, and only then can we merge httpd24threading
back to trunk...]

Reverse merged revision(s) 1602085, 1602083-1602082 from perl/modperl/trunk:
Merged revision(s) 1537493 from perl/modperl/branches/httpd24threading:
Merged revision(s) 594347 from perl/modperl/branches/threading:
Expose modperl_interp_pool_t via ModPerl::InterpPool, modperl_tipool_t
via ModPerl::TiPool and modperl_tipool_config_t via ModPerl::TiPoolConfig

Reviewed-By: Gozer
Submitted-By: Torsten Foertsch <torsten.foertsch@gmx.net>
Message-Id: <200710242028.07750.torsten.foertsch@gmx.net>


........

........

........
Merged revision(s) 1537484 from perl/modperl/branches/httpd24threading:
Merged revision(s) 584377 from perl/modperl/branches/threading:
Introduce ModPerl::Interpreter, an interface to modperl_interp_t.
Note, this currently does not behave correctly with a non-threaded
Apache

Submitted-By Torsten Foertsch <torsten.foertsch@gmx.net>
Message-Id: <200710101543.33946.torsten.foertsch@gmx.net>
Reviewed-By: gozer

........

........

........
Merged revision(s) 1537492 from perl/modperl/branches/httpd24threading:
Merged revision(s) 594345 from perl/modperl/branches/threading:
Cleanup modperl_trace() a little by always prefixing trace
messages with the current pid/tid and always adding a newline.

Simplifies things a little, and modperl_pid_tid() goes
away.

Reviewed-By: gozer
Submitted-By: Torsten Foertsch <torsten.foertsch@gmx.net>
Message-Id: <200710221220.17860.torsten.foertsch@gmx.net>


........

........

........

Removed:
    perl/modperl/trunk/t/response/TestModperl/interpreter.pm
    perl/modperl/trunk/xs/ModPerl/Interpreter/
    perl/modperl/trunk/xs/maps/modperl_structures.map
Modified:
    perl/modperl/trunk/   (props changed)
    perl/modperl/trunk/Changes
    perl/modperl/trunk/src/modules/perl/modperl_callback.c
    perl/modperl/trunk/src/modules/perl/modperl_cmd.c
    perl/modperl/trunk/src/modules/perl/modperl_common_log.c
    perl/modperl/trunk/src/modules/perl/modperl_debug.c
    perl/modperl/trunk/src/modules/perl/modperl_debug.h
    perl/modperl/trunk/src/modules/perl/modperl_env.c
    perl/modperl/trunk/src/modules/perl/modperl_handler.c
    perl/modperl/trunk/src/modules/perl/modperl_mgv.c
    perl/modperl/trunk/src/modules/perl/modperl_util.c
    perl/modperl/trunk/src/modules/perl/modperl_util.h
    perl/modperl/trunk/t/modperl/   (props changed)
    perl/modperl/trunk/xs/maps/modperl_functions.map
    perl/modperl/trunk/xs/maps/modperl_types.map
    perl/modperl/trunk/xs/tables/current/Apache2/StructureTable.pm
    perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm

Propchange: perl/modperl/trunk/
            ('svn:mergeinfo' removed)

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Thu Jun 12 08:39:46 2014
@@ -12,12 +12,6 @@ Also refer to the Apache::Test changes l
 
 =item 2.0.9-dev
 
-Expose modperl_interp_pool_t via ModPerl::InterpPool, modperl_tipool_t
-via ModPerl::TiPool and modperl_tipool_config_t via ModPerl::TiPoolConfig
-[Torsten Foertsch]
-
-Expose modperl_interp_t via ModPerl::Interpreter [Torsten Foertsch]
-
 Fix t/compat/apache_file.t on Windows. Apache::File->tmpfile() wants TMPDIR
 or TEMP from the environment, or else defaults to /tmp. The latter is no
 good on Windows, so make sure the environment variables are passed through.

Modified: perl/modperl/trunk/src/modules/perl/modperl_callback.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_callback.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_callback.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_callback.c Thu Jun 12 08:39:46 2014
@@ -88,7 +88,8 @@ int modperl_callback(pTHX_ modperl_handl
                 name = handler->name;
             }
 
-            MP_TRACE_h(MP_FUNC, "[%s] lookup of %s failed",
+            MP_TRACE_h(MP_FUNC, "[%s %s] lookup of %s failed",
+                       modperl_pid_tid(p),
                        modperl_server_desc(s, p), name);
             ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
                          "lookup of '%s' failed", name);
@@ -253,7 +254,8 @@ int modperl_callback_run_handlers(int id
 
     modperl_callback_current_callback_set(desc);
 
-    MP_TRACE_h(MP_FUNC, "running %d %s handlers", av->nelts, desc);
+    MP_TRACE_h(MP_FUNC, "[%s] running %d %s handlers",
+               modperl_pid_tid(p), av->nelts, desc);
     handlers = (modperl_handler_t **)av->elts;
 
     for (i=0; i<av->nelts; i++) {

Modified: perl/modperl/trunk/src/modules/perl/modperl_cmd.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_cmd.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_cmd.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_cmd.c Thu Jun 12 08:39:46 2014
@@ -69,15 +69,17 @@ char *modperl_cmd_push_filter_handlers(M
      */
     if (*name == '-') {
         MP_TRACE_h(MP_FUNC,
-                   "warning: filter handler %s will be not autoloaded. "
+                   "[%s] warning: filter handler %s will be not autoloaded. "
                    "Unless the module defining this handler is explicitly "
-                   "preloaded, filter attributes will be ignored.\n");
+                   "preloaded, filter attributes will be ignored.\n",
+                   modperl_pid_tid(p), h->name);
     }
     else {
         MpHandlerAUTOLOAD_On(h);
         MP_TRACE_h(MP_FUNC,
-                   "filter handler %s will be autoloaded (to make "
-                   "the filter attributes available)\n", h->name);
+                   "[%s] filter handler %s will be autoloaded (to make "
+                   "the filter attributes available)\n",
+                   modperl_pid_tid(p), h->name);
     }
 
     if (!*handlers) {

Modified: perl/modperl/trunk/src/modules/perl/modperl_common_log.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_common_log.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_common_log.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_common_log.c Thu Jun 12 08:39:46 2014
@@ -16,7 +16,6 @@
 
 #include "modperl_common_includes.h"
 #include "modperl_common_log.h"
-#include "modperl_debug.h"
 
 #undef getenv /* from XSUB.h */
 
@@ -49,17 +48,7 @@ void modperl_trace(const char *func, con
         return;
     }
 
-    if (modperl_threaded_mpm()) {
-        apr_file_printf(logfile, "[%lu/%lu] ", (unsigned long)getpid(),
-			modperl_threads_started()
-			? (unsigned long)apr_os_thread_current()
-			: 0);
-    }
-    else {
-        apr_file_printf(logfile, "[%lu] ", (unsigned long)getpid());
-    }
-
-    if (func && *func) {
+    if (func) {
         apr_file_printf(logfile, "%s: ", func);
     }
 

Modified: perl/modperl/trunk/src/modules/perl/modperl_debug.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_debug.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_debug.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_debug.c Thu Jun 12 08:39:46 2014
@@ -21,6 +21,28 @@ char *modperl_server_desc(server_rec *s,
     return apr_psprintf(p, "%s:%u", s->server_hostname, s->port);
 }
 
+/* used in debug traces */
+MP_INLINE char *modperl_pid_tid(apr_pool_t *p)
+{
+    if (modperl_threaded_mpm()) {
+        return apr_psprintf(p, "%lu"
+#if APR_HAS_THREADS
+                            "/%lu"
+#endif /* APR_HAS_THREADS */
+                            , (unsigned long)getpid()
+#if APR_HAS_THREADS
+                            , modperl_threads_started()
+                            ? (unsigned long)apr_os_thread_current()
+                            : 0
+#endif /* APR_HAS_THREADS */
+            );
+    }
+    else {
+        return apr_psprintf(p, "%lu", (unsigned long)getpid());
+    }
+}
+
+    
 #ifdef MP_TRACE
 void modperl_apr_table_dump(pTHX_ apr_table_t *table, char *name)
 {

Modified: perl/modperl/trunk/src/modules/perl/modperl_debug.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_debug.h?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_debug.h (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_debug.h Thu Jun 12 08:39:46 2014
@@ -20,6 +20,7 @@
 #include "mod_perl.h"
 
 char *modperl_server_desc(server_rec *s, apr_pool_t *p);
+MP_INLINE char *modperl_pid_tid(apr_pool_t *p);
 
 #ifdef MP_TRACE
 void modperl_apr_table_dump(pTHX_ apr_table_t *table, char *name);

Modified: perl/modperl/trunk/src/modules/perl/modperl_env.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_env.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_env.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_env.c Thu Jun 12 08:39:46 2014
@@ -232,15 +232,15 @@ void modperl_env_configure_server(pTHX_ 
         }
     }
 
-    MP_TRACE_e(MP_FUNC, "\t[0x%lx/%s]"
+    MP_TRACE_e(MP_FUNC, "\t[%s/0x%lx/%s]"
                "\n\t@ENV{keys scfg->SetEnv} = values scfg->SetEnv;",
-               modperl_interp_address(aTHX),
+               modperl_pid_tid(p), modperl_interp_address(aTHX),
                modperl_server_desc(s, p));
     modperl_env_table_populate(aTHX_ scfg->SetEnv);
 
-    MP_TRACE_e(MP_FUNC, "\t[0x%lx/%s]"
+    MP_TRACE_e(MP_FUNC, "\t[%s/0x%lx/%s]"
                "\n\t@ENV{keys scfg->PassEnv} = values scfg->PassEnv;",
-               modperl_interp_address(aTHX),
+               modperl_pid_tid(p), modperl_interp_address(aTHX),
                modperl_server_desc(s, p));
     modperl_env_table_populate(aTHX_ scfg->PassEnv);
 }
@@ -270,9 +270,9 @@ void modperl_env_configure_request_dir(p
          * collisions with per-server PerlSetEnv entries are
          * resolved via the nature of a Perl hash
          */
-        MP_TRACE_e(MP_FUNC, "\t[0x%lx/%s]"
+        MP_TRACE_e(MP_FUNC, "\t[%s/0x%lx/%s]"
                    "\n\t@ENV{keys dcfg->SetEnv} = values dcfg->SetEnv;",
-                   modperl_interp_address(aTHX),
+                   modperl_pid_tid(r->pool), modperl_interp_address(aTHX),
                    modperl_server_desc(r->server, r->pool));
         modperl_env_table_populate(aTHX_ dcfg->SetEnv);
 
@@ -303,9 +303,9 @@ void modperl_env_configure_request_srv(p
      */
 
     if (!apr_is_empty_table(scfg->SetEnv)) {
-        MP_TRACE_e(MP_FUNC, "\t[0x%lx/%s]"
+        MP_TRACE_e(MP_FUNC, "\t[%s/0x%lx/%s]"
                    "\n\t@ENV{keys scfg->SetEnv} = values scfg->SetEnv;",
-                   modperl_interp_address(aTHX),
+                   modperl_pid_tid(r->pool), modperl_interp_address(aTHX),
                    modperl_server_desc(r->server, r->pool));
         modperl_env_table_populate(aTHX_ scfg->SetEnv);
 
@@ -313,9 +313,9 @@ void modperl_env_configure_request_srv(p
     }
 
     if (!apr_is_empty_table(scfg->PassEnv)) {
-        MP_TRACE_e(MP_FUNC, "\t[0x%lx/%s]"
+        MP_TRACE_e(MP_FUNC, "\t[%s/0x%lx/%s]"
                    "\n\t@ENV{keys scfg->PassEnv} = values scfg->PassEnv;",
-                   modperl_interp_address(aTHX),
+                   modperl_pid_tid(r->pool), modperl_interp_address(aTHX),
                    modperl_server_desc(r->server, r->pool));
         modperl_env_table_populate(aTHX_ scfg->PassEnv);
 
@@ -363,9 +363,9 @@ void modperl_env_request_populate(pTHX_ 
      * phases from populating %ENV with new subprocess_env table entries
      */
 
-    MP_TRACE_e(MP_FUNC, "\t[0x%lx/%s%s]"
+    MP_TRACE_e(MP_FUNC, "\t[%s/0x%lx/%s%s]"
                "\n\t@ENV{keys r->subprocess_env} = values r->subprocess_env;",
-               modperl_interp_address(aTHX),
+               modperl_pid_tid(r->pool), modperl_interp_address(aTHX),
                modperl_server_desc(r->server, r->pool), r->uri);
 
     /* we can eliminate some of the cost by only doing CGI variables once
@@ -397,8 +397,8 @@ void modperl_env_request_unpopulate(pTHX
     }
 
     MP_TRACE_e(MP_FUNC,
-               "\n\t[0x%lx/%s%s]\n\tdelete @ENV{keys r->subprocess_env};",
-               modperl_interp_address(aTHX),
+               "\n\t[%s/0x%lx/%s%s]\n\tdelete @ENV{keys r->subprocess_env};",
+               modperl_pid_tid(r->pool), modperl_interp_address(aTHX),
                modperl_server_desc(r->server, r->pool), r->uri);
     modperl_env_table_unpopulate(aTHX_ r->subprocess_env);
 
@@ -411,8 +411,7 @@ void modperl_env_request_tie(pTHX_ reque
     EnvMgLenSet(-1);
 
 #ifdef MP_PERL_HV_GMAGICAL_AWARE
-    MP_TRACE_e(MP_FUNC, "[0x%lx] tie %%ENV, $r\t (%s%s)",
-               modperl_interp_address(aTHX),
+    MP_TRACE_e(MP_FUNC, "[%s/0x%lx] tie %%ENV, $r\t (%s%s)",
                modperl_pid_tid(r->pool), modperl_interp_address(aTHX),
                modperl_server_desc(r->server, r->pool), r->uri);
     SvGMAGICAL_on((SV*)ENVHV);
@@ -424,8 +423,7 @@ void modperl_env_request_untie(pTHX_ req
     EnvMgObjSet(NULL);
 
 #ifdef MP_PERL_HV_GMAGICAL_AWARE
-    MP_TRACE_e(MP_FUNC, "[0x%lx] untie %%ENV; # from r\t (%s%s)",
-               modperl_interp_address(aTHX),
+    MP_TRACE_e(MP_FUNC, "[%s/0x%lx] untie %%ENV; # from r\t (%s%s)",
                modperl_pid_tid(r->pool), modperl_interp_address(aTHX),
                modperl_server_desc(r->server, r->pool), r->uri);
     SvGMAGICAL_off((SV*)ENVHV);
@@ -482,7 +480,8 @@ static int modperl_env_magic_set_all(pTH
                 apr_table_set(r->subprocess_env,
                               hv_iterkey(entry, &keylen),
                               SvPV(hv_iterval((HV*)sv, entry), n_a));
-                MP_TRACE_e(MP_FUNC, "[0x%lx] localizing: %s => %s",
+                MP_TRACE_e(MP_FUNC, "[%s/0x%lx] localizing: %s => %s",
+                           modperl_pid_tid(r->pool),
                            modperl_interp_address(aTHX),
                            hv_iterkey(entry, &keylen),
                            SvPV(hv_iterval((HV*)sv, entry), n_a));
@@ -494,14 +493,17 @@ static int modperl_env_magic_set_all(pTH
         HE *entry;
         STRLEN n_a;
 
-        MP_TRACE_e(MP_FUNC, "\n\t[0x%lx] populating %%ENV:",
-                   modperl_interp_address(aTHX));
+        MP_TRACE_e(MP_FUNC,
+                   "\n\t[%lu/0x%lx] populating %%ENV:",
+                   (unsigned long)getpid(), modperl_interp_address(aTHX));
 
         hv_iterinit((HV*)sv);
 
         while ((entry = hv_iternext((HV*)sv))) {
                 I32 keylen;
                 MP_TRACE_e(MP_FUNC, "$ENV{%s} = \"%s\";",
+                           modperl_pid_tid(r->pool),
+                           modperl_interp_address(aTHX),
                            hv_iterkey(entry, &keylen),
                            SvPV(hv_iterval((HV*)sv, entry), n_a));
             }
@@ -518,12 +520,14 @@ static int modperl_env_magic_clear_all(p
 
     if (r) {
         apr_table_clear(r->subprocess_env);
-        MP_TRACE_e(MP_FUNC, "[0x%lx] clearing all magic off r->subprocess_env",
-                   modperl_interp_address(aTHX));
+        MP_TRACE_e(MP_FUNC,
+                   "[%s/0x%lx] clearing all magic off r->subprocess_env",
+                   modperl_pid_tid(r->pool), modperl_interp_address(aTHX));
     }
     else {
-        MP_TRACE_e(MP_FUNC, "[0x%lx] %%ENV = ();",
-                   modperl_interp_address(aTHX));
+        MP_TRACE_e(MP_FUNC,
+                   "[%s/0x%lx] %%ENV = ();",
+                   modperl_pid_tid(r->pool), modperl_interp_address(aTHX));
         return MP_PL_vtbl_call(env, clear);
     }
 
@@ -538,7 +542,8 @@ static int modperl_env_magic_set(pTHX_ S
         MP_dENV_KEY;
         MP_dENV_VAL;
         apr_table_set(r->subprocess_env, key, val);
-        MP_TRACE_e(MP_FUNC, "[0x%lx] r->subprocess_env set: %s => %s",
+        MP_TRACE_e(MP_FUNC, "[%s/0x%lx] r->subprocess_env set: %s => %s",
+                   modperl_pid_tid(r->pool),
                    modperl_interp_address(aTHX), key, val);
     }
     else {
@@ -546,7 +551,8 @@ static int modperl_env_magic_set(pTHX_ S
         MP_dENV_KEY;
         MP_dENV_VAL;
         MP_TRACE_e(MP_FUNC,
-                   "[0x%lx] $ENV{%s} = \"%s\";",
+                   "[%lu/0x%lx] $ENV{%s} = \"%s\";",
+                   (unsigned long)getpid(),
                    modperl_interp_address(aTHX), key, val);
 #endif
         return MP_PL_vtbl_call(envelem, set);
@@ -562,13 +568,15 @@ static int modperl_env_magic_clear(pTHX_
     if (r) {
         MP_dENV_KEY;
         apr_table_unset(r->subprocess_env, key);
-        MP_TRACE_e(MP_FUNC, "[0x%lx] r->subprocess_env unset: %s",
+        MP_TRACE_e(MP_FUNC, "[%s/0x%lx] r->subprocess_env unset: %s",
+                   modperl_pid_tid(r->pool),
                    modperl_interp_address(aTHX), key);
     }
     else {
 #ifdef MP_TRACE
         MP_dENV_KEY;
-        MP_TRACE_e(MP_FUNC, "[0x%lx] delete $ENV{%s};",
+        MP_TRACE_e(MP_FUNC, "[%lu/0x%lx] delete $ENV{%s};",
+                   (unsigned long)getpid(),
                    modperl_interp_address(aTHX), key);
 #endif
         return MP_PL_vtbl_call(envelem, clear);
@@ -589,13 +597,15 @@ static int modperl_env_magic_get(pTHX_ S
         if ((val = apr_table_get(r->subprocess_env, key))) {
             sv_setpv(sv, val);
             MP_TRACE_e(MP_FUNC,
-                       "[0x%lx] r->subprocess_env get: %s => %s",
+                       "[%s/0x%lx] r->subprocess_env get: %s => %s",
+                       modperl_pid_tid(r->pool),
                        modperl_interp_address(aTHX), key, val);
         }
         else {
             sv_setsv(sv, &PL_sv_undef);
             MP_TRACE_e(MP_FUNC,
-                       "[0x%lx] r->subprocess_env get: %s => undef",
+                       "[%s/0x%lx] r->subprocess_env get: %s => undef",
+                       modperl_pid_tid(r->pool),
                        modperl_interp_address(aTHX), key);
         }
     }
@@ -604,7 +614,8 @@ static int modperl_env_magic_get(pTHX_ S
 #ifdef MP_TRACE
         MP_dENV_KEY;
         MP_TRACE_e(MP_FUNC,
-                   "[0x%lx] there is no svt_get in PL_vtbl_envelem: %s",
+                   "[%lu/0x%lx] there is no svt_get in PL_vtbl_envelem: %s",
+                   (unsigned long)getpid(),
                    modperl_interp_address(aTHX), key);
 #endif
     }

Modified: perl/modperl/trunk/src/modules/perl/modperl_handler.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_handler.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_handler.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_handler.c Thu Jun 12 08:39:46 2014
@@ -39,7 +39,8 @@ modperl_handler_t *modperl_handler_new(a
     /* not necessary due to apr_pcalloc */
     /* handler->cv = NULL; */
     handler->name = name;
-    MP_TRACE_h(MP_FUNC, "new handler %s", handler->name);
+    MP_TRACE_h(MP_FUNC, "[%s] new handler %s",
+               modperl_pid_tid(p), handler->name);
 
     return handler;
 }
@@ -104,7 +105,8 @@ MP_INLINE modperl_mgv_t *modperl_handler
     anon->len  = strlen(anon->name);
     PERL_HASH(anon->hash, anon->name, anon->len);
 
-    MP_TRACE_h(MP_FUNC, "new anon handler: '%s'", anon->name);
+    MP_TRACE_h(MP_FUNC, "[%s] new anon handler: '%s'",
+               modperl_pid_tid(p), anon->name);
     return anon;
 }
 
@@ -173,7 +175,8 @@ modperl_handler_t *modperl_handler_new_a
     handler->cv   = cv;
     handler->name = NULL;
 
-    MP_TRACE_h(MP_FUNC, "new cached cv anon handler");
+    MP_TRACE_h(MP_FUNC, "[%s] new cached cv anon handler",
+               modperl_pid_tid(p));
 #endif
 
     return handler;
@@ -220,8 +223,9 @@ int modperl_handler_resolve(pTHX_ modper
         MpHandlerAUTOLOAD_On(handler);
 
         MP_TRACE_h(MP_FUNC,
-                   "[%s] handler %s hasn't yet been resolved, "
+                   "[%s %s] handler %s hasn't yet been resolved, "
                    "attempting to resolve using %s pool 0x%lx\n",
+                   modperl_pid_tid(p),
                    modperl_server_desc(s, p),
                    modperl_handler_name(handler),
                    duped ? "current" : "server conf",

Modified: perl/modperl/trunk/src/modules/perl/modperl_mgv.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_mgv.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_mgv.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_mgv.c Thu Jun 12 08:39:46 2014
@@ -211,12 +211,14 @@ int modperl_mgv_resolve(pTHX_ modperl_ha
         handler->name    = NULL;
         handler->mgv_obj = modperl_handler_anon_next(aTHX_ p);
         modperl_handler_anon_add(aTHX_ handler->mgv_obj, cv);
-        MP_TRACE_h(MP_FUNC, "new anon handler");
+        MP_TRACE_h(MP_FUNC, "[%s] new anon handler",
+                   modperl_pid_tid(p));
 #else
         SvREFCNT_inc(cv);
         handler->cv      = cv;
         handler->name    = NULL;
-        MP_TRACE_h(MP_FUNC, "new cached-cv anon handler");
+        MP_TRACE_h(MP_FUNC, "[%s] new cached-cv anon handler",
+                   modperl_pid_tid(p));
 #endif
 
         FREETMPS;LEAVE;
@@ -338,7 +340,8 @@ int modperl_mgv_resolve(pTHX_ modperl_ha
         modperl_mgv_append(aTHX_ p, handler->mgv_cv, handler_name);
 
         MpHandlerPARSED_On(handler);
-        MP_TRACE_h(MP_FUNC, "found `%s' in class `%s' as a %s",
+        MP_TRACE_h(MP_FUNC, "[%s] found `%s' in class `%s' as a %s",
+                   modperl_pid_tid(p),
                    handler_name, HvNAME(stash),
                    MpHandlerMETHOD(handler) ? "method" : "function");
         MODPERL_MGV_DEEP_RESOLVE(handler, p);

Modified: perl/modperl/trunk/src/modules/perl/modperl_util.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_util.c?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_util.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_util.c Thu Jun 12 08:39:46 2014
@@ -470,8 +470,9 @@ void modperl_perl_call_list(pTHX_ AV *su
     I32 i, oldscope = PL_scopestack_ix;
     SV **ary = AvARRAY(subs);
 
-    MP_TRACE_g(MP_FUNC, MP_TRACEf_PERLID
-               " running %d %s subs", MP_TRACEv_PERLID_
+    MP_TRACE_g(MP_FUNC, "pid %lu" MP_TRACEf_TID MP_TRACEf_PERLID
+               " running %d %s subs",
+               (unsigned long)getpid(), MP_TRACEv_TID_ MP_TRACEv_PERLID_
                AvFILLp(subs)+1, name);
 
     for (i=0; i<=AvFILLp(subs); i++) {

Modified: perl/modperl/trunk/src/modules/perl/modperl_util.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_util.h?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_util.h (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_util.h Thu Jun 12 08:39:46 2014
@@ -101,8 +101,20 @@ SV *modperl_apr_array_header2avrv(pTHX_ 
 apr_array_header_t *modperl_avrv2apr_array_header(pTHX_ apr_pool_t *p,
                                                   SV *avrv);
 void modperl_package_unload(pTHX_ const char *package);
+#if defined(MP_TRACE) && APR_HAS_THREADS
+#define MP_TRACEf_TID   "/tid 0x%lx"
+#define MP_TRACEv_TID   (unsigned long)apr_os_thread_current()
+#define MP_TRACEv_TID_  MP_TRACEv_TID,
+#define MP_TRACEv__TID  ,MP_TRACEv_TID
+#else
+#define MP_TRACEf_TID
+#define MP_TRACEv_TID
+#define MP_TRACEv_TID_
+#define MP_TRACEv__TID
+#endif /* APR_HAS_THREADS */
+
 #if defined(MP_TRACE) && defined(USE_ITHREADS)
-#define MP_TRACEf_PERLID   "perl id 0x%lx"
+#define MP_TRACEf_PERLID   "/perl id 0x%lx"
 #define MP_TRACEv_PERLID   (unsigned long)my_perl
 #define MP_TRACEv_PERLID_  MP_TRACEv_PERLID,
 #define MP_TRACEv__PERLID  ,MP_TRACEv_PERLID

Propchange: perl/modperl/trunk/t/modperl/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Jun 12 08:39:46 2014
@@ -1,7 +1,6 @@
 current_callback.t
 env.t
 endav.t
-interpreter.t
 printf.t
 print.t
 dir_config.t

Modified: perl/modperl/trunk/xs/maps/modperl_functions.map
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/maps/modperl_functions.map?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/xs/maps/modperl_functions.map (original)
+++ perl/modperl/trunk/xs/maps/modperl_functions.map Thu Jun 12 08:39:46 2014
@@ -162,6 +162,3 @@ MODULE=Apache2::MPM    PACKAGE=Apache2::
 
 MODULE=Apache2::Access   PACKAGE=guess
  mpxs_Apache2__RequestRec_allow_override_opts
-
-MODULE=ModPerl::Interpreter
- mpxs_ModPerl__Interpreter_current | | class=Nullsv

Modified: perl/modperl/trunk/xs/maps/modperl_types.map
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/maps/modperl_types.map?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/xs/maps/modperl_types.map (original)
+++ perl/modperl/trunk/xs/maps/modperl_types.map Thu Jun 12 08:39:46 2014
@@ -1,11 +1,6 @@
 ##########  mod_perl types  ##########
 
-struct modperl_filter_t        | Apache2::OutputFilter
-struct modperl_interp_t        | ModPerl::Interpreter
-struct modperl_interp_pool_t   | ModPerl::InterpPool
-struct modperl_tipool_t        | ModPerl::TiPool
-struct modperl_tipool_config_t | ModPerl::TiPoolConfig
-PerlInterpreter *              | IV
+struct modperl_filter_t | Apache2::OutputFilter
 
 ##########  Perl types  ##########
 

Modified: perl/modperl/trunk/xs/tables/current/Apache2/StructureTable.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/tables/current/Apache2/StructureTable.pm?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/xs/tables/current/Apache2/StructureTable.pm (original)
+++ perl/modperl/trunk/xs/tables/current/Apache2/StructureTable.pm Thu Jun 12 08:39:46 2014
@@ -3333,126 +3333,6 @@ $Apache2::StructureTable = [
         'name' => 'suexec_enabled'
       }
     ]
-  },
-  {
-    'type' => 'modperl_interp_t',
-    'elts' => [
-      {
-        'type' => 'modperl_interp_pool_t *',
-        'name' => 'mip'
-      },
-      {
-        'type' => 'PerlInterpreter *',
-        'name' => 'perl'
-      },
-      {
-        'type' => 'int',
-        'name' => 'num_requests'
-      },
-      {
-        'type' => 'U8',
-        'name' => 'flags'
-      },
-      {
-        'type' => 'modperl_config_con_t *',
-        'name' => 'ccfg'
-      },
-      {
-        'type' => 'int',
-        'name' => 'refcnt'
-      },
-      {
-        'type' => 'unsigned long',
-        'name' => 'tid'
-      }
-    ]
-  },
-  {
-    'type' => 'modperl_interp_pool_t',
-    'elts' => [
-      {
-        'type' => 'server_rec *',
-        'name' => 'server'
-      },
-      {
-        'type' => 'modperl_tipool_t *',
-        'name' => 'tipool'
-      },
-      {
-        'type' => 'modperl_tipool_config_t *',
-        'name' => 'tipool_cfg'
-      },
-      {
-        'type' => 'modperl_interp_t *',
-        'name' => 'parent'
-      }
-    ]
-  },
-  {
-    'type' => 'modperl_tipool_t',
-    'elts' => [
-      {
-        'type' => 'perl_mutex',
-        'name' => 'tiplock'
-      },
-      {
-        'type' => 'perl_cond',
-        'name' => 'available'
-      },
-      {
-        'type' => 'modperl_list_t *',
-        'name' => 'idle'
-      },
-      {
-        'type' => 'modperl_list_t *',
-        'name' => 'busy'
-      },
-      {
-        'type' => 'int',
-        'name' => 'in_use'
-      },
-      {
-        'type' => 'int',
-        'name' => 'size'
-      },
-      {
-        'type' => 'void *',
-        'name' => 'data'
-      },
-      {
-        'type' => 'modperl_tipool_config_t *',
-        'name' => 'cfg'
-      },
-      {
-        'type' => 'modperl_tipool_vtbl_t *',
-        'name' => 'func'
-      }
-    ]
-  },
-  {
-    'type' => 'modperl_tipool_config_t',
-    'elts' => [
-      {
-        'type' => 'int',
-        'name' => 'start'
-      },
-      {
-        'type' => 'int',
-        'name' => 'min_spare'
-      },
-      {
-        'type' => 'int',
-        'name' => 'max_spare'
-      },
-      {
-        'type' => 'int',
-        'name' => 'max'
-      },
-      {
-        'type' => 'int',
-        'name' => 'max_requests'
-      }
-    ]
   }
 ];
 

Modified: perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm?rev=1602093&r1=1602092&r2=1602093&view=diff
==============================================================================
--- perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm (original)
+++ perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm Thu Jun 12 08:39:46 2014
@@ -8255,24 +8255,6 @@ $ModPerl::FunctionTable = [
         'name' => 'func'
       }
     ]
-  },
-  {
-    'return_type' => 'modperl_interp_t *',
-    'name' => 'mpxs_ModPerl__Interpreter_current',
-    'attr' => [
-      'static',
-      '__inline__'
-    ],
-    'args' => [
-      {
-        'type' => 'PerlInterpreter *',
-        'name' => 'my_perl'
-      },
-      {
-        'type' => 'SV *',
-        'name' => 'class'
-      }
-    ]
   }
 ];
 



Mime
View raw message