From 663b4ab8243e56052d72217427bc935b3de2e9de Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Mar 2017 17:26:37 +0100 Subject: cygserver: Speed up non-debug scenario _log/_vlog were always called so we always had a function call hit even if we're not debugging. Expand on the debugging macros so the decision to call _log/_vlog is done in the caller already. Also, make a log level difference between syscall_printf and system_printf. Signed-off-by: Corinna Vinschen --- winsup/cygserver/bsd_helper.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygserver/bsd_helper.cc') diff --git a/winsup/cygserver/bsd_helper.cc b/winsup/cygserver/bsd_helper.cc index f4babeec3..ecc90e117 100644 --- a/winsup/cygserver/bsd_helper.cc +++ b/winsup/cygserver/bsd_helper.cc @@ -63,9 +63,9 @@ win_copyout (struct thread *td, const void *server_src, static void _enter_critical_section (LPCRITICAL_SECTION pcs, const char *file, int line) { - _log (file, line, LOG_DEBUG, "Try enter critical section(%p)", pcs); + _debug (file, line, "Try enter critical section(%p)", pcs); EnterCriticalSection (pcs); - _log (file, line, LOG_DEBUG, "Entered critical section(%p)", pcs); + _debug (file, line, "Entered critical section(%p)", pcs); } #define leave_critical_section(c) _leave_critical_section((c),__FILE__,__LINE__) @@ -73,7 +73,7 @@ static void _leave_critical_section (LPCRITICAL_SECTION pcs, const char *file, int line) { LeaveCriticalSection (pcs); - _log (file, line, LOG_DEBUG, "Left critical section(%p)", pcs); + _debug (file, line, "Left critical section(%p)", pcs); } CRITICAL_SECTION ipcht_cs; -- cgit v1.2.3