From owner-svn-src-all@freebsd.org Sat Dec 10 03:11:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5184AC6F968; Sat, 10 Dec 2016 03:11:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 110E9A52; Sat, 10 Dec 2016 03:11:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBA3B6Li014068; Sat, 10 Dec 2016 03:11:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBA3B6m6014065; Sat, 10 Dec 2016 03:11:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201612100311.uBA3B6m6014065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 10 Dec 2016 03:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309785 - in head/sys/cddl/dev/fbt: arm powerpc x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Dec 2016 03:11:07 -0000 Author: markj Date: Sat Dec 10 03:11:05 2016 New Revision: 309785 URL: https://svnweb.freebsd.org/changeset/base/309785 Log: Consistently use fbt_excluded() on all architectures. MFC after: 2 weeks Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c head/sys/cddl/dev/fbt/powerpc/fbt_isa.c head/sys/cddl/dev/fbt/x86/fbt_isa.c Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Dec 10 02:59:34 2016 (r309784) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Dec 10 03:11:05 2016 (r309785) @@ -95,16 +95,8 @@ fbt_provide_module_function(linker_file_ uint32_t *instr, *limit; int popm; - if (strncmp(name, "dtrace_", 7) == 0 && - strncmp(name, "dtrace_safe_", 12) != 0) { - /* - * Anything beginning with "dtrace_" may be called - * from probe context unless it explicitly indicates - * that it won't be called from probe context by - * using the prefix "dtrace_safe_". - */ + if (fbt_excluded(name)) return (0); - } instr = (uint32_t *)symval->value; limit = (uint32_t *)(symval->value + symval->size); Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat Dec 10 02:59:34 2016 (r309784) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat Dec 10 03:11:05 2016 (r309785) @@ -127,16 +127,8 @@ fbt_provide_module_function(linker_file_ return (0); #endif - if (strncmp(name, "dtrace_", 7) == 0 && - strncmp(name, "dtrace_safe_", 12) != 0) { - /* - * Anything beginning with "dtrace_" may be called - * from probe context unless it explicitly indicates - * that it won't be called from probe context by - * using the prefix "dtrace_safe_". - */ + if (fbt_excluded(name) == 0) return (0); - } instr = (uint32_t *) symval->value; limit = (uint32_t *) (symval->value + symval->size); Modified: head/sys/cddl/dev/fbt/x86/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/x86/fbt_isa.c Sat Dec 10 02:59:34 2016 (r309784) +++ head/sys/cddl/dev/fbt/x86/fbt_isa.c Sat Dec 10 03:11:05 2016 (r309785) @@ -158,21 +158,15 @@ fbt_provide_module_function(linker_file_ int size; uint8_t *instr, *limit; - if ((strncmp(name, "dtrace_", 7) == 0 && - strncmp(name, "dtrace_safe_", 12) != 0) || - strcmp(name, "trap_check") == 0) { - /* - * Anything beginning with "dtrace_" may be called - * from probe context unless it explicitly indicates - * that it won't be called from probe context by - * using the prefix "dtrace_safe_". - * - * Additionally, we avoid instrumenting trap_check() to avoid - * the possibility of generating a fault in probe context before - * DTrace's fault handler is called. - */ + if (fbt_excluded(name)) + return (0); + + /* + * trap_check() is a wrapper for DTrace's fault handler, so we don't + * want to be able to instrument it. + */ + if (strcmp(name, "trap_check") == 0) return (0); - } size = symval->size;