Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.431 2001/05/16 01:15:41 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.432 2001/05/16 12:56:39 per Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>   #include <timers.h>      #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:43: Inside #if defined(AVERAGE_PROFILING)
   current_stack += ({ ({ k, gethrtime(), gethrvtime() }) });    }       void leave( string k, RequestID id )    {    int t0 = gethrtime();    int t1 = gethrvtime();       if( !sizeof(current_stack ) )    { -  report_error("Popping out of profiling stack\n"); + // report_error("Popping out of profiling stack\n");    return;    }       int i = sizeof( current_stack )-1;    while( current_stack[ i ][0] != k && i >= 0 ) i--;       if(i < 0 )    { -  report_error("Popping out of profiling stack, cannot find %O in %O\n", -  k, current_stack); +     return;    } -  +  void low_leave( int i ) +  {    int tt = t0-current_stack[i][1];    int ttv = t1-current_stack[i][2];       if( i > 0 ) // Do not count child time in parent.    {    current_stack[i-1][1]+=tt+gethrtime()-t0;    current_stack[i-1][2]+=ttv+gethrvtime()-t1;    }    current_stack = current_stack[..i-1];    add_prof_entry( id, k, tt, ttv ); -  +  }; +  +  if( i != sizeof( current_stack )-1 ) +  { +  for( int j = sizeof( current_stack )-1; j>=i; j-- ) +  low_leave( j ); +  return;    } -  +  low_leave( i );    } -  + }      class ProfInfo( string url )   {    mapping data = ([]);    void add( string k, int h, int hrv )    {    if( !data[k] )    data[k] = ({ h, hrv, 1 });    else    {
Roxen.git/server/base_server/configuration.pike:124: Inside #if defined(AVERAGE_PROFILING)
     void debug_write_prof( )   {    foreach( sort( indices( profiling_info ) ), string p )    profiling_info[p]->dump();   }      void add_prof_entry( RequestID id, string k, int hr, int hrv )   {    string l = id->not_query; -  if( has_prefix( k, "find_internal" ) ) l = dirname(l); -  if( !profiling_info[l] ) profiling_info[l] = ProfInfo(l); + // if( has_prefix( k, "find_internal" ) ) l = dirname(l); +  if( has_prefix( l, query_internal_location() ) ) +  l = dirname( l ); // enough, really. +  +  if( !profiling_info[l] ) +  profiling_info[l] = ProfInfo(l); +     profiling_info[l]->add( k, hr, hrv );   }      void avg_prof_enter( string name, string type, RequestID id )   {    if( !id->misc->prof_stack )    id->misc->prof_stack = ProfStack();    id->misc->prof_stack->enter( name+":"+type,id );   }   void avg_prof_leave( string name, string type, RequestID id )
Roxen.git/server/base_server/configuration.pike:1400: Inside #if defined(MODULE_LEVEL_SECURITY)
   {    TRACE_LEAVE("Permission to access module denied.");    continue;    } else {    TRACE_LEAVE("");    TRACE_LEAVE("Request denied.");    TIMER_END(location_modules);    return tmp2;    }   #endif -  PROF_ENTER(Roxen.get_owning_module(tmp[1])->module_name,"location module"); +  PROF_ENTER(Roxen.get_owning_module(tmp[1])->module_name,"location");    TRACE_ENTER("Calling find_file()...", 0);    LOCK(tmp[1]);    fid=tmp[1]( file[ strlen(loc) .. ] + id->extra_extension, id);    UNLOCK();    TRACE_LEAVE(""); -  PROF_LEAVE(Roxen.get_owning_module(tmp[1])->module_name,"location module"); +  PROF_LEAVE(Roxen.get_owning_module(tmp[1])->module_name,"location");    if(fid)    {    id->virtfile = loc;       if(mappingp(fid))    {    TRACE_LEAVE("");    TRACE_LEAVE(examine_return_mapping(fid));    TIMER_END(location_modules);    return fid;
Roxen.git/server/base_server/configuration.pike:1476:    if(fid == -1)    {    if(no_magic)    {    TRACE_LEAVE("No magic requested. Returning -1.");    return -1;    }    TIMER_START(directory_module);    if(dir_module)    { -  PROF_ENTER(dir_module->module_name,"directory module"); +  PROF_ENTER(dir_module->module_name,"directory");    LOCK(dir_module);    TRACE_ENTER("Directory module", dir_module);    fid = dir_module->parse_directory(id);    UNLOCK(); -  PROF_LEAVE(dir_module->module_name,"directory module"); +  PROF_LEAVE(dir_module->module_name,"directory");    }    else    {    TRACE_LEAVE("No directory module. Returning 'no such file'");    return 0;    }    TIMER_END(directory_module);    if(mappingp(fid))    {    TRACE_LEAVE("Returning data");
Roxen.git/server/base_server/configuration.pike:1519: Inside #if defined(MODULE_LEVEL_SECURITY)
   continue;    }    else    {    TRACE_LEAVE("");    TRACE_LEAVE("Permission denied");    TIMER_END(extension_module);    return tmp;    }   #endif -  PROF_ENTER(Roxen.get_owning_module(funp)->module_name,"ext module"); +  PROF_ENTER(Roxen.get_owning_module(funp)->module_name,"ext");    LOCK(funp);    tmp=funp(fid, loc, id);    UNLOCK(); -  PROF_LEAVE(Roxen.get_owning_module(funp)->module_name,"ext module"); +  PROF_LEAVE(Roxen.get_owning_module(funp)->module_name,"ext");    if(tmp)    {    if(!objectp(tmp))    {    TRACE_LEAVE("");    TRACE_LEAVE("Returning data");    TIMER_END(extension_module);    return tmp;    }    if(fid && tmp != fid)