96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# CDDL HEADER START
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# The contents of this file are subject to the terms of the
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# Common Development and Distribution License (the "License").
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# You may not use this file except in compliance with the License.
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# or http://www.opensolaris.org/os/licensing.
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# See the License for the specific language governing permissions
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# and limitations under the License.
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# When distributing Covered Code, include this CDDL HEADER in each
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# If applicable, add the following below this CDDL HEADER, with the
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# fields enclosed by brackets "[]" replaced with your own identifying
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# information: Portions Copyright [yyyy] [name of copyright owner]
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# CDDL HEADER END
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam# Use is subject to license terms.
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslamif [ $# != 1 ]; then
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam echo expected one argument: '<'dtrace-path'>'
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslamthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydog(void)
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslammain(int argc, char *argv[])
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam thequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydog();
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam $dtrace -c ./test -qs /dev/stdin <<EOF
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam profile:::profile-1001hz
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam /pid == \$target/
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam @[arg1] = count();
96400bb6b8e1e66106f3b1de3cf1dbd8268e581cJonathan Haslam printa("%A %@d\n", @);