Lines Matching refs:proc
39 struct fpm_scoreboard_proc_s *proc; in fpm_request_accepting() local
44 proc = fpm_scoreboard_proc_acquire(NULL, -1, 0); in fpm_request_accepting()
45 if (proc == NULL) { in fpm_request_accepting()
50 proc->request_stage = FPM_REQUEST_ACCEPTING; in fpm_request_accepting()
51 proc->tv = now; in fpm_request_accepting()
52 fpm_scoreboard_proc_release(proc); in fpm_request_accepting()
61 struct fpm_scoreboard_proc_s *proc; in fpm_request_reading_headers() local
75 proc = fpm_scoreboard_proc_acquire(NULL, -1, 0); in fpm_request_reading_headers()
76 if (proc == NULL) { in fpm_request_reading_headers()
81 proc->request_stage = FPM_REQUEST_READING_HEADERS; in fpm_request_reading_headers()
82 proc->tv = now; in fpm_request_reading_headers()
83 proc->accepted = now; in fpm_request_reading_headers()
84 proc->accepted_epoch = now_epoch; in fpm_request_reading_headers()
86 proc->cpu_accepted = cpu; in fpm_request_reading_headers()
88 proc->requests++; in fpm_request_reading_headers()
89 proc->request_uri[0] = '\0'; in fpm_request_reading_headers()
90 proc->request_method[0] = '\0'; in fpm_request_reading_headers()
91 proc->script_filename[0] = '\0'; in fpm_request_reading_headers()
92 proc->query_string[0] = '\0'; in fpm_request_reading_headers()
93 proc->auth_user[0] = '\0'; in fpm_request_reading_headers()
94 proc->content_length = 0; in fpm_request_reading_headers()
95 fpm_scoreboard_proc_release(proc); in fpm_request_reading_headers()
104 struct fpm_scoreboard_proc_s *proc; in fpm_request_info() local
115 proc = fpm_scoreboard_proc_acquire(NULL, -1, 0); in fpm_request_info()
116 if (proc == NULL) { in fpm_request_info()
121 proc->request_stage = FPM_REQUEST_INFO; in fpm_request_info()
122 proc->tv = now; in fpm_request_info()
125 strlcpy(proc->request_uri, request_uri, sizeof(proc->request_uri)); in fpm_request_info()
129 strlcpy(proc->request_method, request_method, sizeof(proc->request_method)); in fpm_request_info()
133 strlcpy(proc->query_string, query_string, sizeof(proc->query_string)); in fpm_request_info()
137 strlcpy(proc->auth_user, auth_user, sizeof(proc->auth_user)); in fpm_request_info()
140 proc->content_length = content_length; in fpm_request_info()
145 strlcpy(proc->script_filename, script_filename, sizeof(proc->script_filename)); in fpm_request_info()
148 fpm_scoreboard_proc_release(proc); in fpm_request_info()
154 struct fpm_scoreboard_proc_s *proc; in fpm_request_executing() local
159 proc = fpm_scoreboard_proc_acquire(NULL, -1, 0); in fpm_request_executing()
160 if (proc == NULL) { in fpm_request_executing()
165 proc->request_stage = FPM_REQUEST_EXECUTING; in fpm_request_executing()
166 proc->tv = now; in fpm_request_executing()
167 fpm_scoreboard_proc_release(proc); in fpm_request_executing()
173 struct fpm_scoreboard_proc_s *proc; in fpm_request_end() local
185 proc = fpm_scoreboard_proc_acquire(NULL, -1, 0); in fpm_request_end()
186 if (proc == NULL) { in fpm_request_end()
190 proc->request_stage = FPM_REQUEST_FINISHED; in fpm_request_end()
191 proc->tv = now; in fpm_request_end()
192 timersub(&now, &proc->accepted, &proc->duration); in fpm_request_end()
194 timersub(&proc->tv, &proc->accepted, &proc->cpu_duration); in fpm_request_end()
195 proc->last_request_cpu.tms_utime = cpu.tms_utime - proc->cpu_accepted.tms_utime; in fpm_request_end()
196 proc->last_request_cpu.tms_stime = cpu.tms_stime - proc->cpu_accepted.tms_stime; in fpm_request_end()
197 proc->last_request_cpu.tms_cutime = cpu.tms_cutime - proc->cpu_accepted.tms_cutime; in fpm_request_end()
198 proc->last_request_cpu.tms_cstime = cpu.tms_cstime - proc->cpu_accepted.tms_cstime; in fpm_request_end()
200 proc->memory = memory; in fpm_request_end()
201 fpm_scoreboard_proc_release(proc); in fpm_request_end()
207 struct fpm_scoreboard_proc_s *proc; in fpm_request_finished() local
212 proc = fpm_scoreboard_proc_acquire(NULL, -1, 0); in fpm_request_finished()
213 if (proc == NULL) { in fpm_request_finished()
218 proc->request_stage = FPM_REQUEST_FINISHED; in fpm_request_finished()
219 proc->tv = now; in fpm_request_finished()
220 fpm_scoreboard_proc_release(proc); in fpm_request_finished()
226 struct fpm_scoreboard_proc_s proc, *proc_p; in fpm_request_check_timed_out() local
234 proc = *proc_p; in fpm_request_check_timed_out()
239 …if (child->slow_logged.tv_sec != proc.accepted.tv_sec || child->slow_logged.tv_usec != proc.accept… in fpm_request_check_timed_out()
246 …if (proc.request_stage > FPM_REQUEST_ACCEPTING && ((proc.request_stage < FPM_REQUEST_END) || track… in fpm_request_check_timed_out()
247 char purified_script_filename[sizeof(proc.script_filename)]; in fpm_request_check_timed_out()
250 timersub(now, &proc.accepted, &tv); in fpm_request_check_timed_out()
254 proc.request_stage == FPM_REQUEST_EXECUTING && tv.tv_sec >= slowlog_timeout) { in fpm_request_check_timed_out()
256 … str_purify_filename(purified_script_filename, proc.script_filename, sizeof(proc.script_filename)); in fpm_request_check_timed_out()
258 child->slow_logged = proc.accepted; in fpm_request_check_timed_out()
264 …child->wp->config->name, (int) child->pid, purified_script_filename, proc.request_method, proc.req… in fpm_request_check_timed_out()
265 (proc.query_string[0] ? "?" : ""), proc.query_string, in fpm_request_check_timed_out()
271 … str_purify_filename(purified_script_filename, proc.script_filename, sizeof(proc.script_filename)); in fpm_request_check_timed_out()
275 …child->wp->config->name, (int) child->pid, purified_script_filename, proc.request_method, proc.req… in fpm_request_check_timed_out()
276 (proc.query_string[0] ? "?" : ""), proc.query_string, in fpm_request_check_timed_out()
285 struct fpm_scoreboard_proc_s *proc; in fpm_request_is_idle() local
288 proc = fpm_scoreboard_proc_get_from_child(child); in fpm_request_is_idle()
289 if (!proc) { in fpm_request_is_idle()
293 return proc->request_stage == FPM_REQUEST_ACCEPTING; in fpm_request_is_idle()
299 struct fpm_scoreboard_proc_s *proc; in fpm_request_last_activity() local
303 proc = fpm_scoreboard_proc_get_from_child(child); in fpm_request_last_activity()
304 if (!proc) { in fpm_request_last_activity()
308 *tv = proc->tv; in fpm_request_last_activity()