Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:57:   #else   # define SSL3_WERR(X)   #endif      #ifdef THREAD_DEBUG   # define THREAD_WERR(X) report_debug("Thread: "+X+"\n")   #else   # define THREAD_WERR(X)   #endif    + #ifdef LOG_GC_VERBOSE + #define LOG_GC_HISTOGRAM + #endif +  + #ifdef LOG_GC_HISTOGRAM + #define LOG_GC_TIMESTAMPS + #endif +    // Needed to get core dumps of seteuid()'ed processes on Linux.   #if constant(System.dumpable)   #define enable_coredumps(X) System.dumpable(X)   #else   #define enable_coredumps(X)   #endif      #define DDUMP(X) sol( combine_path( __FILE__, "../../" + X ), dump )   protected function sol = master()->set_on_load;   
Roxen.git/server/base_server/roxen.pike:6290: Inside #if defined(LOG_GC_TIMESTAMPS)
  #ifdef LOG_GC_TIMESTAMPS    Pike.gc_parameters(([ "pre_cb": lambda() {    gc_start = gethrtime();    gc_histogram = ([]);    werror("GC runs at %s", ctime(time()));    },    "post_cb":lambda() {    werror("GC done after %dus\n",    gethrtime() - gc_start);    }, + #ifdef LOG_GC_HISTOGRAM    "destruct_cb":lambda(object o) { -  +  // NB: These calls to sprintf(%O) can +  // take significant time.    gc_histogram[sprintf("%O", object_program(o))]++;   #ifdef LOG_GC_VERBOSE    werror("GC cyclic reference in %O.\n",    o);   #endif    }, -  + #endif /* LOG_GC_HISTOGRAM */    "done_cb":lambda(int n) {    if (!n) return;    werror("GC zapped %d things.\n", n); -  + #ifdef LOG_GC_HISTOGRAM    mapping h = gc_histogram;    gc_histogram = ([]);    if (!sizeof(h)) return;    array i = indices(h);    array v = values(h);    sort(v, i);    werror("GC histogram:\n");    foreach(reverse(i)[..9], string p) {    werror("GC: %s: %d\n", p, h[p]);    } -  + #endif /* LOG_GC_HISTOGRAM */    },    ]));    if (!Pike.gc_parameters()->pre_cb) {    // GC callbacks not available.    GCTimestamp();    }   #endif       // For RBF    catch(mkdir(getenv("VARDIR") || "../var"));