login
Header Space

 
 

Re: [PATCH 1/2] Adds full stack to critical-section tracing

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Gregory Haskins <ghaskins@...>
Cc: <mingo@...>, <linux-rt-users@...>, <linux-kernel@...>
Date: Wednesday, August 29, 2007 - 8:48 pm

On Fri, 2007-08-10 at 08:14 -0600, Gregory Haskins wrote:

These changes need some fixing .. The "struct stack_trace"
infrastructure is based on CONFIG_STACKTRACE , so at least you would
want to ifdef your changes on that config options ..

I modified you patch to include the ifdefs,

ftp://source.mvista.com/pub/dwalker/misc/debug-preempt-5-levels-of-stack-frames.patch

The other problem I noticed is that the save_stack_trace(trace); seems
kind of heavy weight to be calling from inside add_preempt_count. If
your only going to a depth of 5 you could potentially use there macros,

#ifdef CONFIG_FRAME_POINTER
# ifndef CONFIG_ARM
#  define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
#  define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1))
#  define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2))
#  define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3))
#  define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4))
#  define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5))
# else

Daniel

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] RT: Enhance PREEMPT_TRACE with deeper stacks, Gregory Haskins, (Fri Aug 10, 10:14 am)
[PATCH 1/2] Adds full stack to critical-section tracing, Gregory Haskins, (Fri Aug 10, 10:14 am)
Re: [PATCH 1/2] Adds full stack to critical-section tracing, Daniel Walker, (Wed Aug 29, 8:48 pm)
speck-geostationary