aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-07-28 10:45:29 +0200
committerMartin Liska <marxin@gcc.gnu.org>2016-07-28 08:45:29 +0000
commit1225d6b1134b5eb31bcb592ac46a4d479dcb62b1 (patch)
tree65d289d14b3f9bef4364fd78f61f605d0611bbf4 /gcc/tree-profile.c
parent9bd6a6aebf1d2ef3c8199d2c9a263dd47054d14c (diff)
downloadgcc-1225d6b1134b5eb31bcb592ac46a4d479dcb62b1.zip
gcc-1225d6b1134b5eb31bcb592ac46a4d479dcb62b1.tar.gz
gcc-1225d6b1134b5eb31bcb592ac46a4d479dcb62b1.tar.bz2
Introduce no_profile_instrument_function attribute
PR gcov-profile/68025 * tree-profile.c (tree_profiling): Respect no_profile_instrument_function attribute. * doc/extend.texi: Document no_profile_instrument_function attribute. PR gcov-profile/68025 * c-common.c (handle_no_profile_instrument_function_attribute): PR gcov-profile/68025 * gcc.dg/no_profile_instrument_function-attr-1.c: New test. From-SVN: r238811
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 1f3a726..39fe15f 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -524,6 +524,9 @@ tree_profiling (void)
if (DECL_SOURCE_LOCATION (node->decl) == BUILTINS_LOCATION)
continue;
+ if (lookup_attribute ("no_profile_instrument_function",
+ DECL_ATTRIBUTES (node->decl)))
+ continue;
/* Do not instrument extern inline functions when testing coverage.
While this is not perfectly consistent (early inlined extern inlines
will get acocunted), testsuite expects that. */