From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932491AbdA0MSr (ORCPT ); Fri, 27 Jan 2017 07:18:47 -0500 Received: from mga09.intel.com ([134.134.136.24]:22160 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932566AbdA0MSk (ORCPT ); Fri, 27 Jan 2017 07:18:40 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,295,1477983600"; d="scan'208";a="1099668764" From: Alexander Shishkin To: Mathieu Poirier Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Will Deacon , Mark Rutland Subject: Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure In-Reply-To: <20170126182645.GA1991@linaro.org> References: <20170126094057.13805-1-alexander.shishkin@linux.intel.com> <20170126094057.13805-2-alexander.shishkin@linux.intel.com> <20170126182645.GA1991@linaro.org> User-Agent: Notmuch/0.23.3 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Fri, 27 Jan 2017 14:12:14 +0200 Message-ID: <87h94kbt29.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mathieu Poirier writes: > Hi Alex, Hi Mathieu, > This changes the behavior we used to have. Now a range filter with a size of 0 > will be treated as start filter rather than an error. See below on a possible > way of fixing this. Not really. Currently we have 2 drivers using this and both reject the type=range&&size==0 filters with either -EOPNOTSUPP or -EINVAL. With this change, PT will still reject it as it doesn't support single address triggers, but Coresight will treat it as if it was a single address filter. Which makes sense, because that's what a range of size zero is. Note, that a range that covers one instruction has to be at least size==1 (and I'm guessing size==4 for Coresight, but I may be wrong). So yes, this does change the existing behavior, but in doing so it removes the ambiguity of zero sized ranges. > if (filter->action == PERF_ADDR_FILTER_ACTION_RANGE) But "range" is not an action, it's a type of a filter. It determines the condition that triggers an action. An action, however, is what we do when the condition comes true. Regards, -- Alex