Branch: Tag:

2005-02-25

2005-02-25 15:21:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added ROXEN_DEBUG_MEMORY_TRACE.
Added roxen->current_configuration.

Rev: server/base_server/roxen.pike:1.895

6:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.894 2005/02/23 17:01:03 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.895 2005/02/25 15:21:06 grubba Exp $";      //! @appears roxen   //!
389:    return Privs(r, u, g);   }    + // Current Configuration. + Thread.Local current_configuration = Thread.Local(); +    // font cache and loading.   //   // This will be changed to a list of server global modules, to make it
3277:    //! but instead zero will be returned (this will be seen as a 'File    //! not found' error)    { +  current_configuration->set(id->conf);    string na = store( data,id );    mixed res;   #ifdef ARG_CACHE_DEBUG
4780:       restart_suicide_checker();    + #ifdef ROXEN_DEBUG_MEMORY_TRACE +  restart_roxen_debug_memory_trace(); + #endif +    #ifndef __NT__    restart_if_stuck( 0 );   #endif
4846:    call_out(check_commit_suicide, 180); // Minimum uptime: 3 minutes.   }    + #ifdef ROXEN_DEBUG_MEMORY_TRACE + static object roxen_debug_info_obj; + void restart_roxen_debug_memory_trace() + { +  remove_call_out(restart_roxen_debug_memory_trace); +  +  if (!roxen_debug_info_obj) { +  roxen_debug_info_obj = ((program)"config_interface/actions/debug_info.pike" + )(); +  } +  int t = time(0); +  string html = roxen_debug_info_obj->parse((["real_variables":([])])); +  if (!Stdio.is_dir("../var/debug")) { +  mkdir("../var/debug"); +  } +  Stdio.write_file(sprintf("../var/debug/memory_info_%d.rxml", t), html); +  call_out(restart_roxen_debug_memory_trace, 5); + } + #endif +    // Called from the administration interface.   string check_variable(string name, mixed value)   {