1 /* example usage: dtrace -q -s /path/to/driver1.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*:::driver-init 23 { 24 printf("driver init name %s major %d minor %d flags %d\n", 25 copyinstr(arg0), arg1, arg2, arg3); 26 } 27 28 erlang*:::driver-start 29 { 30 printf("driver start pid %s driver name %s port %s\n", 31 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 32 } 33 34 erlang*:::driver-stop 35 { 36 printf("driver stop pid %s driver name %s port %s\n", 37 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 38 } 39 40 erlang*:::driver-finish 41 { 42 printf("driver finish driver name %s port %s\n", 43 copyinstr(arg0), copyinstr(arg1)); 44 } 45 46 erlang*:::driver-flush 47 { 48 printf("driver flush pid %s port %s port name %s\n", 49 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 50 } 51 52 erlang*:::driver-output 53 { 54 printf("driver output pid %s port %s port name %s bytes %d\n", 55 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3); 56 } 57 58 erlang*:::driver-outputv 59 { 60 printf("driver outputv pid %s port %s port name %s bytes %d\n", 61 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3); 62 } 63 64 erlang*:::driver-control 65 { 66 printf("driver control pid %s port %s port name %s command %d bytes %d\n", 67 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3, arg4); 68 } 69 70 erlang*:::driver-call 71 { 72 printf("driver call pid %s port %s port name %s command %d bytes %d\n", 73 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3, arg4); 74 } 75 76 erlang*:::driver-event 77 { 78 printf("driver event pid %s port %s port name %s\n", 79 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 80 } 81 82 erlang*:::driver-ready_input 83 { 84 printf("driver ready_input pid %s port %s port name %s\n", 85 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 86 } 87 88 erlang*:::driver-ready_output 89 { 90 printf("driver ready_output pid %s port %s port name %s\n", 91 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 92 } 93 94 erlang*:::driver-timeout 95 { 96 printf("driver timeout pid %s port %s port name %s\n", 97 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 98 } 99 100 erlang*:::driver-ready_async 101 { 102 printf("driver ready_async pid %s port %s port name %s\n", 103 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 104 } 105 106 erlang*:::driver-process_exit 107 { 108 printf("driver process_exit pid %s port %s port name %s\n", 109 copyinstr(arg0), copyinstr(arg1), copyinstr(arg2)); 110 } 111 112 erlang*:::driver-stop_select 113 { 114 printf("driver stop_select driver name %s\n", copyinstr(arg0)); 115 } 116