* Sigh, any ideas for a "dump_stack" name?
@ 2002-10-02 9:59 Russell King
2002-10-02 16:55 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2002-10-02 9:59 UTC (permalink / raw)
To: linux-kernel
Ok,
Still not got 2.5.40 to build...
ARM has, since the year dot, used "dump_stack()" to display any threads
stack, and has the following prototype:
static void dump_stack(struct task_struct *tsk, unsigned long sp)
However, somewhere in the 2.5.34 -> 2.5.40 development, "dump_stack" got
used as a way to call "show_stack" with a value of zero on x86 (which is
another externally visible function.)
Firstly, "dump_stack" is misnamed. It dumps stack and call trace
information.
Secondly, it creates a small problem - we're running out of names
to describe a function that displays _just_ stack contents without
any call trace information.
So, I propose to change the ARM version to the following, unless someone
else can come up with another name or a fix the poliferation of stack-
displaying functions that the generic kernel seems to require.
dump_random_numbers_from_thread_stack_yes_a_very_long_name_that_wont_clash_with_anything_else()
(Note: it may be a static function, but it is useful on to make it public
for occasional debugging.)
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Sigh, any ideas for a "dump_stack" name?
2002-10-02 9:59 Sigh, any ideas for a "dump_stack" name? Russell King
@ 2002-10-02 16:55 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2002-10-02 16:55 UTC (permalink / raw)
To: Russell King; +Cc: linux-kernel
Russell King wrote:
>
> Ok,
>
> Still not got 2.5.40 to build...
>
> ARM has, since the year dot, used "dump_stack()" to display any threads
> stack, and has the following prototype:
>
> static void dump_stack(struct task_struct *tsk, unsigned long sp)
>
> However, somewhere in the 2.5.34 -> 2.5.40 development, "dump_stack" got
> used as a way to call "show_stack" with a value of zero on x86 (which is
> another externally visible function.)
>
> Firstly, "dump_stack" is misnamed. It dumps stack and call trace
> information.
Sorry about that chief. Daniel very sensibly suggested that the
new one should be called `backtrace();'
> Secondly, it creates a small problem - we're running out of names
> to describe a function that displays _just_ stack contents without
> any call trace information.
>
> So, I propose to change the ARM version to the following, unless someone
> else can come up with another name or a fix the poliferation of stack-
> displaying functions that the generic kernel seems to require.
The generic kernel should only require two of these functions:
dump_stack() (aka backtrace()) and show_task_trace() - which
traces a different thread.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-02 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-02 9:59 Sigh, any ideas for a "dump_stack" name? Russell King
2002-10-02 16:55 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox