public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "qinzhao at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/95348] GCC records zero functions and modules in the profiling data file, ICC does NOT
Date: Mon, 15 Jun 2020 19:54:32 +0000	[thread overview]
Message-ID: <bug-95348-4-sk8KKJKw5e@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95348-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95348

--- Comment #36 from qinzhao at gcc dot gnu.org ---
I found a bug with this proposed patch:
when doing automatic merging, the following error message is emitted:
Merge mismatch for function 1.

the bug can be repeated with the small testing case I added in the comment #1
and the following script:

#!/bin/bash 
GCC=/GCC-install-dir/bin/gcc 
opt="-O0 " 
opt="$opt -fno-inline" 
opt_gen="-fprofile-generate" 
opt_gen="$opt_gen -fprofile-dir=gcc_prof_dir" 
tf1="five.c" 
tf2="ten.c" 
libf="lib.c" 

rm -rf gcc_prof_dir 

echo $GCC $opt $opt_gen -c $libf 
$GCC $opt $opt_gen -c $libf -o lib.o 

echo $GCC $opt $opt_gen $tf1 
$GCC $opt $opt_gen -c $tf1 -o five.o 

echo $GCC $opt $opt_gen $tf2 
$GCC $opt $opt_gen -c $tf2 -o ten.o 
echo $GCC $opt $opt_gen ten.o five.o lib.o -o ten 
$GCC $opt $opt_gen ten.o five.o lib.o -o ten 

./ten 12 
./ten 11
echo "Done" 

[qinzhao@localhost small_gcc]$ sh build_it_gcc
/home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate
-fprofile-dir=gcc_prof_dir -c lib.c
/home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate
-fprofile-dir=gcc_prof_dir five.c
/home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate
-fprofile-dir=gcc_prof_dir ten.c
/home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate
-fprofile-dir=gcc_prof_dir ten.o five.o lib.o -o ten
12 is greater than ten
11 is greater than ten
profiling:gcc_prof_dir/#home#qinzhao#Bugs#profile#small_gcc#lib.gcda:Merge
mismatch for function 1
profiling:gcc_prof_dir/#home#qinzhao#Bugs#profile#small_gcc#five.gcda:Merge
mismatch for function 0
Done

  parent reply	other threads:[~2020-06-15 19:54 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 20:37 [Bug gcov-profile/95348] New: " qinzhao at gcc dot gnu.org
2020-05-27  7:42 ` [Bug gcov-profile/95348] " rguenth at gcc dot gnu.org
2020-05-27  9:31 ` marxin at gcc dot gnu.org
2020-05-27 14:13 ` qinzhao at gcc dot gnu.org
2020-05-27 14:22 ` marxin at gcc dot gnu.org
2020-05-27 20:36 ` qinzhao at gcc dot gnu.org
2020-05-28 14:08 ` marxin at gcc dot gnu.org
2020-05-29  9:11 ` marxin at gcc dot gnu.org
2020-05-29 15:28 ` qinzhao at gcc dot gnu.org
2020-05-29 15:31 ` qinzhao at gcc dot gnu.org
2020-05-29 15:38 ` marxin at gcc dot gnu.org
2020-05-29 15:40 ` marxin at gcc dot gnu.org
2020-05-29 15:43 ` marxin at gcc dot gnu.org
2020-05-29 16:37 ` qing.zhao at oracle dot com
2020-05-29 16:40 ` qing.zhao at oracle dot com
2020-05-29 16:42 ` qinzhao at gcc dot gnu.org
2020-05-30  7:23 ` marxin at gcc dot gnu.org
2020-06-01 15:24 ` qinzhao at gcc dot gnu.org
2020-06-01 15:39 ` qinzhao at gcc dot gnu.org
2020-06-01 15:45 ` qing.zhao at oracle dot com
2020-06-01 15:45 ` qing.zhao at oracle dot com
2020-06-02  8:23 ` marxin at gcc dot gnu.org
2020-06-02 17:42 ` qinzhao at gcc dot gnu.org
2020-06-03  6:35 ` marxin at gcc dot gnu.org
2020-06-03 15:17 ` qing.zhao at oracle dot com
2020-06-10  8:16 ` marxin at gcc dot gnu.org
2020-06-10  8:21 ` marxin at gcc dot gnu.org
2020-06-10 14:49 ` qing.zhao at oracle dot com
2020-06-10 19:43 ` marxin at gcc dot gnu.org
2020-06-10 20:17 ` qing.zhao at oracle dot com
2020-06-10 20:26 ` qing.zhao at oracle dot com
2020-06-11  9:14 ` marxin at gcc dot gnu.org
2020-06-11 14:12 ` qing.zhao at oracle dot com
2020-06-11 18:08 ` marxin at gcc dot gnu.org
2020-06-15 19:54 ` qinzhao at gcc dot gnu.org [this message]
2020-06-15 19:56 ` qinzhao at gcc dot gnu.org
2020-06-16 12:53 ` marxin at gcc dot gnu.org
2020-06-16 15:58 ` qinzhao at gcc dot gnu.org
2020-06-17  6:35 ` marxin at gcc dot gnu.org
2020-06-24  9:06 ` marxin at gcc dot gnu.org
2020-07-02  8:16 ` cvs-commit at gcc dot gnu.org
2020-07-02  8:24 ` marxin at gcc dot gnu.org
2020-07-02  8:24 ` marxin at gcc dot gnu.org
2021-04-27 11:38 ` jakub at gcc dot gnu.org
2021-07-28  7:04 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-95348-4-sk8KKJKw5e@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).