aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2012-08-20 10:23:32 -0400
committerDiego Novillo <dnovillo@gcc.gnu.org>2012-08-20 10:23:32 -0400
commite3b350575018370e7564d9686ede0f804b99637f (patch)
treedb19c9388a58aa903a93fa7ea4a50d5c130bd265
parenteb83633a818fcc4c568d633d7ddbac078d2fc1fe (diff)
downloadgcc-e3b350575018370e7564d9686ede0f804b99637f.zip
gcc-e3b350575018370e7564d9686ede0f804b99637f.tar.gz
gcc-e3b350575018370e7564d9686ede0f804b99637f.tar.bz2
Fix -ftime-report for C++ lookup.
Found this while running -ftime-report on a largish C++ source file. We need to start TV_NAME_LOOKUP conditionally inside poplevel() because it may be called from another lookup routine that already has TV_NAME_LOOKUP going. Tested on x86_64. Committed to trunk. 2012-08-20 Diego Novillo <dnovillo@google.com> * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally. From-SVN: r190535
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b596155..5c4f362 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2012-08-20 Diego Novillo <dnovillo@google.com>
+
+ * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
+
2012-08-20 Richard Guenther <rguenther@suse.de>
* name-lookup.c (store_binding_p): New predicate, split out from ...
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 5908996..0dad597 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -552,7 +552,7 @@ poplevel (int keep, int reverse, int functionbody)
unsigned ix;
cp_label_binding *label_bind;
- timevar_start (TV_NAME_LOOKUP);
+ bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
restart:
block = NULL_TREE;
@@ -818,7 +818,7 @@ poplevel (int keep, int reverse, int functionbody)
if (kind == sk_cleanup)
goto restart;
- timevar_stop (TV_NAME_LOOKUP);
+ timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return block;
}