public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] xtensa: report stack usage
@ 2016-08-26  7:03 Max Filippov
  2016-08-26 16:24 ` augustine.sterling
  0 siblings, 1 reply; 3+ messages in thread
From: Max Filippov @ 2016-08-26  7:03 UTC (permalink / raw)
  To: gcc-patches; +Cc: linux-xtensa, Sterling Augustine, Max Filippov

This enables options -fstack-usage and -Wstack-usage.

2016-08-21  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config/xtensa/xtensa.c (xtensa_expand_prologue): Update
	current_function_static_stack_size variable with the static
	stack frame size of the current function when
	flag_stack_usage_info is enabled.
---
 gcc/config/xtensa/xtensa.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 527fe88..f4504bf 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -2679,6 +2679,9 @@ xtensa_expand_prologue (void)
 
   total_size = compute_frame_size (get_frame_size ());
 
+  if (flag_stack_usage_info)
+    current_function_static_stack_size = total_size;
+
   if (TARGET_WINDOWED_ABI)
     {
       if (total_size < (1 << (12+3)))
-- 
2.1.4

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

* Re: [PATCH] xtensa: report stack usage
  2016-08-26  7:03 [PATCH] xtensa: report stack usage Max Filippov
@ 2016-08-26 16:24 ` augustine.sterling
  2016-08-26 17:34   ` Max Filippov
  0 siblings, 1 reply; 3+ messages in thread
From: augustine.sterling @ 2016-08-26 16:24 UTC (permalink / raw)
  To: Max Filippov; +Cc: gcc-patches, linux-xtensa

On Fri, Aug 26, 2016 at 12:02 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> This enables options -fstack-usage and -Wstack-usage.
>
> 2016-08-21  Max Filippov  <jcmvbkbc@gmail.com>
> gcc/
>         * config/xtensa/xtensa.c (xtensa_expand_prologue): Update
>         current_function_static_stack_size variable with the static
>         stack frame size of the current function when
>         flag_stack_usage_info is enabled.
> ---

This is OK for xtensa. Please check in.

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

* Re: [PATCH] xtensa: report stack usage
  2016-08-26 16:24 ` augustine.sterling
@ 2016-08-26 17:34   ` Max Filippov
  0 siblings, 0 replies; 3+ messages in thread
From: Max Filippov @ 2016-08-26 17:34 UTC (permalink / raw)
  To: augustine.sterling; +Cc: gcc-patches, linux-xtensa

On Fri, Aug 26, 2016 at 9:24 AM, augustine.sterling@gmail.com
<augustine.sterling@gmail.com> wrote:
> On Fri, Aug 26, 2016 at 12:02 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> This enables options -fstack-usage and -Wstack-usage.
>>
>> 2016-08-21  Max Filippov  <jcmvbkbc@gmail.com>
>> gcc/
>>         * config/xtensa/xtensa.c (xtensa_expand_prologue): Update
>>         current_function_static_stack_size variable with the static
>>         stack frame size of the current function when
>>         flag_stack_usage_info is enabled.
>> ---
>
> This is OK for xtensa. Please check in.

Applied to trunk. Thank you!

-- Max

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

end of thread, other threads:[~2016-08-26 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26  7:03 [PATCH] xtensa: report stack usage Max Filippov
2016-08-26 16:24 ` augustine.sterling
2016-08-26 17:34   ` Max Filippov

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