Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673AbdFNRnw (ORCPT ); Wed, 14 Jun 2017 13:43:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:56942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752325AbdFNRnu (ORCPT ); Wed, 14 Jun 2017 13:43:50 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 529AD214E1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Wed, 14 Jun 2017 13:43:47 -0400 From: Steven Rostedt To: Will Hawkins Cc: Namhyung Kim , LKML Subject: Re: Ftrace vs perf user page fault statistics differences Message-ID: <20170614134347.60063e88@gandalf.local.home> In-Reply-To: References: <20170612212005.1bf8c44d@gandalf.local.home> <20170613090649.2a5edb6a@gandalf.local.home> <20170613160434.605fdef2@gandalf.local.home> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 929 Lines: 25 On Wed, 14 Jun 2017 13:30:59 -0400 Will Hawkins wrote: > > When perf profiles a program started by the same command line, it > > disables the events by default and enables them during exec. Please > > see linux/tools/perf/util/evsel.c:perf_evsel__config(). > > > > Thanks, > > Namhyung > > Namhyung, > > I think that this answers a very important question! Thanks for chiming in! Yes. One difference between the design of ftrace and the design of perf, is that, I avoided inserting call backs throughout the kernel. Perf has a few function calls in the exec code. Just grep "perf" in fs/exec.c. There's a few scattered around there. Causing a slight overhead for when perf is not in use. Hmm, I really should remove all perf injections and make them either a tracepoint or generic jumplabels that anything may attach to. Then ftrace could have the same features. And lttng for that matter. -- Steve