From patchwork Fri Mar 21 17:10:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 332686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B95512C00AF for ; Sat, 22 Mar 2014 04:10:25 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=hplZuaxdM7QWNJpXzZLXDEuNnNzEcKPjPuCt/j0MzWyG+V Al/gyYQrT1267vV20RtS42lBSPC0kGCC+4LqgRkKAKVyd/RPA4byHgfpeStKtqvq shCpluKO7jvQuOETP/0I+GAPC4aCj90cOvRnEioonTTHeUVwYGyRB/uASH+U4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=wIMqg+7KgUN7Gy5mXeIQOFzl6GA=; b=Sbve0gcDEi3G18WkMK+D d4duBy6M2ZqtW6l5Wey5QNe4ZrI5StmQiKlWa9uA+2OH9ZsgOXoRo19Q+3ef6cKV aYDta6+Wa0WyVjVRETcBWKzgMYz1+qHhj8fb6CqHWykXCvjxWFpVWsCop+7882Yg Q3Ut0AvGhbt/0UKNDjOaxOs= Received: (qmail 5118 invoked by alias); 21 Mar 2014 17:10:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 5108 invoked by uid 89); 21 Mar 2014 17:10:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-ie0-f179.google.com Received: from mail-ie0-f179.google.com (HELO mail-ie0-f179.google.com) (209.85.223.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 21 Mar 2014 17:10:16 +0000 Received: by mail-ie0-f179.google.com with SMTP id lx4so2778966iec.10 for ; Fri, 21 Mar 2014 10:10:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=Bz8c7DI4q0mK1sm8xbY95/P56qXylsCvKLVqtmHwYLM=; b=gtP15D8YLqUeAqw3ySwBvSd1t+IAIodfx1ODgjVfTicPRsE1I2s7nKFlZBTdFlml1H rPU+MmJYm7/vCk+S9XfPd52youqTevg82e28f7InIXFZq0EwB3rMDXbEDcogzxpSMEWs RUmqoMBFmbebHOhGvE8tSz/57rlMvU2AeGiKMYsmqbTqnhYqIyNbmFrlqbi2+AqhQuVz OBR96pKs8rAeCNCBaMAcmpwdSgiw986cSWOe6/gT4yTuoPWnpG8U07tu/KH13ygMZRBe BdYGUKXzXOWJvDAxhqAmg+Cb6SYbYF2WC40klZpknTTdWBgoxhzmePGtkWMdjzbu308i l5ig== X-Gm-Message-State: ALoCoQntgFUx0sxN1tq05xkAye6bPn2IanSlu/fuwwGTB7igFEGXzqp1cZcl722PZ+ajzhaoqXZCz8JhMLUqXIwBMTVdj/BIMk4wAP9m3+hiwyvclktQw54SyhwLcAyrV8ufs6Ra+CrqOn2k5diSyx6klYdQT9Gbw81SRtMr7mJF4s2yvbYWePnXogYSN69CKRnah/Rhl72qSiC20aOy+jASk0tc/q73sg== MIME-Version: 1.0 X-Received: by 10.42.204.197 with SMTP id fn5mr7012icb.95.1395421815206; Fri, 21 Mar 2014 10:10:15 -0700 (PDT) Received: by 10.64.18.207 with HTTP; Fri, 21 Mar 2014 10:10:15 -0700 (PDT) Date: Fri, 21 Mar 2014 10:10:15 -0700 Message-ID: Subject: [GOOGLE] guard recording of autofdo annotation info in a flag From: Dehao Chen To: GCC Patches X-IsSubscribed: yes This patch guards autofdo annotation coverage recording with a flag. Test on-going. OK for google-4_8 if test passes? Thanks, Dehao Index: gcc/auto-profile.c =================================================================== --- gcc/auto-profile.c (revision 208753) +++ gcc/auto-profile.c (working copy) @@ -1634,7 +1634,8 @@ auto_profile (void) pop_cfun (); } - autofdo::afdo_source_profile->write_annotated_count (); + if (flag_auto_profile_record_coverage_in_elf) + autofdo::afdo_source_profile->write_annotated_count (); return 0; } Index: gcc/common.opt =================================================================== --- gcc/common.opt (revision 208753) +++ gcc/common.opt (working copy) @@ -946,6 +946,10 @@ fauto-profile-accurate Common Report Var(flag_auto_profile_accurate) Optimization Whether to assume the sample profile is accurate. +fauto-profile-record-coverage-in-elf +Common Report Var(flag_auto_profile_record_coverage_in_elf) Optimization +Whether to record annotation coverage info in elf. + ; -fcheck-bounds causes gcc to generate array bounds checks. ; For C, C++ and ObjC: defaults off. ; For Java: defaults to on.