Re: [riot-devel] Stacksize optimization

2017-01-10 Thread Baptiste Clenet
Thanks for your replies.
I leave this for the moment but stack optimisation will be a very nice
feature :-)

2017-01-09 14:39 GMT+01:00 Oleg Hahm :
> Hi!
>
> On Mon, Jan 09, 2017 at 02:01:04PM +0100, Baptiste Clenet wrote:
>> In order to optimize the statcksize of a thread, I would like to know
>> when the thread uses the maximum of its stack (maximum can be 3/4 of
>> the stack for instance)
>> How can I find this "time"?
>
> Sounds like a case for -finstrument-functions (man gcc).
>
> Cheers,
> Oleg
> --
> die_if_kernel("Kernel gets FloatingPenguinUnit disabled trap", regs);
> linux-2.2.16/arch/sparc/kernel/traps.c
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Stacksize optimization

2017-01-09 Thread Oleg Hahm
Hi!

On Mon, Jan 09, 2017 at 02:01:04PM +0100, Baptiste Clenet wrote:
> In order to optimize the statcksize of a thread, I would like to know
> when the thread uses the maximum of its stack (maximum can be 3/4 of
> the stack for instance)
> How can I find this "time"?

Sounds like a case for -finstrument-functions (man gcc).

Cheers,
Oleg
-- 
die_if_kernel("Kernel gets FloatingPenguinUnit disabled trap", regs);
linux-2.2.16/arch/sparc/kernel/traps.c


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Stacksize optimization

2017-01-09 Thread Alexander Aring
Hi,

On 01/09/2017 02:01 PM, Baptiste Clenet wrote:
> Hi,
> 
> In order to optimize the statcksize of a thread, I would like to know
> when the thread uses the maximum of its stack (maximum can be 3/4 of
> the stack for instance)
> How can I find this "time"?
> 

In my opinion:

Welcome to the embedded world problems...

I thought about to have some coverage compiler and check always the
maximum stacksize... That's my idea to get such value... but then you
need to reach 100% coverage of the thread -> good luck with that. :-)

It would maybe nice to have such feature in RIOT to coverage his "little
tiny thread application" where you could reach your 100% coverage...

Maybe also possible on other stacks for testing in native application...
and also check ISR stack size. It think it's a good research topic for
somebody who looking for academic work. :-)

- Alex
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] Stacksize optimization

2017-01-09 Thread Baptiste Clenet
Hi,

In order to optimize the statcksize of a thread, I would like to know
when the thread uses the maximum of its stack (maximum can be 3/4 of
the stack for instance)
How can I find this "time"?

Cheers,

-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel