From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932647AbeAXI76 (ORCPT ); Wed, 24 Jan 2018 03:59:58 -0500 Received: from mx2.suse.de ([195.135.220.15]:38607 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932133AbeAXI75 (ORCPT ); Wed, 24 Jan 2018 03:59:57 -0500 Subject: Re: [PATCH 0/3] ftrace, orc, x86, tracing: Fix stack traces again To: Steven Rostedt , linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Thomas Gleixner , "H. Peter Anvin" , Josh Poimboeuf References: <20180123183216.191160315@goodmis.org> From: Nikolay Borisov Message-ID: Date: Wed, 24 Jan 2018 10:59:53 +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: <20180123183216.191160315@goodmis.org> 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 20:32, Steven Rostedt wrote: > With the new ORC unwinder, ftrace stack tracing became disfunctional. > > One was that ORC didn't know how to handle the ftrace callbacks in > general (which Josh fixed). The other was that ORC would just bail > if it hit a dynamically allocated trampoline. I added a check to > the ORC unwinder to see if the trampoline belonged to ftrace, and > if it did, use the orc entry of the static trampoline that was used > to create the dynamic one (it would be identical). > > Finally, I noticed that the skip values of the stack tracing is out > of whack. I went through and fixed them. > > Anyone have any issues with these patches? I'm starting my tests on > them now and if all goes well, I plan on pushing them to Linus > hopefully tonight. > > Thanks! FWIW with this series ftrace with ORC now produces correct stacktraces both for events and function tracing. Furthermore, with frame pointer unwinder I don't see chopped off stack entries. > > -- Steve > > > Josh Poimboeuf (1): > x86/ftrace: Fix ORC unwinding from ftrace handlers > > Steven Rostedt (VMware) (2): > ftrace, orc, x86: Handle ftrace dynamically allocated trampolines > tracing: Update stack trace skipping for ORC unwinder > > ---- > arch/x86/kernel/Makefile | 5 +++- > arch/x86/kernel/ftrace_64.S | 24 +++++++++++------- > arch/x86/kernel/unwind_orc.c | 48 +++++++++++++++++++++++++++++++++++- > include/linux/ftrace.h | 2 ++ > kernel/trace/ftrace.c | 26 +++++++++++--------- > kernel/trace/trace.c | 34 ++++++++++++++----------- > kernel/trace/trace_events_trigger.c | 13 ++++++++-- > kernel/trace/trace_functions.c | 49 +++++++++++++++++++++++++++---------- > 8 files changed, 150 insertions(+), 51 deletions(-) >