summaryrefslogtreecommitdiff
path: root/usr/src/cmd/sgs/libld/common/debug.c
diff options
context:
space:
mode:
authorRod Evans <Rod.Evans@Sun.COM>2009-05-08 10:36:22 -0700
committerRod Evans <Rod.Evans@Sun.COM>2009-05-08 10:36:22 -0700
commit2017c9656f884256b400be40fa25d96d630bf02a (patch)
tree3595b8a5a17d9c3e47ec41e5214458d7a2912efb /usr/src/cmd/sgs/libld/common/debug.c
parentb57459abfba36eb3068cfe44c6921168b4c4f774 (diff)
downloadillumos-gate-2017c9656f884256b400be40fa25d96d630bf02a.tar.gz
6831308 ld.so.1: symbol rescanning does a little too much work
Diffstat (limited to 'usr/src/cmd/sgs/libld/common/debug.c')
-rw-r--r--usr/src/cmd/sgs/libld/common/debug.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/usr/src/cmd/sgs/libld/common/debug.c b/usr/src/cmd/sgs/libld/common/debug.c
index 4ffa5ef19f..127a921987 100644
--- a/usr/src/cmd/sgs/libld/common/debug.c
+++ b/usr/src/cmd/sgs/libld/common/debug.c
@@ -30,6 +30,7 @@
#include <strings.h>
#include <dlfcn.h>
#include <debug.h>
+#include <conv.h>
#include "msg.h"
/*
@@ -205,6 +206,22 @@ dbg_print(Lm_list *lml, const char *format, ...)
} else
(void) fputs(MSG_INTL(MSG_DBG_DFLT_FMT), dbg_ofile.fptr);
+ if (DBG_ISTIME()) {
+ Conv_time_buf_t buf;
+ struct timeval new;
+
+ if (gettimeofday(&new, NULL) == 0) {
+ if (DBG_ISTTIME())
+ (void) fputs(conv_time(&DBG_TOTALTIME, &new,
+ &buf), stderr);
+ if (DBG_ISDTIME())
+ (void) fputs(conv_time(&DBG_DELTATIME, &new,
+ &buf), stderr);
+
+ DBG_DELTATIME = new;
+ }
+ }
+
va_start(args, format);
(void) vfprintf(dbg_ofile.fptr, format, args);
(void) fprintf(dbg_ofile.fptr, MSG_ORIG(MSG_STR_NL));