Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:808: Inside #if undefined(NO_SLOW_REQ_BT)
   if (sizeof(th_name))    th_name = " - " + th_name + " -";    report_debug ("###### %s 0x%x%s has been busy for more than %g seconds.\n",    thread == backend_thread ? "Backend thread" : "Thread",    thread->id_number(), th_name, timeout);    int hrnow = gethrtime();    if ((hrnow - last_dump_hrtime) / 1E6 < slow_req_timeout / 2) {    describe_thread (thread);    } else {    last_dump_hrtime = hrnow; -  describe_all_threads (0, threads_disabled); +  describe_all_threads (0, 1);    }    }       threads_disabled = 0; // Paranoia.   }      protected void report_slow_thread_finished (Thread.Thread thread,    float time_spent)   {    string th_name =
Roxen.git/server/base_server/roxen.pike:5805:    // Use master()->describe_backtrace to sidestep the background    // failure wrapper that's active in RUN_SELF_TEST.    report_debug(">> " +    replace (master()->describe_backtrace (thread->backtrace()),    "\n", "\n>> ") +    "\n");   }      // Dump all threads to the debug log.   void describe_all_threads (void|int ignored, // Might be the signal number. -  void|object threads_disabled) +  void|int(0..1) inhibit_threads_disabled)   { -  if (!threads_disabled) +  object threads_disabled; +  if (!inhibit_threads_disabled)    // Disable all threads to avoid potential locking problems while we    // have the backtraces. It also gives an atomic view of the state.    threads_disabled = _disable_threads();       array(Thread.Thread) threads = all_threads();       report_debug("###### Describing all %d pike threads:\n>>\n",    sizeof (threads));       threads = Array.sort_array (