]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
common: add provider name to log messages
authorArlin Davis <arlin.r.davis@intel.com>
Wed, 13 Aug 2014 18:12:29 +0000 (11:12 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Wed, 13 Aug 2014 18:12:29 +0000 (11:12 -0700)
Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
dapl/common/dapl_debug.c

index 36adf245b5dfb93df513db677dcb508224ee7a34..d8a3c73cc26b730f805e82650e1df2aef913c752 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include "dapl.h"
+#include "dapl_adapter_util.h"
 #if !defined(__KDAPL__)
 #include <stdarg.h>
 #include <stdlib.h>
@@ -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: