Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753388Ab0AaIdQ (ORCPT ); Sun, 31 Jan 2010 03:33:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752907Ab0AaIdM (ORCPT ); Sun, 31 Jan 2010 03:33:12 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:57921 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752471Ab0AaIdJ (ORCPT ); Sun, 31 Jan 2010 03:33:09 -0500 Date: Sun, 31 Jan 2010 09:32:34 +0100 From: Ingo Molnar To: Xiao Guangrong , Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Paul Mackerras , Frederic Weisbecker , LKML Subject: Re: [PATCH] perf tools: fix write_event() Message-ID: <20100131083234.GA12637@elte.hu> References: <4B570657.5090105@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B570657.5090105@cn.fujitsu.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-ELTE-SpamScore: 0.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=0.0 required=5.9 tests=none autolearn=no SpamAssassin version=3.2.5 _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1146 Lines: 29 * Xiao Guangrong wrote: > We parse the event while it's read from mmap buffer in > write_event(), but sometimes the event will straddles the > mmap boundary, we should handle this case > > And if we record events(such as perf kmem/sched) for long > times, Ctrl + C can't interrupt it just for this reason > > Signed-off-by: Xiao Guangrong > --- > tools/perf/builtin-record.c | 62 +++++++++++++++++++++++++++++++++--------- Note, i've reverted the original instead, via: a8e6f73: Revert "perf record: Intercept all events" As Peter said it, it is fundamentally wrong for perf record to touch the data stream in the common case. Arnaldo, cannot we use some other method for perf archive's needs? Worst-case we can do an optional parsing of the data stream although we should first try hard to find a generic method ... 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/