xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Kernel/putnexts.d (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
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,v 1.1.1.1 2015/09/30 22:01:09 christos Exp $
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 }
39