1*da6c28aaSamw #!/usr/sbin/dtrace -qs 2*da6c28aaSamw /* 3*da6c28aaSamw * CDDL HEADER START 4*da6c28aaSamw * 5*da6c28aaSamw * The contents of this file are subject to the terms of the 6*da6c28aaSamw * Common Development and Distribution License (the "License"). 7*da6c28aaSamw * You may not use this file except in compliance with the License. 8*da6c28aaSamw * 9*da6c28aaSamw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*da6c28aaSamw * or http://www.opensolaris.org/os/licensing. 11*da6c28aaSamw * See the License for the specific language governing permissions 12*da6c28aaSamw * and limitations under the License. 13*da6c28aaSamw * 14*da6c28aaSamw * When distributing Covered Code, include this CDDL HEADER in each 15*da6c28aaSamw * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*da6c28aaSamw * If applicable, add the following below this CDDL HEADER, with the 17*da6c28aaSamw * fields enclosed by brackets "[]" replaced with your own identifying 18*da6c28aaSamw * information: Portions Copyright [yyyy] [name of copyright owner] 19*da6c28aaSamw * 20*da6c28aaSamw * CDDL HEADER END 21*da6c28aaSamw */ 22*da6c28aaSamw /* 23*da6c28aaSamw * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24*da6c28aaSamw * Use is subject to license terms. 25*da6c28aaSamw */ 26*da6c28aaSamw 27*da6c28aaSamw #pragma ident "%Z%%M% %I% %E% SMI" 28*da6c28aaSamw 29*da6c28aaSamw BEGIN 30*da6c28aaSamw { 31*da6c28aaSamw printf("-->SMB Server Node Trace Started"); 32*da6c28aaSamw printf("\n\n"); 33*da6c28aaSamw } 34*da6c28aaSamw 35*da6c28aaSamw END 36*da6c28aaSamw { 37*da6c28aaSamw printf("<--SMB Server Node Trace Ended"); 38*da6c28aaSamw printf("\n\n"); 39*da6c28aaSamw } 40*da6c28aaSamw 41*da6c28aaSamw sdt:smbsrv:smb_node_lookup:smb_node_lookup_hit 42*da6c28aaSamw /((smb_node_t *)arg0)->n_state == SMB_NODE_STATE_AVAILABLE/ 43*da6c28aaSamw { 44*da6c28aaSamw printf("\nSMB Node lookup hit/SMB_NODE_STATE_AVAILABLE"); 45*da6c28aaSamw printf("\n\tNode: %p", arg0); 46*da6c28aaSamw printf("\n\tRefCnt: %d", ((smb_node_t *)arg0)->n_refcnt); 47*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg0)->vp)->v_path); 48*da6c28aaSamw stack(); 49*da6c28aaSamw } 50*da6c28aaSamw 51*da6c28aaSamw sdt:smbsrv:smb_node_lookup:smb_node_lookup_hit 52*da6c28aaSamw /((smb_node_t *)arg0)->n_state == SMB_NODE_STATE_DESTROYING/ 53*da6c28aaSamw { 54*da6c28aaSamw printf("\nSMB Node lookup hit/SMB_NODE_STATE_DESTROYING"); 55*da6c28aaSamw printf("\n\tNode: %p", arg0); 56*da6c28aaSamw printf("\n\tRefCnt: %d", ((smb_node_t *)arg0)->n_refcnt); 57*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg0)->vp)->v_path); 58*da6c28aaSamw stack(); 59*da6c28aaSamw } 60*da6c28aaSamw 61*da6c28aaSamw sdt:smbsrv:smb_node_lookup:smb_node_lookup_hit 62*da6c28aaSamw /(((smb_node_t *)arg0)->n_state != SMB_NODE_STATE_DESTROYING) && 63*da6c28aaSamw (((smb_node_t *)arg0)->n_state != SMB_NODE_STATE_AVAILABLE)/ 64*da6c28aaSamw { 65*da6c28aaSamw printf("\nSMB Node lookup hit/Unknown State"); 66*da6c28aaSamw printf("\n\tNode: %p", arg0); 67*da6c28aaSamw printf("\n\tRefCnt: %d", ((smb_node_t *)arg0)->n_refcnt); 68*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg0)->vp)->v_path); 69*da6c28aaSamw stack(); 70*da6c28aaSamw } 71*da6c28aaSamw 72*da6c28aaSamw sdt:smbsrv:smb_node_lookup:smb_node_lookup_miss 73*da6c28aaSamw { 74*da6c28aaSamw printf("\nSMB Node lookup miss"); 75*da6c28aaSamw printf("\n\tNode: %p", arg0); 76*da6c28aaSamw printf("\n\tRefCnt: %d", ((smb_node_t *)arg0)->n_refcnt); 77*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg0)->vp)->v_path); 78*da6c28aaSamw stack(); 79*da6c28aaSamw } 80*da6c28aaSamw 81*da6c28aaSamw sdt:smbsrv:smb_node_ref:smb_node_ref_exit 82*da6c28aaSamw { 83*da6c28aaSamw printf("\nSMB Node reference taken"); 84*da6c28aaSamw printf("\n\tNode: %p", arg0); 85*da6c28aaSamw printf("\n\tRefCnt: %d", ((smb_node_t *)arg0)->n_refcnt); 86*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg0)->vp)->v_path); 87*da6c28aaSamw stack(); 88*da6c28aaSamw } 89*da6c28aaSamw 90*da6c28aaSamw sdt:smbsrv:smb_node_release:smb_node_release 91*da6c28aaSamw /((smb_node_t *)arg0)->n_refcnt == 1/ 92*da6c28aaSamw { 93*da6c28aaSamw printf("\nSMB Node release(will be destroyed)"); 94*da6c28aaSamw printf("\n\tNode: %p", arg0); 95*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg0)->vp)->v_path); 96*da6c28aaSamw stack(); 97*da6c28aaSamw } 98*da6c28aaSamw 99*da6c28aaSamw sdt:smbsrv:smb_node_release:smb_node_release 100*da6c28aaSamw /((smb_node_t *)arg0)->n_refcnt > 1/ 101*da6c28aaSamw { 102*da6c28aaSamw printf("\nSMB Node release"); 103*da6c28aaSamw printf("\n\tNode: %p", arg0); 104*da6c28aaSamw printf("\n\tRefCnt: %d", ((smb_node_t *)arg0)->n_refcnt); 105*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg0)->vp)->v_path); 106*da6c28aaSamw stack(); 107*da6c28aaSamw } 108*da6c28aaSamw 109*da6c28aaSamw sdt:smbsrv:smb_node_delete_on_close:smb_node_delete_on_close 110*da6c28aaSamw /(int)arg0 == 0/ 111*da6c28aaSamw { 112*da6c28aaSamw printf("\nSMB Node delete on close successful"); 113*da6c28aaSamw printf("\n\tNode: %p", arg1); 114*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg1)->vp)->v_path); 115*da6c28aaSamw stack(); 116*da6c28aaSamw } 117*da6c28aaSamw 118*da6c28aaSamw sdt:smbsrv:smb_node_delete_on_close:smb_node_delete_on_close 119*da6c28aaSamw /(int)arg0 == 0/ 120*da6c28aaSamw { 121*da6c28aaSamw printf("\nSMB Node delete on close failed (%d)", (int)arg0); 122*da6c28aaSamw printf("\n\tNode: %p", arg1); 123*da6c28aaSamw printf("\n\tName: %s", (string)((vnode_t *)((smb_node_t *)arg1)->vp)->v_path); 124*da6c28aaSamw stack(); 125*da6c28aaSamw } 126*da6c28aaSamw 127*da6c28aaSamw 128