From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD3723850430; Mon, 31 May 2021 12:28:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD3723850430 From: "xaizek at posteo dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/89961] When "--intermediate-format" is used "--preserve-paths"/"--hash-filenames" is ignored Date: Mon, 31 May 2021 12:28:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 8.3.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xaizek at posteo dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2021 12:28:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89961 xaizek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xaizek at posteo dot net --- Comment #11 from xaizek --- > Closing this as fixed. This isn't fixed. I don't think the problem was actually understood. Say you have: * src/myclass.o * tests/myclass.o If you run `gcov -p -x --json-format src/myclass.o` you get myclass.gcov.json.gz for that file, running `gcov -p -x --json-format tests/myclass.o` gives you myclass.gcov.json.gz for the test. Running `gcov= -p -x --json-format src/myclass.o tests/myclass.o` gives myclass.gcov.json.gz = *FOR THE TEST ONLY*, because gcov created output for src/myclass.o and then repl= aced it. >>From reading your comment I thought that maybe gcov combines information fr= om two files before writing the result to address this issue, but it doesn't. Results you get depends on the order in which files are specified. Either -p and -x need to be obeyed or reports need to be merged. If combin= ing is implemented, might as well combine all reports and write a single file specified on command line (--json-format=3Dmyfile.gz or --json-format=3D- (= no compression needed)).=