From owner-p4-projects Wed Jul 24 6:55:30 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB9C337B401; Wed, 24 Jul 2002 06:55:25 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F81437B400 for ; Wed, 24 Jul 2002 06:55:25 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C908343E65 for ; Wed, 24 Jul 2002 06:55:24 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6ODtOJU020760 for ; Wed, 24 Jul 2002 06:55:24 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6ODtOqL020754 for perforce@freebsd.org; Wed, 24 Jul 2002 06:55:24 -0700 (PDT) Date: Wed, 24 Jul 2002 06:55:24 -0700 (PDT) Message-Id: <200207241355.g6ODtOqL020754@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 14831 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14831 Change 14831 by rwatson@rwatson_tislabs on 2002/07/24 06:54:51 For some reason, the plural is more pleasing for statistics than the singular. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#192 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#192 (text+ko) ==== @@ -139,8 +139,12 @@ TUNABLE_INT("security.mac.cache_fslabel_in_vnode", &mac_cache_fslabel_in_vnode); -static int mac_vnode_label_cache_hit = 0; -static int mac_vnode_label_cache_miss = 0; +static int mac_vnode_label_cache_hits = 0; +SYSCTL_INT(_security_mac, OID_AUTO, vnode_label_cache_hits, CTLFLAG_RD, + &mac_vnode_label_cache_hits, 0, "Cache hits on vnode labels"); +static int mac_vnode_label_cache_misses = 0; +SYSCTL_INT(_security_mac, OID_AUTO, vnode_label_cache_misses, CTLFLAG_RD, + &mac_vnode_label_cache_misses, 0, "Cache misses on vnode labels"); static int error_select(int error1, int error2); static int mac_externalize(struct label *label, struct mac *mac); @@ -1228,10 +1232,10 @@ } if (vp->v_flag & VCACHEDLABEL) { - mac_vnode_label_cache_hit++; + mac_vnode_label_cache_hits++; return (0); } else - mac_vnode_label_cache_miss++; + mac_vnode_label_cache_misses++; if ((vp->v_mount->mnt_flag & MNT_MULTILABEL) == 0) { mac_update_vnode_from_mount(vp, vp->v_mount); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message