1235368Sgnn#!/usr/sbin/dtrace -s 2235368Sgnn/* 3235368Sgnn * putnexts.d - stream putnext() tracing with stacks. Solaris, DTrace. 4235368Sgnn * 5235368Sgnn * This shows who is calling putnext() to who, by listing the destination 6235368Sgnn * queue and the calling stack, by frequency count. This is especially useful 7235368Sgnn * for understanding streams based frameworks, such as areas of the Solaris 8235368Sgnn * TCP/IP stack. 9235368Sgnn * 10235368Sgnn * $Id: putnexts.d 14 2007-09-11 08:03:35Z brendan $ 11235368Sgnn * 12235368Sgnn * USAGE: putnext.d 13235368Sgnn * 14235368Sgnn * BASED ON: /usr/demo/dtrace/putnext.d 15235368Sgnn * 16235368Sgnn * PORTIONS: Copyright (c) 2007 Brendan Gregg. 17235368Sgnn * 18235368Sgnn * CDDL HEADER START 19235368Sgnn * 20235368Sgnn * The contents of this file are subject to the terms of the 21235368Sgnn * Common Development and Distribution License, Version 1.0 only 22235368Sgnn * (the "License"). You may not use this file except in compliance 23235368Sgnn * with the License. 24235368Sgnn * 25235368Sgnn * You can obtain a copy of the license at Docs/cddl1.txt 26235368Sgnn * or http://www.opensolaris.org/os/licensing. 27235368Sgnn * See the License for the specific language governing permissions 28235368Sgnn * and limitations under the License. 29235368Sgnn * 30235368Sgnn * CDDL HEADER END 31235368Sgnn * 32235368Sgnn * 12-Jun-2005 Brendan Gregg Created this. 33235368Sgnn */ 34235368Sgnn 35235368Sgnnfbt::putnext:entry 36235368Sgnn{ 37235368Sgnn @[stringof(args[0]->q_qinfo->qi_minfo->mi_idname), stack(5)] = count(); 38235368Sgnn} 39