1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2017 Nexenta Systems, Inc. All rights reserved. 14 * Copyright 2024 RackTop Systems, Inc. 15 */ 16 17 #include <string.h> 18 #include <sys/cmn_err.h> 19 #include <sys/sdt.h> 20 21 /* 22 * See: DTRACE_PROBE... in sys/sdt.h 23 */ 24 25 int fknsmb_dtrace_log = 0; 26 27 void 28 fknsmb_dtrace1(const char *n, long v1) 29 { 30 if (strcmp(n, "vn__hold") == 0 || 31 strcmp(n, "vn__rele") == 0) 32 return; 33 34 if (fknsmb_dtrace_log) { 35 cmn_err(CE_CONT, "dtrace1: %s," 36 " 0x%lx\n", n, v1); 37 } 38 } 39 40 void 41 fknsmb_dtrace2(const char *n, long v1, long v2) 42 { 43 if (fknsmb_dtrace_log) { 44 cmn_err(CE_CONT, "dtrace2: %s," 45 " 0x%lx, 0x%lx\n", n, v1, v2); 46 } 47 } 48 49 void 50 fknsmb_dtrace3(const char *n, long v1, long v2, long v3) 51 { 52 if (fknsmb_dtrace_log) { 53 cmn_err(CE_CONT, "dtrace3: %s," 54 " 0x%lx, 0x%lx, 0x%lx\n", n, v1, v2, v3); 55 } 56 } 57