From: yury Date: Fri, 30 Mar 2007 14:07:27 +0000 (+0000) Subject: - enable all traces and debugs by default to not hurt anyone who not aware of this... X-Git-Tag: v1_7_100~211 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=197a4d5c6353bc4a672c7d48953a1bbb3b9723b2 - enable all traces and debugs by default to not hurt anyone who not aware of this and allow customers gather all logs by default; - added compile warning for case CDEBUG is disabled; - fixes in configure keys, using AC_ARG_ENABLE(feature) implies that bash variable names is $enable_feature. --- diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index c569683..701d1c4 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -48,25 +48,25 @@ fi # AC_DEFUN([LC_CONFIG_CDEBUG], [ -AC_MSG_CHECKING([whether to disable CDEBUG, CWARN, etc.]) +AC_MSG_CHECKING([whether to disable CDEBUG, CWARN]) AC_ARG_ENABLE([libcfs_cdebug], AC_HELP_STRING([--disable-libcfs-cdebug], [disable libcfs CDEBUG, CWARN]), - [],[disable_libcfs_cdebug='no']) -AC_MSG_RESULT([$disable_libcfs_cdebug]) -if test x$disable_libcfs_cdebug != xno; then - AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN]) -else + [],[enable_libcfs_cdebug='yes']) +AC_MSG_RESULT([$enable_libcfs_cdebug]) +if test x$enable_libcfs_cdebug = xyes; then AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN]) +else + AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN]) fi AC_MSG_CHECKING([whether to enable ENTRY/EXIT]) AC_ARG_ENABLE([libcfs_trace], - AC_HELP_STRING([--enable-libcfs-trace], - [enable libcfs ENTRY/EXIT]), - [],[enable_libcfs_trace='no']) + AC_HELP_STRING([--disable-libcfs-trace], + [disable libcfs ENTRY/EXIT]), + [],[enable_libcfs_trace='yes']) AC_MSG_RESULT([$enable_libcfs_trace]) -if test x$enable_libcfs_trace != xno; then +if test x$enable_libcfs_trace = xyes; then AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT]) else AC_DEFINE(CDEBUG_ENTRY_EXIT, 0, [disable libcfs ENTRY/EXIT]) @@ -76,9 +76,9 @@ AC_MSG_CHECKING([whether to disable LASSERT, LASSERTF]) AC_ARG_ENABLE([libcfs_assert], AC_HELP_STRING([--disable-libcfs-assert], [disable libcfs LASSERT, LASSERTF]), - [],[disable_libcfs_assert='no']) -AC_MSG_RESULT([$disable_libcfs_assert]) -if test x$disable_libcfs_assert = xno; then + [],[enable_libcfs_assert='yes']) +AC_MSG_RESULT([$enable_libcfs_assert]) +if test x$enable_libcfs_assert = xyes; then AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF]) fi ]) diff --git a/lnet/include/libcfs/libcfs.h b/lnet/include/libcfs/libcfs.h index 3ca1773..fb4959c 100644 --- a/lnet/include/libcfs/libcfs.h +++ b/lnet/include/libcfs/libcfs.h @@ -194,6 +194,7 @@ do { \ #else /* CDEBUG_ENABLED */ #define CDEBUG(mask, format, a...) (void)(0) #define CDEBUG_LIMIT(mask, format, a...) (void)(0) +#warning "CDEBUG IS DISABLED. THIS SHOULD NEVER BE DONE FOR PRODUCTION!" #endif #elif defined(__arch_lib__) && !defined(LUSTRE_UTILS)