]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
increase table size for mutex profiling
authorEvan Hunt <each@isc.org>
Tue, 24 Apr 2012 23:53:29 +0000 (16:53 -0700)
committerEvan Hunt <each@isc.org>
Tue, 24 Apr 2012 23:53:29 +0000 (16:53 -0700)
CHANGES
lib/isc/pthreads/mutex.c

diff --git a/CHANGES b/CHANGES
index f11c7815cb9a97af587ecd8bf1f7b682356cf692..2622d31969c04562324e43cf22df68fbfcb84df9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3310.  [test]          Increase table size for mutex profiling. [RT #28809]
+
 3309.  [bug]           resolver.c:fctx_finddone() was not threadsafe.
                        [RT #27995]
 
index f8bc43481f655227b9984c12d877c530501579e8..7c9cc19e651e387190b6071b9cf1bfcda95ab10d 100644 (file)
@@ -78,7 +78,7 @@ struct isc_mutexstats {
 };
 
 #ifndef ISC_MUTEX_PROFTABLESIZE
-#define ISC_MUTEX_PROFTABLESIZE (16 * 1024)
+#define ISC_MUTEX_PROFTABLESIZE (1024 * 1024)
 #endif
 static isc_mutexstats_t stats[ISC_MUTEX_PROFTABLESIZE];
 static int stats_next = 0;
@@ -200,24 +200,24 @@ isc_mutex_statsprofile(FILE *fp) {
 
        fprintf(fp, "Mutex stats (in us)\n");
        for (i = 0; i < stats_next; i++) {
-               fprintf(fp, "%-12s %4d: %10u  %lu.%06lu %lu.%06lu\n",
+               fprintf(fp, "%-12s %4d: %10u  %lu.%06lu %lu.%06lu %5d\n",
                        stats[i].file, stats[i].line, stats[i].count,
                        stats[i].locked_total.tv_sec,
                        stats[i].locked_total.tv_usec,
                        stats[i].wait_total.tv_sec,
-                       stats[i].wait_total.tv_usec
-                       );
+                       stats[i].wait_total.tv_usec,
+                       i);
                for (j = 0; j < ISC_MUTEX_MAX_LOCKERS; j++) {
                        locker = &stats[i].lockers[j];
                        if (locker->file == NULL)
                                continue;
-                       fprintf(fp, " %-11s %4d: %10u  %lu.%06lu %lu.%06lu\n",
+                       fprintf(fp, " %-11s %4d: %10u  %lu.%06lu %lu.%06lu %5d\n",
                                locker->file, locker->line, locker->count,
                                locker->locked_total.tv_sec,
                                locker->locked_total.tv_usec,
                                locker->wait_total.tv_sec,
-                               locker->wait_total.tv_usec
-                               );
+                               locker->wait_total.tv_usec,
+                               i);
                }
        }
 }