From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16950 invoked by alias); 20 Feb 2015 22:54:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16897 invoked by uid 48); 20 Feb 2015 22:54:01 -0000 From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/58315] [4.8/4.9/5 Regression] Excessive memory use with -g Date: Fri, 20 Feb 2015 23:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg02345.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58315 Aldy Hernandez changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aoliva at gcc dot gnu.org, | |rth at gcc dot gnu.org --- Comment #14 from Aldy Hernandez --- I'm not very familiar with the var tracking code, but one thing I see odd here is a ton of similar var_location notes attached to each instruction (well, not each instruction, but a lot of the instructions are affected while generating code for test01, test02, test03, test04, etc). I see an instruction like this: (insn:TI 52195 52199 83288 6386 (set (mem/c:DI (plus:DI (reg/f:DI 6 bp) (const_int -25880 [0xffffffffffff9ae8])) [125 %sfp+-25864 S8 A64]) (reg:DI 0 ax)) 89 {*movdi_internal} (expr_list:REG_DEAD (reg:DI 0 ax) (nil))) (jump_insn 83288 52195 83289 6386 (set (pc) (label_ref 34659)) 653 {jump} (nil) -> 34659) Followed by over 1000 var_location notes: (note 11489581 83289 11489582 (var_location this(0x7fffe7223360) (plus:DI (reg/f:DI 6 bp) (const_int -21808 [0xffffffffffffaad0]))) NOTE_INSN_VAR_LOCATION) (note 11489582 11489581 11489583 (var_location this(0x7fffe8d7dc60) (plus:DI (reg/f:DI 6 bp) (const_int -25200 [0xffffffffffff9d90]))) NOTE_INSN_VAR_LOCATION) (note 11489583 11489582 11489584 (var_location this(0x7fffe72236c0) (plus:DI (reg/f:DI 6 bp) (const_int -21856 [0xffffffffffffaaa0]))) NOTE_INSN_VAR_LOCATION) (note 11489584 11489583 11489585 (var_location this(0x7fffe7223bd0) (plus:DI (reg/f:DI 6 bp) (const_int -6576 [0xffffffffffffe650]))) NOTE_INSN_VAR_LOCATION) (note 11489585 11489584 11489586 (var_location this(0x7fffe7223cf0) (plus:DI (reg/f:DI 6 bp) (const_int -21872 [0xffffffffffffaa90]))) NOTE_INSN_VAR_LOCATION) (note 11489586 11489585 11489587 (var_location this(0x7fffe941e090) (plus:DI (reg/f:DI 6 bp) (const_int -25136 [0xffffffffffff9dd0]))) NOTE_INSN_VAR_LOCATION) etc etc etc . Notice all of them are the "this" pointer, but I have hacked the RTL dumping code to also print the address of the DECL to show that every "this" is actually a different instance. This looks suspect. Anyone have a clue, otherwise I'm going to continue banging my head against a wall here?