avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Re: C vs. assembly performance


From: David Brown
Subject: [avr-gcc-list] Re: C vs. assembly performance
Date: Mon, 02 Mar 2009 19:13:07 +0100
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Georg-Johann Lay wrote:
David Brown schrieb:
Georg-Johann Lay wrote:
regardless if optimization is on or not. If fact I would guess that it is a policy that the code *must* be the same regardless what debug level (if any) or debug format is used, and code beeing dependent on debug level/format is worth a bug report.

uaaa, typo devil above. I meant "debugging info enabled" instead of "optimization" in the first line. With "optimization" my statement is obvious nonsense. blush.

That is certainly not true. Enabling debug information will disable or limit some optimisations. gcc in general is pretty good at optimising

Can you make that explicit with an example? With "code" I mean code that will end up in the target, i.e. no code that lives in some .stab* or .debug* section.

But I must admit that I don't debug my code and consequently have debug info turned off, so I am not familiar with debugging info and maybe fundamentally wrong on gcc policies concerning that topic.

Turned on -g3 for a try in my actual AVR project (12k .text) does not show other sizes for .text, and static ram usage is exactly the same as without -g3. Size of .i, .s, .o and .elf stuff will increase because of debug info, but .text and .data et al. should not change, neither in size, nor in content.


A few quick tests here confirm what you've said. I looks like my understanding of debug data generation is a bit outdated.

mvh.,

David






reply via email to

[Prev in Thread] Current Thread [Next in Thread]