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
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 * User-level dtrace for smbd
19 * Usage: dtrace -s smbd-doorsvc.d -p `pgrep smbd`
22 #
pragma D option flowindent
28 * smbd_door_dispatch_op() is the logical top of smbd door service calls.
30 pid
$target
:*smbd
:smbd_door_dispatch_op
:entry
36 * If traced and not masked, print entry/return
38 pid
$target
:*smbd
::entry
,
39 pid
$target
:libmlsvc
.so
.1::entry
,
40 pid
$target
:libmlrpc
.so
.1::entry
,
41 pid
$target
:libsmbns
.so
.1::entry
,
42 pid
$target
:libsmb
.so
.1::entry
,
43 pid
$target
:libsmbfs
.so
.1::entry
44 /self
->trace
> 0 && self
->mask
== 0/
46 printf("\t0x%x", arg0
);
47 printf("\t0x%x", arg1
);
48 printf("\t0x%x", arg2
);
49 printf("\t0x%x", arg3
);
50 printf("\t0x%x", arg4
);
51 printf("\t0x%x", arg5
);
55 * Mask (don't print) all function calls below these functions.
56 * These make many boring, repetitive function calls like
57 * smb_mbtowc, smb_msgbuf_has_space, ...
59 pid
$target
::smb_msgbuf_decode
:entry
,
60 pid
$target
::smb_msgbuf_encode
:entry
,
61 pid
$target
::smb_strlwr
:entry
,
62 pid
$target
::smb_strupr
:entry
,
63 pid
$target
::smb_wcequiv_strlen
:entry
69 * Now inverses of above, unwind order.
72 pid
$target
::smb_msgbuf_decode
:return,
73 pid
$target
::smb_msgbuf_encode
:return,
74 pid
$target
::smb_strlwr
:return,
75 pid
$target
::smb_strupr
:return,
76 pid
$target
::smb_wcequiv_strlen
:return
81 pid
$target
:*smbd
::return,
82 pid
$target
:libmlsvc
.so
.1::return,
83 pid
$target
:libmlrpc
.so
.1::return,
84 pid
$target
:libsmbns
.so
.1::return,
85 pid
$target
:libsmb
.so
.1::return,
86 pid
$target
:libsmbfs
.so
.1::return
87 /self
->trace
> 0 && self
->mask
== 0/
89 printf("\t0x%x", arg1
);
92 pid
$target
:*smbd
:smbd_door_dispatch_op
:return