Re: Kernel thread stack usage
- From: Marcel Moolenaar <xcllnt@xxxxxxx>
- Date: Mon, 12 Nov 2007 11:15:57 -0800
On Nov 12, 2007, at 11:06 AM, Alexander Motin wrote:
For i386 platform we have registers pointing current stack head. To simplify my example I have used address of local variable for that. Probably for ia64 we should just use one more register or algorithm to take into account second stack growing upward.
Remember that taking the address of a local variable automatically
prevents that variable from being register-promoted. As such, it
increases stack pressure :-)
I think GCC has an intrinsic to get the current frame pointer. You
may want to use that instead. Granted, this would not help ia64,
but it's better than taking the address of a local variable. For
ia64 you can do as you suggest and add a second "algorithm". This
means you probably want to make it machine specific in the first
place (i.e. add a MD function that returns an approximation of the
number of bytes of stack space in use).
--
Marcel Moolenaar
xcllnt@xxxxxxx
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- References:
- Re: Kernel thread stack usage
- From: Alexander Motin
- Re: Kernel thread stack usage
- From: Kostik Belousov
- Re: Kernel thread stack usage
- From: Julian Elischer
- Re: Kernel thread stack usage
- From: Marcel Moolenaar
- Re: Kernel thread stack usage
- From: Alexander Motin
- Re: Kernel thread stack usage
- From: Marcel Moolenaar
- Re: Kernel thread stack usage
- From: Julian Elischer
- Re: Kernel thread stack usage
- From: Marcel Moolenaar
- Re: Kernel thread stack usage
- From: Alexander Motin
- Re: Kernel thread stack usage
- Prev by Date: Re: Kernel thread stack usage
- Next by Date: monolithic
- Previous by thread: Re: Kernel thread stack usage
- Next by thread: Re: Kernel thread stack usage
- Index(es):
Relevant Pages
|
|