From 9736aecd323ba323a24c159dc877b29795d68a0a Mon Sep 17 00:00:00 2001 From: Bryan Cantrill Date: Thu, 13 Jun 2013 19:58:31 +0000 Subject: [PATCH] 3988 kstat(1) woefully inefficient on fully specified kstats Reviewed by: Robert Mustacchi Approved by: Gordon Ross --- usr/src/cmd/stat/kstat/kstat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/src/cmd/stat/kstat/kstat.c b/usr/src/cmd/stat/kstat/kstat.c index 2ce62fc037..ee95db1c64 100644 --- a/usr/src/cmd/stat/kstat/kstat.c +++ b/usr/src/cmd/stat/kstat/kstat.c @@ -23,6 +23,7 @@ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 David Hoeppner. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* @@ -621,7 +622,7 @@ ks_instances_read(kstat_ctl_t *kc) skip = B_TRUE; selector = list_head(&selector_list); while (selector != NULL) { - if (ks_match(kp->ks_module, &selector->ks_module) || + if (ks_match(kp->ks_module, &selector->ks_module) && ks_match(kp->ks_name, &selector->ks_name)) { skip = B_FALSE; break; -- 2.11.4.GIT