Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757209Ab0LMMjM (ORCPT ); Mon, 13 Dec 2010 07:39:12 -0500 Received: from canuck.infradead.org ([134.117.69.58]:51093 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755330Ab0LMMjK (ORCPT ); Mon, 13 Dec 2010 07:39:10 -0500 Date: Mon, 13 Dec 2010 10:38:10 -0200 From: Arnaldo Carvalho de Melo To: Peter Zijlstra Cc: Hitoshi Mitake , mingo@redhat.com, hpa@zytor.com, paulus@samba.org, linux-kernel@vger.kernel.org, andi@firstfloor.org, yakui.zhao@intel.com, fweisbec@gmail.com, ling.ma@intel.com, rostedt@goodmis.org, miaox@cn.fujitsu.com, tglx@linutronix.de, mingo@elte.hu Subject: Re: perf monitoring triggers Was: Re: [tip:perf/core] perf bench: Print both of prefaulted and no prefaulted results by default Message-ID: <20101213123810.GA5407@ghostprotocols.net> References: <1290668693-27068-1-git-send-email-mitake@dcl.info.waseda.ac.jp> <4D03B1AD.7000606@dcl.info.waseda.ac.jp> <20101212134657.GA19166@ghostprotocols.net> <1292238873.6803.183.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1292238873.6803.183.camel@twins> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by canuck.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1275 Lines: 32 Em Mon, Dec 13, 2010 at 12:14:33PM +0100, Peter Zijlstra escreveu: > On Sun, 2010-12-12 at 11:46 -0200, Arnaldo Carvalho de Melo wrote: > > Looks interesting, and also interesting would be to be able to place > > probes that would wake up it too, for unmodified binaries to have > > something similar. > > Other kinds of triggers may be to hook on syscalls and when some > > expression matches, like connecting to host 1.2.3.4, start monitoring, > > stop when the socket is closed, i.e. monitor a connection lifetime, etc. > Sounds to me like you want something like a library with self-monitoring > stuff. Yeah, that could be a way, an LD_PRELOAD thingy that would intercept library calls, setup counters, start a monitoring thread, etc. Along the lines of: http://git.kernel.org/?p=linux/kernel/git/acme/libautocork.git;a=blob;f=libautocork.c This one just intercepts calls, but the __init function could do the rest. To make it easier we could move the counter setup we have in record/top to a library, etc. - Arnaldo -- 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/