From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751855AbdBAMqx (ORCPT ); Wed, 1 Feb 2017 07:46:53 -0500 Received: from mga04.intel.com ([192.55.52.120]:51212 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751284AbdBAMqw (ORCPT ); Wed, 1 Feb 2017 07:46:52 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,320,1477983600"; d="scan'208";a="1120638613" From: Alexander Shishkin To: Mathieu Poirier Cc: Peter Zijlstra , Ingo Molnar , "linux-kernel\@vger.kernel.org" , Vince Weaver , Stephane Eranian , Arnaldo Carvalho de Melo , Will Deacon , Mark Rutland Subject: Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure In-Reply-To: References: <20170126094057.13805-1-alexander.shishkin@linux.intel.com> <20170126094057.13805-2-alexander.shishkin@linux.intel.com> <20170126182645.GA1991@linaro.org> <87h94kbt29.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Notmuch/0.23.3 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 01 Feb 2017 14:46:48 +0200 Message-ID: <87wpda9iyv.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: > On 27 January 2017 at 05:12, Alexander Shishkin > wrote: >> 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. > > Then filter->action could be renamed 'type'. No. Again, *action* is what we *do*. *Type* is *how* we detect that something needs to be done. > In the end filters on PT > are range filters, the same way they are on CS. But changing the No. The CS driver supports both single address and address range filters at least acconding to my reading of the code. Now that I look more at it, I see that it also gets the range filters wrong: it disregards filter->filter for range filters, assuming that since it's a range, it means that the user wants to trace what's in the range (filter->filter == 1), but it may also mean "stop if you end up in this range" (filter->filter == 0). The fact that the CS driver gets it wrong just proves the point that "filter->filter" is confusing and misleading and needs to be replaced. In the case of CS, I think that a -EOPNOTSUPP is also appropriate for the type==range&&action==stop combination. Regards, -- Alex