9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER START
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * The contents of this file are subject to the terms of the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Common Development and Distribution License (the "License").
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You may not use this file except in compliance with the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * or http://www.opensolaris.org/os/licensing.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * See the License for the specific language governing permissions
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * and limitations under the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * When distributing Covered Code, include this CDDL HEADER in each
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * If applicable, add the following below this CDDL HEADER, with the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * fields enclosed by brackets "[]" replaced with your own identifying
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * information: Portions Copyright [yyyy] [name of copyright owner]
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER END
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Use is subject to license terms.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#pragma ident "%Z%%M% %I% %E% SMI"
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * ASSERTION:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Tracing a module using the -m option.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * SECTION: dtrace Utility/-m Option
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * NOTES: Manually check:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 1) automated in tst.InvalidTraceModule1.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m profile
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 2)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m genunix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: trace of all probes with module genunix.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 3)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m vtrace:genunix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: trace of probes with provider vtrace and module genunix.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 4) automated in tst.InvalidTraceModule2.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m :genunix::
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 5)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m :genunix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: trace of all probes with module genunix.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 6) automated in tst.InvalidTraceModule3.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m genunix::
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 7) automated in tst.InvalidTraceModule4.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m profile:::profile-97
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: not a valid probe description.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 8)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m genunix -m unix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of both genunix and unix probes.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 9)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m genunix -m foounix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: Number of probes matching the description genunix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * and an invalid probe specifier for foounix.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 10) automated in tst.InvalidTraceModule5.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m foounix -m unix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier for foounix.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 11) automated in tst.InvalidTraceModule6.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m fbt:des:des3_crunch_block:return
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe description.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 12)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m fbt:genunix'{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of all the probes matching provider fbt and module
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * genunix.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 13)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m genunix'{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of all the probes matching module genunix with
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * message FOUND
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 14)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m :genunix'{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of all the probes matching module genunix with
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * message FOUND
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 15) automated in tst.InvalidTraceModule7.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m genunix::'{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 16) automated in tst.InvalidTraceModule8.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m genunix:'{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 17)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m unix '{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 18)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -m
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * unix'/probefunc == "preempt"/{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of all the probes matching module genunix,
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * probe function preempt with message FOUND.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */