FreeBSD Bugzilla – Attachment 105615 Details for
Bug 146119
[tools] [patch] (attempt to) cleanup tools/tools/umastat
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
umastat.txt
umastat.txt (text/plain; charset=US-ASCII), 2.60 KB, created by
pluknet
on 2010-09-20 23:22:08 UTC
(
hide
)
Description:
umastat.txt
Filename:
MIME Type:
Creator:
pluknet
Created:
2010-09-20 23:22:08 UTC
Size:
2.60 KB
patch
obsolete
>Index: tools/tools/umastat/umastat.c >=================================================================== >--- tools/tools/umastat/umastat.c (revision 209988) >+++ tools/tools/umastat/umastat.c (working copy) >@@ -37,6 +37,7 @@ > > #include <err.h> > #include <kvm.h> >+#include <limits.h> > #include <memstat.h> > #include <stdio.h> > #include <stdlib.h> >@@ -196,7 +197,7 @@ > 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 @@ > } > > 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 @@ > 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 @@ > 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 @@ > 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 @@ > } > 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", > " "); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 146119
:
105614
| 105615