public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/103602] New: [11 regression] Analyzer takes inadequate amount of memory and time linking GNU grep with LTO
@ 2021-12-07 12:19 glebfm at altlinux dot org
  2021-12-07 12:31 ` [Bug analyzer/103602] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: glebfm at altlinux dot org @ 2021-12-07 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103602
           Summary: [11 regression] Analyzer takes inadequate amount of
                    memory and time linking GNU grep with LTO
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: glebfm at altlinux dot org
  Target Milestone: ---

$ gcc --version
x86_64-alt-linux-gcc (GCC) 11.2.1 20211202 (ALT Sisyphus 11.2.1-alt2)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ git clone https://git.savannah.gnu.org/git/grep.git && cd grep && ./bootstrap
&& CFLAGS='-g -O2 -flto=auto -Wno-error' ./configure && /usr/bin/time make
-j`nproc`
...
178.93user 6.85system 2:56.67elapsed 105%CPU (0avgtext+0avgdata
7943640maxresident)k
0inputs+0outputs (0major+2626777minor)pagefaults 0swaps

$ cd src && /usr/bin/time gcc -fanalyzer -fno-common -Wall -Warith-conversion
-Wbad-function-cast -Wcast-align=strict -Wdate-time -Wdisabled-optimization
-Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra
-Wformat-signedness -Winit-self -Winvalid-pch -Wlogical-op
-Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes
-Wnested-externs -Wnull-dereference -Wold-style-definition -Wopenmp-simd
-Woverlength-strings -Wpacked -Wpointer-arith -Wshadow -Wstrict-prototypes
-Wsuggest-attribute=cold -Wsuggest-attribute=const -Wsuggest-attribute=format
-Wsuggest-attribute=malloc -Wsuggest-attribute=noreturn
-Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types
-Wsync-nand -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunused-macros
-Wvariadic-macros -Wvector-operation-performance -Wvla -Wwrite-strings
-Warray-bounds=2 -Wattribute-alias=2 -Wformat-overflow=2 -Wformat=2
-Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2
-Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-analyzer-malloc-leak
-Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter
-Wno-cast-function-type -Wno-logical-op -Wno-format-nonliteral -Werror  -g -O2
-flto=auto -Wno-error   -o grep dfasearch.o grep.o kwsearch.o kwset.o
searchutils.o  ../lib/libgreputils.a  ../lib/libgreputils.a
...
175.29user 2.75system 2:56.95elapsed 100%CPU (0avgtext+0avgdata
7934612maxresident)k
0inputs+0outputs (0major+2050508minor)pagefaults 0swaps


(with -fno-analyzer flag)
$ git clone https://git.savannah.gnu.org/git/grep.git && cd grep && ./bootstrap
&& CFLAGS='-g -O2 -flto=auto -fno-analyzer -Wno-error' ./configure &&
/usr/bin/time make -j`nproc`
...
7.53user 5.04system 0:02.66elapsed 471%CPU (0avgtext+0avgdata
65336maxresident)k
0inputs+0outputs (0major+642146minor)pagefaults 0swaps

$ cd src && /usr/bin/time gcc -fanalyzer -fno-common -Wall -Warith-conversion
-Wbad-function-cast -Wcast-align=strict -Wdate-time -Wdisabled-optimization
-Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra
-Wformat-signedness -Winit-self -Winvalid-pch -Wlogical-op
-Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes
-Wnested-externs -Wnull-dereference -Wold-style-definition -Wopenmp-simd
-Woverlength-strings -Wpacked -Wpointer-arith -Wshadow -Wstrict-prototypes
-Wsuggest-attribute=cold -Wsuggest-attribute=const -Wsuggest-attribute=format
-Wsuggest-attribute=malloc -Wsuggest-attribute=noreturn
-Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types
-Wsync-nand -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunused-macros
-Wvariadic-macros -Wvector-operation-performance -Wvla -Wwrite-strings
-Warray-bounds=2 -Wattribute-alias=2 -Wformat-overflow=2 -Wformat=2
-Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2
-Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-analyzer-malloc-leak
-Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter
-Wno-cast-function-type -Wno-logical-op -Wno-format-nonliteral -Werror  -g -O2
-flto=auto -fno-analyzer -Wno-error   -o grep dfasearch.o grep.o kwsearch.o
kwset.o searchutils.o  ../lib/libgreputils.a  ../lib/libgreputils.a
...
3.31user 0.13system 0:02.33elapsed 147%CPU (0avgtext+0avgdata
65600maxresident)k
0inputs+0outputs (0major+69122minor)pagefaults 0swaps


I bisected this issue to commit r12-1389-g9d20ec97475 (backport
r11-8680-gf018044145e in releases/gcc-11 branch), after this change analyzer
consumes 3 times more memory (2.5G -> 7.5G) to analyze grep.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/103602] [11 regression] Analyzer takes inadequate amount of memory and time linking GNU grep with LTO
  2021-12-07 12:19 [Bug analyzer/103602] New: [11 regression] Analyzer takes inadequate amount of memory and time linking GNU grep with LTO glebfm at altlinux dot org
@ 2021-12-07 12:31 ` rguenth at gcc dot gnu.org
  2022-04-21  7:50 ` [Bug analyzer/103602] [11/12 regression] Analyzer takes excessive " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-12-07 12:31 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |memory-hog
   Target Milestone|---                         |11.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/103602] [11/12 regression] Analyzer takes excessive amount of memory and time linking GNU grep with LTO
  2021-12-07 12:19 [Bug analyzer/103602] New: [11 regression] Analyzer takes inadequate amount of memory and time linking GNU grep with LTO glebfm at altlinux dot org
  2021-12-07 12:31 ` [Bug analyzer/103602] " rguenth at gcc dot gnu.org
