1N/A#!/usr/sbin/dtrace -s
1N/A/*
1N/A * putnexts.d - stream putnext() tracing with stacks. Solaris, DTrace.
1N/A *
1N/A * This shows who is calling putnext() to who, by listing the destination
1N/A * queue and the calling stack, by frequency count. This is especially useful
1N/A * for understanding streams based frameworks, such as areas of the Solaris
1N/A * TCP/IP stack.
1N/A *
1N/A * $Id: putnexts.d 14 2007-09-11 08:03:35Z brendan $
1N/A *
1N/A * USAGE: putnext.d
1N/A *
1N/A * BASED ON: /usr/demo/dtrace/putnext.d
1N/A *
1N/A * PORTIONS: Copyright (c) 2007 Brendan Gregg.
1N/A *
1N/A * CDDL HEADER START
1N/A *
1N/A * The contents of this file are subject to the terms of the
1N/A * Common Development and Distribution License, Version 1.0 only
1N/A * (the "License"). You may not use this file except in compliance
1N/A * with the License.
1N/A *
1N/A * You can obtain a copy of the license at Docs/cddl1.txt
1N/A * or http://www.opensolaris.org/os/licensing.
1N/A * See the License for the specific language governing permissions
1N/A * and limitations under the License.
1N/A *
1N/A * CDDL HEADER END
1N/A *
1N/A * 12-Jun-2005 Brendan Gregg Created this.
1N/A */
1N/A
1N/Afbt::putnext:entry
1N/A{
1N/A @[stringof(args[0]->q_qinfo->qi_minfo->mi_idname), stack(5)] = count();
1N/A}