1*5331Samw #!/usr/sbin/dtrace -qs 2*5331Samw /* 3*5331Samw * CDDL HEADER START 4*5331Samw * 5*5331Samw * The contents of this file are subject to the terms of the 6*5331Samw * Common Development and Distribution License (the "License"). 7*5331Samw * You may not use this file except in compliance with the License. 8*5331Samw * 9*5331Samw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*5331Samw * or http://www.opensolaris.org/os/licensing. 11*5331Samw * See the License for the specific language governing permissions 12*5331Samw * and limitations under the License. 13*5331Samw * 14*5331Samw * When distributing Covered Code, include this CDDL HEADER in each 15*5331Samw * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*5331Samw * If applicable, add the following below this CDDL HEADER, with the 17*5331Samw * fields enclosed by brackets "[]" replaced with your own identifying 18*5331Samw * information: Portions Copyright [yyyy] [name of copyright owner] 19*5331Samw * 20*5331Samw * CDDL HEADER END 21*5331Samw */ 22*5331Samw /* 23*5331Samw * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24*5331Samw * Use is subject to license terms. 25*5331Samw */ 26*5331Samw 27*5331Samw #pragma ident "%Z%%M% %I% %E% SMI" 28*5331Samw 29*5331Samw BEGIN 30*5331Samw { 31*5331Samw printf("\n-->SMB Server VFS Trace Started"); 32*5331Samw printf("\n\n"); 33*5331Samw } 34*5331Samw 35*5331Samw END 36*5331Samw { 37*5331Samw printf("\n<--SMB Server VFS Trace Ended"); 38*5331Samw printf("\n\n"); 39*5331Samw } 40*5331Samw 41*5331Samw sdt:smbsrv:smb_vfs_hold:smb_vfs_hold_hit 42*5331Samw { 43*5331Samw printf("\nSMB VFS lookup hit"); 44*5331Samw printf("\n Path: %s", (string)((smb_vfs_t *)arg0)->sv_rootvp->v_path); 45*5331Samw printf("\n RefCount: %d", ((smb_vfs_t *)arg0)->sv_refcnt); 46*5331Samw } 47*5331Samw 48*5331Samw sdt:smbsrv:smb_vfs_hold:smb_vfs_hold_miss 49*5331Samw { 50*5331Samw printf("\nSMB VFS lookup miss"); 51*5331Samw printf("\n Path: %s", (string)((smb_vfs_t *)arg0)->sv_rootvp->v_path); 52*5331Samw printf("\n RefCount: %d", ((smb_vfs_t *)arg0)->sv_refcnt); 53*5331Samw } 54*5331Samw 55*5331Samw sdt:smbsrv:smb_vfs_rele:smb_vfs_release 56*5331Samw /(smb_vfs_t *)arg0 != 0/ 57*5331Samw { 58*5331Samw printf("\nSMB VFS release hit"); 59*5331Samw printf("\n Path: %s", (string)((smb_vfs_t *)arg0)->sv_rootvp->v_path); 60*5331Samw printf("\n RefCount: %d", ((smb_vfs_t *)arg0)->sv_refcnt - 2); 61*5331Samw } 62*5331Samw 63*5331Samw sdt:smbsrv:smb_vfs_rele:smb_vfs_release 64*5331Samw /(smb_vfs_t *)arg0 == 0/ 65*5331Samw { 66*5331Samw printf("\nSMB VFS release miss"); 67*5331Samw printf("\n Path: %s", (string)((vnode_t *)arg1)->v_path); 68*5331Samw } 69*5331Samw 70*5331Samw sdt:smbsrv:smb_vfs_rele_all:smb_vfs_rele_all_hit 71*5331Samw { 72*5331Samw printf("\nSMB VFS free"); 73*5331Samw printf("\n Path: %s", (string)((smb_vfs_t *)arg0)->sv_rootvp->v_path); 74*5331Samw printf("\n RefCount: %d", ((smb_vfs_t *)arg0)->sv_refcnt); 75*5331Samw } 76*5331Samw 77*5331Samw 78