dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / smbsrv / dtrace / smbsrv.d
blob162839bd719d9e7f7e1062718524afe28a4e8af8
1 #!/usr/sbin/dtrace -s
2 /*
3 * This file and its contents are supplied under the terms of the
4 * Common Development and Distribution License ("CDDL"), version 1.0.
5 * You may only use this file in accordance with the terms of version
6 * 1.0 of the CDDL.
8 * A full copy of the text of the CDDL should have accompanied this
9 * source. A copy of the CDDL is also available via the Internet at
10 * http://www.illumos.org/license/CDDL.
14 * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
18 * Developer dtrace program for smbsrv
19 * Usage: dtrace -s smbsrv.d
22 #pragma D option flowindent
24 self int trace;
25 self int mask;
28 * Trace almost everything
30 fbt:smbsrv::entry
32 self->trace++;
36 * If traced and not masked, print entry/return
38 fbt:smbsrv::entry
39 /self->trace > 0 && self->mask == 0/
41 printf("\t0x%x", arg0);
42 printf("\t0x%x", arg1);
43 printf("\t0x%x", arg2);
44 printf("\t0x%x", arg3);
45 printf("\t0x%x", arg4);
46 printf("\t0x%x", arg5);
50 * Mask (don't print) all function calls below these functions.
51 * These make many boring, repetitive function calls like
52 * smb_mbtowc, mbc_marshal_...
54 fbt::smb_mbc_vdecodef:entry,
55 fbt::smb_mbc_vencodef:entry,
56 fbt::smb_msgbuf_decode:entry,
57 fbt::smb_msgbuf_encode:entry,
58 fbt::smb_strlwr:entry,
59 fbt::smb_strupr:entry,
60 fbt::smb_wcequiv_strlen:entry
62 self->mask++;
66 * Now inverses of above, unwind order.
69 fbt::smb_mbc_vdecodef:return,
70 fbt::smb_mbc_vencodef:return,
71 fbt::smb_msgbuf_decode:return,
72 fbt::smb_msgbuf_encode:return,
73 fbt::smb_strlwr:return,
74 fbt::smb_strupr:return,
75 fbt::smb_wcequiv_strlen:return
77 self->mask--;
80 fbt:smbsrv::return
81 /self->trace > 0 && self->mask == 0/
83 printf("\t0x%x", arg1);
86 fbt:smbsrv::return
88 self->trace--;