Nginx: some logs are no longer needed on nginx-fstack.

This commit is contained in:
chenwei 2018-04-09 15:42:21 +08:00
parent a64ef10d72
commit 6ef175012c
4 changed files with 16 additions and 8 deletions

View File

@ -332,10 +332,10 @@ ngx_ff_epoll_process_events(ngx_cycle_t *cycle,
ngx_connection_t *c; ngx_connection_t *c;
/* NGX_TIMER_INFINITE == INFTIM */ /* NGX_TIMER_INFINITE == INFTIM */
/*
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"epoll timer: %M", timer); "epoll timer: %M", timer);
*/
events = epoll_wait(ep, event_list, (int) nevents, timer); events = epoll_wait(ep, event_list, (int) nevents, timer);
err = (events == -1) ? ngx_errno : 0; err = (events == -1) ? ngx_errno : 0;

View File

@ -534,8 +534,15 @@ ngx_kqueue_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
tp = &ts; tp = &ts;
} }
#if (NGX_HAVE_FSTACK)
if (n > 0) {
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0, ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"kevent timer: %M, changes: %d", timer, n); "kevent timer: %M, changes: %d", timer, n);
}
#else
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"kevent timer: %M, changes: %d", timer, n);
#endif
events = kevent(ngx_kqueue, change_list, n, event_list, (int) nevents, tp); events = kevent(ngx_kqueue, change_list, n, event_list, (int) nevents, tp);
@ -545,8 +552,10 @@ ngx_kqueue_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
ngx_time_update(); ngx_time_update();
} }
#if !(NGX_HAVE_FSTACK)
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"kevent events: %d", events); "kevent events: %d", events);
#endif
if (err) { if (err) {
if (err == NGX_EINTR) { if (err == NGX_EINTR) {

View File

@ -252,6 +252,8 @@ ngx_process_events_and_timers(ngx_cycle_t *cycle)
(void) ngx_process_events(cycle, timer, flags); (void) ngx_process_events(cycle, timer, flags);
delta = ngx_current_msec - delta;
#if (NGX_HAVE_FSTACK) #if (NGX_HAVE_FSTACK)
/* handle message from kernel (PS: signals from master) in case of network inactivity */ /* handle message from kernel (PS: signals from master) in case of network inactivity */
if (ngx_current_msec - initial >= ngx_schedule_timeout) { if (ngx_current_msec - initial >= ngx_schedule_timeout) {
@ -260,13 +262,10 @@ ngx_process_events_and_timers(ngx_cycle_t *cycle)
/* Update timer*/ /* Update timer*/
initial = ngx_current_msec; initial = ngx_current_msec;
} }
#endif #else
delta = ngx_current_msec - delta;
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"timer delta: %M", delta); "timer delta: %M", delta);
#endif
ngx_event_process_posted(cycle, &ngx_posted_accept_events); ngx_event_process_posted(cycle, &ngx_posted_accept_events);
if (ngx_accept_mutex_held) { if (ngx_accept_mutex_held) {

View File

@ -829,7 +829,7 @@ ngx_worker_process_cycle_loop(void *arg)
} }
} }
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle"); //ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle");
ngx_process_events_and_timers(cycle); ngx_process_events_and_timers(cycle);