]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Kernel/putnexts.d
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Kernel / putnexts.d
1 #!/usr/sbin/dtrace -s
2 /*
3  * putnexts.d - stream putnext() tracing with stacks. Solaris, DTrace.
4  *
5  * This shows who is calling putnext() to who, by listing the destination
6  * queue and the calling stack, by frequency count. This is especially useful
7  * for understanding streams based frameworks, such as areas of the Solaris
8  * TCP/IP stack.
9  *
10  * $Id: putnexts.d 14 2007-09-11 08:03:35Z brendan $
11  *
12  * USAGE:       putnext.d
13  *
14  * BASED ON: /usr/demo/dtrace/putnext.d
15  *
16  * PORTIONS: Copyright (c) 2007 Brendan Gregg.
17  *
18  * CDDL HEADER START
19  *
20  *  The contents of this file are subject to the terms of the
21  *  Common Development and Distribution License, Version 1.0 only
22  *  (the "License").  You may not use this file except in compliance
23  *  with the License.
24  *
25  *  You can obtain a copy of the license at Docs/cddl1.txt
26  *  or http://www.opensolaris.org/os/licensing.
27  *  See the License for the specific language governing permissions
28  *  and limitations under the License.
29  *
30  * CDDL HEADER END
31  *
32  * 12-Jun-2005  Brendan Gregg   Created this.
33  */
34
35 fbt::putnext:entry
36 {
37         @[stringof(args[0]->q_qinfo->qi_minfo->mi_idname), stack(5)] = count();
38 }