From owner-svn-src-stable@FreeBSD.ORG Tue Sep 28 05:53:35 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E25106567A; Tue, 28 Sep 2010 05:53:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D76D8FC13; Tue, 28 Sep 2010 05:53:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8S5rZDL061184; Tue, 28 Sep 2010 05:53:35 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8S5rZho061182; Tue, 28 Sep 2010 05:53:35 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009280553.o8S5rZho061182@svn.freebsd.org> From: Andriy Gapon Date: Tue, 28 Sep 2010 05:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213242 - stable/8/tools/tools/umastat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2010 05:53:35 -0000 Author: avg Date: Tue Sep 28 05:53:35 2010 New Revision: 213242 URL: http://svn.freebsd.org/changeset/base/213242 Log: MFC r212932,212949: tools/umastat: fix build on amd64 and more PR: misc/146119 Modified: stable/8/tools/tools/umastat/umastat.c Directory Properties: stable/8/tools/tools/umastat/ (props changed) Modified: stable/8/tools/tools/umastat/umastat.c ============================================================================== --- stable/8/tools/tools/umastat/umastat.c Tue Sep 28 04:57:56 2010 (r213241) +++ stable/8/tools/tools/umastat/umastat.c Tue Sep 28 05:53:35 2010 (r213242) @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -196,7 +197,7 @@ uma_print_keg_align(struct uma_keg *ukp, LIST_HEAD(bucketlist, uma_bucket); static void -uma_print_bucket(struct uma_bucket *ubp, const char *spaces) +uma_print_bucket(struct uma_bucket *ubp, const char *spaces __unused) { printf("{ ub_cnt = %d, ub_entries = %d }", ubp->ub_cnt, @@ -230,7 +231,7 @@ uma_print_bucketlist(kvm_t *kvm, struct } printf("\n"); - printf("%s}; // total cnt %llu, total entries %llu\n", spaces, + printf("%s}; // total cnt %ju, total entries %ju\n", spaces, total_cnt, total_entries); } @@ -242,8 +243,8 @@ uma_print_cache(kvm_t *kvm, struct uma_c int ret; printf("%s%s[%d] = {\n", spaces, name, cpu); - printf("%s uc_frees = %llu;\n", spaces, cache->uc_frees); - printf("%s uc_allocs = %llu;\n", spaces, cache->uc_allocs); + printf("%s uc_frees = %ju;\n", spaces, cache->uc_frees); + printf("%s uc_allocs = %ju;\n", spaces, cache->uc_allocs); if (cache->uc_freebucket != NULL) { ret = kread(kvm, cache->uc_freebucket, &ub, sizeof(ub), 0); @@ -286,6 +287,7 @@ main(int argc, char *argv[]) size_t uzp_userspace_len; char *memf, *nlistf; int ch; + char errbuf[_POSIX2_LINE_MAX]; memf = nlistf = NULL; while ((ch = getopt(argc, argv, "M:N:")) != -1) { @@ -308,9 +310,9 @@ main(int argc, char *argv[]) if (nlistf != NULL && memf == NULL) usage(); - kvm = kvm_open(nlistf, memf, NULL, 0, "umastat"); + kvm = kvm_openfiles(nlistf, memf, NULL, 0, errbuf); if (kvm == NULL) - err(-1, "kvm_open"); + errx(-1, "kvm_openfiles: %s", errbuf); if (kvm_nlist(kvm, namelist) != 0) err(-1, "kvm_nlist"); @@ -412,20 +414,20 @@ main(int argc, char *argv[]) } printf(" Zone {\n"); printf(" uz_name = \"%s\";\n", name); - printf(" uz_allocs = %llu;\n", + printf(" uz_allocs = %ju;\n", uzp_userspace->uz_allocs); - printf(" uz_frees = %llu;\n", + printf(" uz_frees = %ju;\n", uzp_userspace->uz_frees); - printf(" uz_fails = %llu;\n", + printf(" uz_fails = %ju;\n", uzp_userspace->uz_fails); printf(" uz_fills = %u;\n", uzp_userspace->uz_fills); printf(" uz_count = %u;\n", uzp_userspace->uz_count); - uma_print_bucketlist(kvm, (struct bucketlist *) + uma_print_bucketlist(kvm, (void *) &uzp_userspace->uz_full_bucket, "uz_full_bucket", " "); - uma_print_bucketlist(kvm, (struct bucketlist *) + uma_print_bucketlist(kvm, (void *) &uzp_userspace->uz_free_bucket, "uz_free_bucket", " ");