From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbbJWMwW (ORCPT ); Fri, 23 Oct 2015 08:52:22 -0400 Received: from casper.infradead.org ([85.118.1.10]:55613 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbbJWMwV (ORCPT ); Fri, 23 Oct 2015 08:52:21 -0400 Date: Fri, 23 Oct 2015 14:52:11 +0200 From: Peter Zijlstra To: "Wangnan (F)" Cc: Alexei Starovoitov , pi3orama , xiakaixu , davem@davemloft.net, acme@kernel.org, mingo@redhat.com, masami.hiramatsu.pt@hitachi.com, jolsa@kernel.org, daniel@iogearbox.net, linux-kernel@vger.kernel.org, hekuang@huawei.com, netdev@vger.kernel.org Subject: Re: [PATCH V5 1/1] bpf: control events stored in PERF_EVENT_ARRAY maps trace data output when perf sampling Message-ID: <20151023125211.GB17308@twins.programming.kicks-ass.net> References: <20151021121713.GC3604@twins.programming.kicks-ass.net> <56279634.5000606@huawei.com> <20151021134951.GH3604@twins.programming.kicks-ass.net> <1D2C9396-01CB-4981-B493-EA311F0457E7@163.com> <20151021140921.GI3604@twins.programming.kicks-ass.net> <586A5B33-C9C9-433D-B6E9-019264BF7DDB@163.com> <20151021165758.GK3604@twins.programming.kicks-ass.net> <56280175.8060404@plumgrid.com> <20151022090632.GK2508@worktop.programming.kicks-ass.net> <5628BA46.8060307@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5628BA46.8060307@huawei.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2015 at 06:28:22PM +0800, Wangnan (F) wrote: > information to analysis when glitch happen. Another way we are trying to > implement > now is to dynamically turn events on and off, or at least enable/disable > sampling dynamically because the overhead of copying those samples > is a big part of perf's total overhead. After that we can trace as many > event as possible, but only fetch data from them when we detect a glitch. So why don't you 'fix' the flight recorder mode and just leave the data in memory and not bother copying it out until a glitch happens? Something like this: lkml.kernel.org/r/20130708121557.GA17211@twins.programming.kicks-ass.net it appears we never quite finished that.