X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=kernel%2Ftrace%2Ftrace_stack.c;h=7eca011245b8759031423c98b6046b01d2193851;hb=HEAD;hp=b20428c5efe26ba54ef2a6e83bb9ad711a9f85b5;hpb=e4bf063cb8b5e3648aa9917692b185068ab8ba23;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index b20428c5efe2..7eca011245b8 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -44,12 +44,44 @@ static unsigned long max_stack_size; static arch_spinlock_t max_stack_lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; +static int stack_trace_disabled __read_mostly; static DEFINE_PER_CPU(int, trace_active); static DEFINE_MUTEX(stack_sysctl_mutex); int stack_tracer_enabled; static int last_stack_tracer_enabled; +/*LCH add for stack overflow debug */ +#if defined (CONFIG_MTK_AEE_FEATURE) && defined (CONFIG_MT_ENG_BUILD) +#include +#include +/*768=sizeof(struct thread_info),1600 for buffer*/ +static unsigned long stack_overflow_thd = THREAD_SIZE-768-1600; +module_param_named(stack_overflow_thd, stack_overflow_thd, ulong, S_IRUGO | S_IWUSR); + +static void dump_max_stack_trace(void) { + long i = 0; + int size; + printk(KERN_INFO " Depth Size Location" + " (%d entries)\n" + " ----- ---- --------\n", + max_stack_trace.nr_entries - 1); + + for (i=0; i