From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id C0FEE384A00F for ; Mon, 23 Nov 2020 14:55:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C0FEE384A00F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7A743AC23; Mon, 23 Nov 2020 14:55:45 +0000 (UTC) Subject: Re: [PATCH] gcov: Add __gcov_info_to_gdca() To: Sebastian Huber , gcc-patches@gcc.gnu.org References: <20201117095741.3143-1-sebastian.huber@embedded-brains.de> <4806f0f4-2fee-867e-87ad-6831aedd9be7@suse.cz> <1df244a2-8e31-5c2d-ea3f-98114c10b405@embedded-brains.de> <2e82011f-c21b-a167-1f86-01ae0464ceb0@suse.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <242760ed-f428-0442-8147-b3f7bec9f03c@suse.cz> Date: Mon, 23 Nov 2020 15:55:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2020 14:55:48 -0000 On 11/23/20 3:50 PM, Sebastian Huber wrote: > On 23/11/2020 15:49, Martin Liška wrote: > >> On 11/23/20 3:35 PM, Sebastian Huber wrote: >>> If I have to wait for next stage 1, I can also try to refactor write_one_data() after your patch which removes the buffering. >> >> Yes, please build your patches on top of the file buffering removal. > Ok. >> >>> This would avoid some duplicated code, however, it would require some changes in existing code. Is it allowed to remove external (hidden?) symbols from libgcov? >> >> Which functions do you mean? > Refactoring write_one_data() to use hooks requires that > > gcov_write_counter() > > gcov_write_tag_length() > > gcov_write_summary() I bet these 3 can be actually moved to gcov-io.h, these functions are very small. So yes, it should be doable. Martin > > move from gcc/gcov-io.c to libgcc/libgcov-buffer.c. They can be made static. I am not sure if the external symbols can be removed > > /* In libgcov we need these functions to be extern, so prefix them with >     __gcov.  In libgcov they must also be hidden so that the instance in >     the executable is not also used in a DSO.  */ > #define gcov_write_tag_length __gcov_write_tag_length > #define gcov_write_counter __gcov_write_counter > #define gcov_write_summary __gcov_write_summary >