public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/110074] -fprofile-arcs profiles arcs generated by -fsanitize=bounds Date: Thu, 01 Jun 2023 13:49:16 +0000 [thread overview] Message-ID: <bug-110074-4-WctSo6IhRN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110074-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110074 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2023-06-01 Ever confirmed|0 |1 Summary|code bloat with |-fprofile-arcs profiles |-fprofile-arcs + |arcs generated by |-fsanitize=bounds |-fsanitize=bounds --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Simplified example: ``` int array[104]; int f(int t) { return array[t]; } ``` Compile this at -fprofile-arcs -O2 -fsanitize=bounds and in .optimized we have: ``` PROF_edge_counter_5 = __gcov0._Z1fi[0]; PROF_edge_counter_6 = PROF_edge_counter_5 + 1; __gcov0._Z1fi[0] = PROF_edge_counter_6; # DEBUG BEGIN_STMT _11 = (sizetype) t_1(D); if (_11 >= 104) goto <bb 3>; [0.05%] else goto <bb 4>; [99.95%] <bb 3> [local count: 536864]: _12 = (unsigned long) t_1(D); __builtin___ubsan_handle_out_of_bounds (&*.Lubsan_data0, _12); <bb 4> [local count: 1073741824]: PROF_edge_counter_7 = __gcov0._Z1fi[1]; PROF_edge_counter_8 = PROF_edge_counter_7 + 1; __gcov0._Z1fi[1] = PROF_edge_counter_8; _4 = array[t_1(D)]; ``` But we do really need to profile that arc?
next prev parent reply other threads:[~2023-06-01 13:49 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-01 10:12 [Bug sanitizer/110074] New: code bloat with -fprofile-args + -fsanitize=bounds arnd at linaro dot org 2023-06-01 13:32 ` [Bug gcov-profile/110074] code bloat with -fprofile-arcs " pinskia at gcc dot gnu.org 2023-06-01 13:49 ` pinskia at gcc dot gnu.org [this message] 2023-06-02 7:51 ` [Bug gcov-profile/110074] -fprofile-arcs profiles arcs generated by -fsanitize=bounds 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-110074-4-WctSo6IhRN@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: linkBe 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).