From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 1A26A385AC22 for ; Thu, 7 Apr 2022 08:38:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1A26A385AC22 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E9DA41F859; Thu, 7 Apr 2022 08:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649320722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbDMG+RINbPHi9Sa2/JKTyYkC6dCjH/JReT5TR76viU=; b=QQIl+YcM5pRhslaxIl9nLumM3DeppXN2bsZTC+zQiQQxPWYpfE8Tg1FkB7L4HE0rcCvtJg W7QvHM9GEcwa8dBXdhu8AWpd3CD4fIThWECRyRjZ1iB0GHYGwuQkk5DubLqUSbhm0yEikq dCJq3cLuuo3v7kkXWjfMFnq8EvzsMYg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649320722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbDMG+RINbPHi9Sa2/JKTyYkC6dCjH/JReT5TR76viU=; b=IjOJxQD8O4EeHmLPjXXTakyJQ+7j4+mqS5JPbQbbPNuhy3Rx1D+moeakbwrKyX/9T1MalV U5L7fwvRdjPgMWAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C12F013485; Thu, 7 Apr 2022 08:38:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8mcdLRKjTmK9EgAAMHmgww (envelope-from ); Thu, 07 Apr 2022 08:38:42 +0000 Message-ID: <6232b0fa-df71-4bb6-ddc0-d813bbc3aecf@suse.cz> Date: Thu, 7 Apr 2022 10:38:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC/gcov 00/12] Add merge-stream subcommand to gcov-tool Content-Language: en-US To: Sebastian Huber , gcc-patches@gcc.gnu.org References: <20220331113515.35764-1-sebastian.huber@embedded-brains.de> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <20220331113515.35764-1-sebastian.huber@embedded-brains.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Thu, 07 Apr 2022 08:38:45 -0000 On 3/31/22 13:35, Sebastian Huber wrote: > This patch set is a proof of concept. > > The aim is to better support gcov in free-standing environments. For example, > you can run a test executable which dumps all gcov info objects in a serial > data stream using __gcov_info_to_gcda() and the new __gcov_filename_to_gcfn(). > It could be encoded as base64. It could be also compressed. On the host you > unpack the encoded data stream and feed it into gcov-tool using the new > "merge-stream" subcommand: Hello. The patch set is approved with the nits provided. Please install the patches once stage1 opens. > > gcov-tool --help > Usage: gcov-tool [OPTION]... SUB_COMMAND [OPTION]... > > Offline tool to handle gcda counts > > -h, --help Print this help, then exit > -v, --version Print version number, then exit > merge-stream [options] [stream-file] Merge coverage stream file (or stdin) > and coverage file contents > -v, --verbose Verbose mode > -w, --weight Set weights (float point values) > > Example: > > base64 -d log.txt | gcov-tool merge-stream > > The patch set does not change the format of gcda files. > > TODO: > > * Documentation I would install the patches with documentation change bits. > * Tests Tests can be added after that. Thank you for the functionality. Cheers, Martin > > Sebastian Huber (12): > gcov-tool: Allow merging of empty profile lists > gcov: Add mode to all gcov_open() > gcov: Add open mode parameter to gcov_do_dump() > gcov: Make gcov_seek() static > gcov: Add __gcov_filename_to_gcfn() > gcov-tool: Support file input from stdin > gcov: Use xstrdup() > gcov: Move prepend to list to read_gcda_file() > gcov: Move gcov_open() to caller of read_gcda_file() > gcov: Fix integer types in ftw_read_file() > gcov: Record EOF error during read > gcov-tool: Add merge-stream subcommand > > gcc/gcov-io.cc | 76 ++++++++++++++----- > gcc/gcov-io.h | 35 +++++---- > gcc/gcov-tool.cc | 107 +++++++++++++++++++++----- > libgcc/gcov.h | 17 ++++- > libgcc/libgcov-driver-system.c | 7 +- > libgcc/libgcov-driver.c | 42 ++++++++-- > libgcc/libgcov-util.c | 135 +++++++++++++++++++++++++-------- > libgcc/libgcov.h | 3 - > 8 files changed, 326 insertions(+), 96 deletions(-) >