Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757306AbYHCMVs (ORCPT ); Sun, 3 Aug 2008 08:21:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756811AbYHCMVi (ORCPT ); Sun, 3 Aug 2008 08:21:38 -0400 Received: from mx1.redhat.com ([66.187.233.31]:42763 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955AbYHCMVh (ORCPT ); Sun, 3 Aug 2008 08:21:37 -0400 To: "Ming Lei" Cc: "Steven Rostedt" , linux-kernel@vger.kernel.org, "Ingo Molnar" , "Andrew Morton" , "Steven Rostedt" Subject: Re: [RFC] ftrace: support tracing functions in one module References: From: fche@redhat.com (Frank Ch. Eigler) Date: Sun, 03 Aug 2008 08:19:28 -0400 In-Reply-To: (Ming Lei's message of "Sun, 3 Aug 2008 15:50:19 +0800") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (gnu/linux) 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 Content-Length: 920 Lines: 26 "Ming Lei" writes: > [...] For example, one may only have interest in functions calling > in usbcore.ko, but he must trace all the functions calling in the > kernel, so the tracing result is too large to use it. [...] Until ftrace gains this ability, you could use systemtap: # cat callret.stp probe $1.call { printf ("%s <- %s\n", thread_indent(1), probefunc()) } probe $1.return { printf ("%s -> %s\n", thread_indent(-1), probefunc()) } # stap callret.stp 'module("usbcore").function("*")' [...] ^C # (One can also add conditions based on function parameters, processes, whatever; soon it'll be easy to trace all function parameters.) - FChE -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/