@ 2022-04-21  7:50 ` rguenth at gcc dot gnu.org
  2023-04-14  4:53 ` [Bug analyzer/103602] [11/12/13 " law at gcc dot gnu.org
  2023-05-29 10:06 ` [Bug analyzer/103602] [11/12/13/14 " jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.3                        |11.4

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/103602] [11/12/13 regression] Analyzer takes excessive amount of memory and time linking GNU grep with LTO
  2021-12-07 12:19 [Bug analyzer/103602] New: [11 regression] Analyzer takes inadequate amount of memory and time linking GNU grep with LTO glebfm at altlinux dot org
  2021-12-07 12:31 ` [Bug analyzer/103602] " rguenth at gcc dot gnu.org
  2022-04-21  7:50 ` [Bug analyzer/103602] [11/12 regression] Analyzer takes excessive " rguenth at gcc dot gnu.org
@ 2023-04-14  4:53 ` law at gcc dot gnu.org
  2023-05-29 10:06 ` [Bug analyzer/103602] [11/12/13/14 " jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: law at gcc dot gnu.org @ 2023-04-14  4:53 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org
           Priority|P3                          |P2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/103602] [11/12/13/14 regression] Analyzer takes excessive amount of memory and time linking GNU grep with LTO
  2021-12-07 12:19 [Bug analyzer/103602] New: [11 regression] Analyzer takes inadequate amount of memory and time linking GNU grep with LTO glebfm at altlinux dot org
                   ` (2 preceding siblings ...)
  2023-04-14  4:53 ` [Bug analyzer/103602] [11/12/13 " law at gcc dot gnu.org
@ 2023-05-29 10:06 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.4                        |11.5

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-29 10:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 12:19 [Bug analyzer/103602] New: [11 regression] Analyzer takes inadequate amount of memory and time linking GNU grep with LTO glebfm at altlinux dot org
2021-12-07 12:31 ` [Bug analyzer/103602] " rguenth at gcc dot gnu.org
2022-04-21  7:50 ` [Bug analyzer/103602] [11/12 regression] Analyzer takes excessive " rguenth at gcc dot gnu.org
2023-04-14  4:53 ` [Bug analyzer/103602] [11/12/13 " law at gcc dot gnu.org
2023-05-29 10:06 ` [Bug analyzer/103602] [11/12/13/14 " jakub at gcc dot gnu.org

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).