public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Lawrence Crowl <crowl@google.com>
Cc: reply@codereview.appspotmail.com, dnovillo@google.com,
	       gcc-patches@gcc.gnu.org
Subject: Re: [patch] Split Parse Timevar (rev 2) (issue4433076)
Date: Sat, 14 May 2011 02:59:00 -0000	[thread overview]
Message-ID: <4DCDAF89.9010804@redhat.com> (raw)
In-Reply-To: <4DBB6F71.4070604@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

I'm applying this patch to fix a crash that I get when running cc1plus 
directly without -quiet; all the other TV_OVERLOAD bits use 
timevar_cond_*, so it seems that these should too.

Tested x86_64-pc-linux-gnu, applying to trunk.


[-- Attachment #2: timevar.patch --]
[-- Type: text/x-patch, Size: 1194 bytes --]

commit 8de1530fc6ca07e3ca37ff7689c65931025d9f0d
Author: Jason Merrill <jason@redhat.com>
Date:   Fri May 13 14:56:33 2011 -0400

    	* call.c (build_op_call): Use timevar_cond_start/stop.
    	(build_user_type_conversion): Likewise.

diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 095d1b0..09ad4ae 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3521,7 +3521,7 @@ build_user_type_conversion (tree totype, tree expr, int flags)
   struct z_candidate *cand;
   tree ret;
 
-  timevar_start (TV_OVERLOAD);
+  bool subtime = timevar_cond_start (TV_OVERLOAD);
   cand = build_user_type_conversion_1 (totype, expr, flags);
 
   if (cand)
@@ -3537,7 +3537,7 @@ build_user_type_conversion (tree totype, tree expr, int flags)
   else
     ret = NULL_TREE;
 
-  timevar_stop (TV_OVERLOAD);
+  timevar_cond_stop (TV_OVERLOAD, subtime);
   return ret;
 }
 
@@ -4029,9 +4029,9 @@ tree
 build_op_call (tree obj, VEC(tree,gc) **args, tsubst_flags_t complain)
 {
   tree ret;
-  timevar_start (TV_OVERLOAD);
+  bool subtime = timevar_cond_start (TV_OVERLOAD);
   ret = build_op_call_1 (obj, args, complain);
-  timevar_stop (TV_OVERLOAD);
+  timevar_cond_stop (TV_OVERLOAD, subtime);
   return ret;
 }
 

  reply	other threads:[~2011-05-13 22:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 19:16 Lawrence Crowl
2011-04-30  7:57 ` Jason Merrill
2011-05-14  2:59   ` Jason Merrill [this message]
2011-05-14  7:01     ` Lawrence Crowl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DCDAF89.9010804@redhat.com \
    --to=jason@redhat.com \
    --cc=crowl@google.com \
    --cc=dnovillo@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=reply@codereview.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).