Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752184AbdIEQfQ (ORCPT ); Tue, 5 Sep 2017 12:35:16 -0400 Received: from mail-qk0-f170.google.com ([209.85.220.170]:37679 "EHLO mail-qk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774AbdIEQfN (ORCPT ); Tue, 5 Sep 2017 12:35:13 -0400 X-Google-Smtp-Source: ADKCNb5z1n4hVOYyvMt9NsrN5VjS1F2S95McpdAToEPFeIxNAi8R6SK5tNDQctvkAIKeYk3bdtSUSOEQPSZyGvy/VQY= MIME-Version: 1.0 In-Reply-To: <20170905065230.lq5fsxgiv6ynehxp@hirez.programming.kicks-ass.net> References: <20170903085051.6348-1-joelaf@google.com> <20170903085051.6348-3-joelaf@google.com> <20170904075614.bjkkrgyv2dpz7x5v@hirez.programming.kicks-ass.net> <20170904194426.GD17526@worktop.programming.kicks-ass.net> <20170904193436.4a37fae4@gandalf.local.home> <20170905065230.lq5fsxgiv6ynehxp@hirez.programming.kicks-ass.net> From: Joel Fernandes Date: Tue, 5 Sep 2017 09:35:11 -0700 Message-ID: Subject: Re: [PATCH 2/2] tracing: Add support for critical section events To: Peter Zijlstra Cc: Steven Rostedt , LKML , kernel-team@android.com, Ingo Molnar , Byungchul Park , Tejun Heo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1191 Lines: 35 On Mon, Sep 4, 2017 at 11:52 PM, Peter Zijlstra wrote: > On Mon, Sep 04, 2017 at 08:26:13PM -0700, Joel Fernandes wrote: > >> Apologies, I meant (without the "off"): >> >> subsystem: atomic_section >> events: >> irqs_disable >> irqs_enable >> preempt_disable >> preempt_enable >> >> and additionally (similar to what my patch does): >> preemptirq_enable >> preemptirq_disable >> > > What do you need the last for? The last 2 events above behave as 'disable' means either preempt or irq got disabled, and 'enable' means *both* preempt and irq are enabled (after either one of them was disabled). This has the advantage of not generating events when we're already in an atomic section when using these events, for example acquiring spin locks in an interrupt handler might increase the preempt count and generate 'preempt_disable' events, but not preemptirq_disable events. This has the effect of reducing the spam in the traces when all we care about is being in an atomic section or not. These events happen a lot so to conserve space in the trace buffer, the user may want to just enable the latter 2 events. Does that sound Ok to you? thanks, - Joel