From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755285AbYKCJmj (ORCPT ); Mon, 3 Nov 2008 04:42:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754925AbYKCJmb (ORCPT ); Mon, 3 Nov 2008 04:42:31 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:50456 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754652AbYKCJma (ORCPT ); Mon, 3 Nov 2008 04:42:30 -0500 Date: Mon, 3 Nov 2008 10:41:59 +0100 From: Ingo Molnar To: Steven Rostedt Cc: Abhishek Sagar , Andrew Morton , Linus Torvalds , Thomas Gleixner , LKML , Al Viro , ananth@in.ibm.com, jkenisto@us.ibm.com, mhiramat@redhat.com Subject: Re: [PATCH] ftrace: use kretprobe trampoline name to test in output Message-ID: <20081103094159.GA10400@elte.hu> References: <483C53EE.2060602@gmail.com> <863e9df20810310832uadf4daay7b5a98b677d86561@mail.gmail.com> <863e9df20810311233j13f996b8qa185cceddbd90849@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00,DNS_FROM_SECURITYSAGE autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.0 DNS_FROM_SECURITYSAGE RBL: Envelope sender in blackholes.securitysage.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Steven Rostedt wrote: > [ > Ingo, > > Can you get this ready for 2.6.28. Without this fix, tracing > breaks the ia64 build. > ] > > When a function is kprobed, the return address is set to the > kprobe_trampoline, or something similar. This caused the output > of the trace to look confusing when the parent seemed to be this > "kprobe_trampoline" function. > > To fix this, Abhishek Sagar added a test of the instruction pointer > of the parent to see if it matched the kprobe_trampoline. If it > did, the output would print a "[unknown/kretprobe'd]" instead. > > Unfortunately, not all archs do this the same way, and the trampoline > function may not be exported, which causes failures in builds. > > This patch will compare the name instead of the pointer to see > if it matches. This prevents us from depending on a function from > being exported, and should work on all archs. The worst that can > happen is that an arch might use a different name and then we > go back to the confusing output. At least the arch will still build. > > Signed-off-by: Steven Rostedt > Tested-by: Abhishek Sagar > Acked-by: Abhishek Sagar > --- > kernel/trace/trace.c | 39 +++++++++++++++++++++------------------ > 1 file changed, 21 insertions(+), 18 deletions(-) applied to tip/tracing/urgent, thanks! Ingo