3 * tcl_methodcalls.d - count Tcl method calls DTrace.
4 * Written for the Tcl DTrace provider.
6 * $Id: tcl_proccalls.d 63 2007-10-04 04:34:38Z brendan $
8 * This traces activity from all Tcl processes on the system with DTrace
9 * provider support (tcl8.4.16).
11 * USAGE: tcl_methodcalls.d # hit Ctrl-C to end
15 * COUNT Number of calls during sample
16 * PROCEDURE Tcl procedure name
18 * COPYRIGHT: Copyright (c) 2007 Brendan Gregg.
22 * The contents of this file are subject to the terms of the
23 * Common Development and Distribution License, Version 1.0 only
24 * (the "License"). You may not use this file except in compliance
27 * You can obtain a copy of the license at Docs/cddl1.txt
28 * or http://www.opensolaris.org/os/licensing.
29 * See the License for the specific language governing permissions
30 * and limitations under the License.
34 * 09-Sep-2007 Brendan Gregg Created this.
37 #pragma D option quiet
41 printf("Tracing... Hit Ctrl-C to end.\n");
46 @calls[pid, copyinstr(arg0)] = count();
51 printf(" %6s %8s %s\n", "PID", "COUNT", "PROCEDURE");
52 printa(" %6d %@8d %s\n", @calls);