1 /* example usage: dtrace -q -s /path/to/user-probe.d */
2 /*
3  * %CopyrightBegin%
4  *
5  * Copyright Scott Lystig Fritchie 2011-2016. All Rights Reserved.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * %CopyrightEnd%
20  */
21 
22 erlang*:::user_trace-s1
23 {
24     printf("%s\n", copyinstr(arg0));
25 }
26 
27 erlang*:::user_trace-i4s4
28 {
29     printf("%s %s %d %d %d %d '%s' '%s' '%s' '%s'\n",
30            copyinstr(arg0),
31            arg1 == NULL ? "" : copyinstr(arg1),
32            arg2, arg3, arg4, arg5,
33            arg6 == NULL ? "" : copyinstr(arg6),
34            arg7 == NULL ? "" : copyinstr(arg7),
35            arg8 == NULL ? "" : copyinstr(arg8),
36            arg9 == NULL ? "" : copyinstr(arg9));
37 }
38