3 * dnlcps.d - DNLC stats by process.
4 * Written in DTrace (Solaris 10 3/05).
6 * The DNLC is the Directory Name Lookup Cache. Filename lookups often
7 * return a hit from here, before needing to traverse the regular file
8 * system cache or go to disk.
10 * dnlcps.d prints DNLC statistics by process.
12 * $Id: dnlcps.d 3 2007-08-01 10:50:08Z brendan $
14 * USAGE: dnlcps.d # wait several seconds, then hit Ctrl-C
19 * value 0 == miss, 1 == hit
20 * count number of occurrences
22 * COPYRIGHT: Copyright (c) 2006 Brendan Gregg.
26 * The contents of this file are subject to the terms of the
27 * Common Development and Distribution License, Version 1.0 only
28 * (the "License"). You may not use this file except in compliance
31 * You can obtain a copy of the license at Docs/cddl1.txt
32 * or http://www.opensolaris.org/os/licensing.
33 * See the License for the specific language governing permissions
34 * and limitations under the License.
38 * 27-Mar-2004 Brendan Gregg Created this.
39 * 14-Jun-2005 " " Rewrote this a lot.
40 * 18-Feb-2006 " " Last update.
43 #pragma D option quiet
50 printf("Tracing... Hit Ctrl-C to end.\n");
56 fbt:genunix:dnlc_lookup:return
58 this->code = arg1 == 0 ? 0 : 1;
59 @Result[execname, pid] = lquantize(this->code, 0, 1, 1);
67 printa(" CMD: %-16s PID: %d\n%@d\n", @Result);