From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751247AbeAWG6V (ORCPT ); Tue, 23 Jan 2018 01:58:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:37504 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026AbeAWG6K (ORCPT ); Tue, 23 Jan 2018 01:58:10 -0500 Subject: Re: [RFC PATCH] ftrace: Fix depth filtering when func_stack is enabled. To: Steven Rostedt Cc: mingo@redhat.com, linux-kernel@vger.kernel.org References: <1516629004-16658-1-git-send-email-nborisov@suse.com> <20180122181649.7486d421@gandalf.local.home> From: Nikolay Borisov Message-ID: <81392518-44e0-5ee4-6d68-41d4fd75669c@suse.com> Date: Tue, 23 Jan 2018 08:58:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180122181649.7486d421@gandalf.local.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23.01.2018 01:16, Steven Rostedt wrote: > On Mon, 22 Jan 2018 15:50:04 +0200 > Nikolay Borisov wrote: > > >> diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c >> index 27f7ad12c4b1..b721f1f3f3c0 100644 >> --- a/kernel/trace/trace_functions.c >> +++ b/kernel/trace/trace_functions.c >> @@ -181,14 +181,11 @@ function_stack_trace_call(unsigned long ip, unsigned long parent_ip, >> pc = preempt_count(); >> trace_function(tr, ip, parent_ip, flags, pc); >> /* >> - * skip over 5 funcs: >> - * __ftrace_trace_stack, >> - * __trace_stack, >> + * skip over 2 funcs: >> * function_stack_trace_call >> - * ftrace_list_func > > Thanks, but this breaks when you are not using ORC unwinder. Actually I've tested this with the frame_pointer unwinder, I haven't got ORC to work at all. So this patch fixes the issue where the FP unwinder prints out shorter stacktraces than required. > >> * ftrace_call >> */ >> - __trace_stack(tr, flags, 5, pc); >> + __trace_stack(tr, flags, 2, pc); >> } >> >> atomic_dec(&data->disabled); > > > There's a bit of ORC unwinder breakage that I'm still dealing with. I > also have patches to handle the differences between ORC and FP, in the > __trace_stack() usages. I'm hoping to have this all fixed by tomorrow, > as I'll be traveling after that. Great, please CC me on the patches so that I can test them. > > Thanks! > > -- Steve > >