Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932866Ab0KPWAT (ORCPT ); Tue, 16 Nov 2010 17:00:19 -0500 Received: from mx2.mail.elte.hu ([157.181.151.9]:44163 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932710Ab0KPWAS (ORCPT ); Tue, 16 Nov 2010 17:00:18 -0500 Date: Tue, 16 Nov 2010 22:59:40 +0100 From: Ingo Molnar To: Darren Hart Cc: Thomas Gleixner , LKML , Linus Torvalds , Andrew Morton , Peter Zijlstra , Steven Rostedt , Arjan van de Ven , Arnaldo Carvalho de Melo , Frederic Weisbecker , Masami Hiramatsu , Tom Zanussi , Mathieu Desnoyers , Li Zefan , Jason Baron , "David S. Miller" , Christoph Hellwig , Pekka Enberg , Lai Jiangshan , Eric Dumazet Subject: Re: [ANNOUNCE] New utility: 'trace' Message-ID: <20101116215940.GA13912@elte.hu> References: <4CE2F747.4060406@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CE2F747.4060406@linux.intel.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5 -2.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2152 Lines: 55 * Darren Hart wrote: > On 11/16/2010 01:04 PM, Thomas Gleixner wrote: > >We are pleased to announce a new tracing tool called 'trace'. > > > > Hi Thomas, Ingo - Congrats and Thanks! You are welcome :) > > At this point we'd like to ask for feedback from other users of tracing tools, > > which workflow components would you like to see in addition to what the 'trace' > > tool is offering? > > > > Comments, bug reports, suggestions welcome, > > The first thing that comes to mind is trace_marker: > > echo "Test point A" > /sys/kernel/debug/tracing/trace_marker > > I've found this sort of markup to be useful using ftrace (with C equivalents > embedded in the test case). Is this supported? Yes, LatencyTop uses something similar IIRC, via a prctl() hack: it uses prctl(PR_SET_NAME) to inject up to 16 characters into the comm - and then every perf event gets that comm. You can utilize that straight away if you need a marker solution right now. A cleaner, more generic approach would be a more free-form ASCII event facility for this: a generic 'user-space triggered event' with injection capabilities. To inject it, we could put that into a prctl() as well, for easy, single-syscall access from C. We already have two perf prctls: PR_TASK_PERF_EVENTS_DISABLE, PR_TASK_PERF_EVENTS_ENABLE - and this would be a third one: PR_TASK_PERF_USER_EVENT. This would, like the existing perf_event_task_enable()/disable() methods, loop through current events and inject a string into matching user events. Ideally i'd like to see basically user-space access to trace_printk(), and proper integration into /debug/tracing/events/ enumeration and availability - not a ftrace-specific and admin-only hack like /sys/kernel/debug/tracing/trace_marker is today. Would you be interested in helping out with (and testing) such a more generic approach? Thanks, Ingo -- 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/