This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: show size of stack needed by functions
- From: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Sebastian <sebastianspublicaddress at googlemail dot com>, <gcc at gcc dot gnu dot org>, Richard Guenther <richard dot guenther at gmail dot com>, Ian Lance Taylor <iant at google dot com>
- Date: Tue, 10 May 2016 11:43:35 +0530
- Subject: Re: show size of stack needed by functions
- Authentication-results: sourceware.org; auth=none
- References: <1287000338 dot 3466 dot 9 dot camel at svetz> <AANLkTimW2rsS6_f50LA52AZBQ0hTsLg5kXUM7Djpkh90 at mail dot gmail dot com> <20160509234710 dot 4fa38d7c at wrona> <4381869 dot lFxcenRLCY at polaris>
Eric Botcazou writes:
>> Output of -fstack-usage is not accurate
>> =======================================
>>
>> This article mentions a "call cost":
>> https://mcuoneclipse.com/2015/08/21/gnu-static-stack-usage-analysis/
>>
>> I checked for myself, by looking at the change of the stackpointer with a
>> debugger, and, yes, there seems to be a constant mismatch (2 bytes with
>> avr-gcc-5.3) between change of stack pointer and output of -fstack-usage.
>> In some rare cases there are more differences, which I didn't understand
>> yet.
>
> That's a bug, very likely in the AVR back-end, which must be fixed by someone
> who knows the AVR architecture.
I'll take a look.
Regards
Senthil