From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754203AbYJaCnx (ORCPT ); Thu, 30 Oct 2008 22:43:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752607AbYJaCno (ORCPT ); Thu, 30 Oct 2008 22:43:44 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:65035 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503AbYJaCno (ORCPT ); Thu, 30 Oct 2008 22:43:44 -0400 Date: Thu, 30 Oct 2008 22:43:42 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: =?ISO-8859-15?Q?Fr=E9d=E9ric_Weisbecker?= cc: Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH] Make ftrace able to trace function return In-Reply-To: Message-ID: References: <490A08E3.2040201@gmail.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 Oct 2008, Fr?d?ric Weisbecker wrote: > 2008/10/30 Steven Rostedt : > > What about storing the return addresses on the bottom of the stack? > > That is, start at task->stack + sizeof(thread_info), and stack up on that. > > Be careful, there might already be users of that area. This will also need > > to be arch dependent. > > But how could I assume there is enough space behind this address to store a long > stack of functions calls for a same thread? > And if an interrupt is raised, would a reference to "current task" be > really consistant? > > I don't know much about the bottom stack of the tasks, I'm not sure > about how much > space I can use inside... I should study this field. Who could be the > potential users of this area? > Because it is the real stack ;-) Before adding, test to see if the real stack pointer is getting close. If it is, then there's probably more issues. You can run the stack_tracer to see how much stack is available too. -- Steve