From: Arlin Davis Date: Wed, 13 Aug 2014 18:12:29 +0000 (-0700) Subject: common: add provider name to log messages X-Git-Tag: dapl-2.1.1-1~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6eb73e080c87b12cf4f4ec577cfdff53472791e1;p=~ardavis%2Fdapl.git common: add provider name to log messages Signed-off-by: Arlin Davis --- diff --git a/dapl/common/dapl_debug.c b/dapl/common/dapl_debug.c index 36adf24..d8a3c73 100644 --- a/dapl/common/dapl_debug.c +++ b/dapl/common/dapl_debug.c @@ -26,6 +26,7 @@ */ #include "dapl.h" +#include "dapl_adapter_util.h" #if !defined(__KDAPL__) #include #include @@ -59,8 +60,9 @@ void dapl_internal_dbg_log(DAPL_DBG_TYPE type, const char *fmt, ...) total_t = current_t - start_t; last_t = current_t; va_start(args, fmt); - fprintf(stdout, "%s:%x:%x: %d us(%d us%s): ", - _ptr_host_, dapl_os_getpid(), dapl_os_gettid(), + fprintf(stdout, "%s:%s:%x:%x: %d us(%d us%s): ", + _ptr_host_, PROVIDER_NAME, + dapl_os_getpid(), dapl_os_gettid(), total_t, delta_t, delta_t > 500000 ? "!!!":""); dapl_os_vprintf(fmt, args); va_end(args); @@ -640,14 +642,12 @@ void dapl_print_counter_str(DAT_HANDLE dh, int counter, int reset, const char *p int i, max; DAT_UINT64 *p_cntrs; DAT_HANDLE_TYPE type = 0; - DAPL_IA *ia = NULL; dat_get_handle_type(dh, &type); switch (type) { case DAT_HANDLE_TYPE_IA: max = DCNT_IA_ALL_COUNTERS; - ia = (DAPL_IA *)dh; p_cntrs = ((DAPL_IA *) dh)->cntrs; break; case DAT_HANDLE_TYPE_EP: