summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2004-05-22 19:42:53 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2004-05-22 19:42:53 +0000
commite9beb0a94f075e8a218b74094d3e57e53b814f63 (patch)
treefb0f75e0445cd4141fba09ad0007089a7911dea4
parent3fb5d8bb4a3eed08bde0e7886aa187f9f5866976 (diff)
Dont print symcache statistics if no symbol lookups have occurred, ok mickey@
-rw-r--r--libexec/ld.so/dlfcn.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c
index 9f6b035085d..1dd00d338af 100644
--- a/libexec/ld.so/dlfcn.c
+++ b/libexec/ld.so/dlfcn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlfcn.c,v 1.33 2003/10/01 02:55:23 millert Exp $ */
+/* $OpenBSD: dlfcn.c,v 1.34 2004/05/22 19:42:52 drahn Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -321,9 +321,11 @@ _dl_show_objects(void)
{
extern int _dl_symcachestat_hits;
extern int _dl_symcachestat_lookups;
- DL_DEB(("symcache lookups %d hits %d ratio %d% hits\n",
- _dl_symcachestat_lookups, _dl_symcachestat_hits,
- (_dl_symcachestat_hits * 100) / _dl_symcachestat_lookups));
+ if (_dl_symcachestat_lookups != 0)
+ DL_DEB(("symcache lookups %d hits %d ratio %d% hits\n",
+ _dl_symcachestat_lookups, _dl_symcachestat_hits,
+ (_dl_symcachestat_hits * 100) /
+ _dl_symcachestat_lookups));
}
}