Module Name:    src
Committed By:   matt
Date:           Fri Feb 18 21:12:17 UTC 2011

Modified Files:
        src/sys/arch/powerpc/booke [matt-nb5-pq3]: booke_stubs.c
        src/sys/sys [matt-nb5-pq3]: cdefs.h

Log Message:
Add __noprofile attribute and use it to prevent stubs from being profiled.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/powerpc/booke/booke_stubs.c
cvs rdiff -u -r1.69 -r1.69.14.1 src/sys/sys/cdefs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/booke/booke_stubs.c
diff -u src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.1 src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.2
--- src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.1	Fri Jan  7 01:26:19 2011
+++ src/sys/arch/powerpc/booke/booke_stubs.c	Fri Feb 18 21:12:17 2011
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: booke_stubs.c,v 1.1.2.1 2011/01/07 01:26:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_stubs.c,v 1.1.2.2 2011/02/18 21:12:17 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -47,7 +47,7 @@
 #include <powerpc/instr.h>
 #include <powerpc/booke/cpuvar.h>
 
-#define	__stub	__section(".stub")
+#define	__stub	__section(".stub") __noprofile
 
 void tlb_set_asid(uint32_t) __stub;
 

Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.69 src/sys/sys/cdefs.h:1.69.14.1
--- src/sys/sys/cdefs.h:1.69	Sun Aug 17 00:23:02 2008
+++ src/sys/sys/cdefs.h	Fri Feb 18 21:12:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.69 2008/08/17 00:23:02 gmcgarry Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.69.14.1 2011/02/18 21:12:17 matt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -63,6 +63,12 @@
 #include <sys/cdefs_aout.h>
 #endif
 
+#if __GNUC_PREREQ__(3, 1)
+#define	__noprofile	__attribute__((__no_instrument_function__))
+#else
+#define	__noprofile	/* nothing */
+#endif
+
 #if defined(__cplusplus)
 #define	__BEGIN_DECLS		extern "C" {
 #define	__END_DECLS		}

Reply via email to