From patchwork Tue Sep 27 07:46:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 675423 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 3sjtFT3pCdz9s4n for ; Tue, 27 Sep 2016 17:46:35 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=KTJ9U1kv; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=JzPm60I2xugh7+TmGw884ZPMtg+KNgtaj9csw6pQukPF+O9rmO zXAEIc8BYkcDSn2lDwq8urHor8KA9EdZ6yboFBhz3t7dTKv9rh9UuEwEmAyusRej QhqBYCVrL6RTL2nPYvlKOnKSFUiRwCvRXyVvhXNqKGSmBAYTi6LepdnBQ= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=UP+RmpnRWVqMZH0rAujQNp7XFxA=; b=KTJ9U1kvfp5wr9E/JZvi FP/hTkatLjIcYRuZkUZ2FWOm6I8vMEIq1LKlJHY9xooZCgXDMSqz30A/WbV6qHIg CVAIQk4EQrnVtR03xez02fu2ZydBVzg1imWbkrZw6ibxhv/KzUk12xIIpz6eTKHO TTs/6dIwc5uIUkFUx4NKajA= Received: (qmail 96922 invoked by alias); 27 Sep 2016 07:46:24 -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 96907 invoked by uid 89); 27 Sep 2016 07:46:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=entity X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Sep 2016 07:46:13 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 812C3AB9F; Tue, 27 Sep 2016 07:46:11 +0000 (UTC) To: GCC Patches Cc: Markus Trippelsdorf From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Remove __gcov_merge_delta (PR bootstrap/77749) Message-ID: <47561d27-fa73-c806-8ed2-9a0743e3bb97@suse.cz> Date: Tue, 27 Sep 2016 09:46:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 X-IsSubscribed: yes Hello. Following patch removes forgotten hunks connected to removal of __gcov_merge_delta counter. I'm running make profiledbootstrap, ready to install the patch after it finishes? Thanks, Martin From e0123fe1cefe5f5cced239c36ebccd53c38feb25 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 27 Sep 2016 09:38:58 +0200 Subject: [PATCH] Remove __gcov_merge_delta (PR bootstrap/77749) gcc/ChangeLog: 2016-09-27 Martin Liska * gcov-counter.def: Remove GCOV_COUNTER_V_DELTA. libgcc/ChangeLog: 2016-09-27 Martin Liska * Makefile.in: Remove _gcov_merge_delta. * libgcov-merge.c (void __gcov_merge_delta): Remove. * libgcov-util.c (__gcov_delta_counter_op): Remove. * libgcov.h: Remove declaration of __gcov_merge_delta. --- gcc/gcov-counter.def | 3 --- libgcc/Makefile.in | 2 +- libgcc/libgcov-merge.c | 45 --------------------------------------------- libgcc/libgcov-util.c | 17 ----------------- libgcc/libgcov.h | 5 ----- 5 files changed, 1 insertion(+), 71 deletions(-) diff --git a/gcc/gcov-counter.def b/gcc/gcov-counter.def index 64c2673..55d3f0c 100644 --- a/gcc/gcov-counter.def +++ b/gcc/gcov-counter.def @@ -38,9 +38,6 @@ DEF_GCOV_COUNTER(GCOV_COUNTER_V_POW2, "pow2", _add) /* The most common value of expression. */ DEF_GCOV_COUNTER(GCOV_COUNTER_V_SINGLE, "single", _single) -/* The most common difference between consecutive values of expression. */ -DEF_GCOV_COUNTER(GCOV_COUNTER_V_DELTA, "delta", _delta) - /* The most common indirect address. */ DEF_GCOV_COUNTER(GCOV_COUNTER_V_INDIR, "indirect_call", _single) diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index ff3c77f..873cad0 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -877,7 +877,7 @@ include $(iterator) # Build libgcov components. -LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single _gcov_merge_delta \ +LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single \ _gcov_merge_ior _gcov_merge_time_profile _gcov_merge_icall_topn LIBGCOV_PROFILER = _gcov_interval_profiler \ _gcov_interval_profiler_atomic \ diff --git a/libgcc/libgcov-merge.c b/libgcc/libgcov-merge.c index 3a8bb2c..fd2f074 100644 --- a/libgcc/libgcov-merge.c +++ b/libgcc/libgcov-merge.c @@ -38,11 +38,6 @@ void __gcov_merge_single (gcov_type *counters __attribute__ ((unused)), unsigned n_counters __attribute__ ((unused))) {} #endif -#ifdef L_gcov_merge_delta -void __gcov_merge_delta (gcov_type *counters __attribute__ ((unused)), - unsigned n_counters __attribute__ ((unused))) {} -#endif - #else #ifdef L_gcov_merge_add @@ -127,46 +122,6 @@ __gcov_merge_single (gcov_type *counters, unsigned n_counters) } #endif /* L_gcov_merge_single */ -#ifdef L_gcov_merge_delta -/* The profile merging function for choosing the most common - difference between two consecutive evaluations of the value. It is - given an array COUNTERS of N_COUNTERS old counters and it reads the - same number of counters from the gcov file. The counters are split - into 4-tuples where the members of the tuple have meanings: - - -- the last value of the measured entity - -- the stored candidate on the most common difference - -- counter - -- total number of evaluations of the value */ -void -__gcov_merge_delta (gcov_type *counters, unsigned n_counters) -{ - unsigned i, n_measures; - gcov_type value, counter, all; - - gcc_assert (!(n_counters % 4)); - n_measures = n_counters / 4; - for (i = 0; i < n_measures; i++, counters += 4) - { - /* last = */ gcov_get_counter (); - value = gcov_get_counter_target (); - counter = gcov_get_counter (); - all = gcov_get_counter (); - - if (counters[1] == value) - counters[2] += counter; - else if (counter > counters[2]) - { - counters[1] = value; - counters[2] = counter - counters[2]; - } - else - counters[2] -= counter; - counters[3] += all; - } -} -#endif /* L_gcov_merge_delta */ - #ifdef L_gcov_merge_icall_topn /* The profile merging function used for merging indirect call counts This function is given array COUNTERS of N_COUNTERS old counters and it diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 24ee50e..b1d966c 100644 --- a/libgcc/libgcov-util.c +++ b/libgcc/libgcov-util.c @@ -720,23 +720,6 @@ __gcov_time_profile_counter_op (gcov_type *counters ATTRIBUTE_UNUSED, /* Do nothing. */ } -/* Performaing FN upon delta counters. */ - -static void -__gcov_delta_counter_op (gcov_type *counters, unsigned n_counters, - counter_op_fn fn, void *data1, void *data2) -{ - unsigned i, n_measures; - - gcc_assert (!(n_counters % 4)); - n_measures = n_counters / 4; - for (i = 0; i < n_measures; i++, counters += 4) - { - counters[2] = fn (counters[2], data1, data2); - counters[3] = fn (counters[3], data1, data2); - } -} - /* Performing FN upon single counters. */ static void diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h index 25147de..725ef0a 100644 --- a/libgcc/libgcov.h +++ b/libgcc/libgcov.h @@ -126,7 +126,6 @@ typedef unsigned gcov_position_t; #define L_gcov 1 #define L_gcov_merge_add 1 #define L_gcov_merge_single 1 -#define L_gcov_merge_delta 1 #define L_gcov_merge_ior 1 #define L_gcov_merge_time_profile 1 #define L_gcov_merge_icall_topn 1 @@ -256,10 +255,6 @@ extern void __gcov_merge_time_profile (gcov_type *, unsigned) ATTRIBUTE_HIDDEN; /* The merge function to choose the most common value. */ extern void __gcov_merge_single (gcov_type *, unsigned) ATTRIBUTE_HIDDEN; -/* The merge function to choose the most common difference between - consecutive values. */ -extern void __gcov_merge_delta (gcov_type *, unsigned) ATTRIBUTE_HIDDEN; - /* The merge function that just ors the counters together. */ extern void __gcov_merge_ior (gcov_type *, unsigned) ATTRIBUTE_HIDDEN; -- 2.9.2