From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752362AbbJFIfH (ORCPT ); Tue, 6 Oct 2015 04:35:07 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:37752 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751052AbbJFIfD (ORCPT ); Tue, 6 Oct 2015 04:35:03 -0400 Date: Tue, 6 Oct 2015 17:31:05 +0900 From: Namhyung Kim To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , Frederic Weisbecker , Stephane Eranian , David Ahern , Andi Kleen , Adrian Hunter Subject: Re: [RFC/PATCH 01/38] perf tools: Use a software dummy event to track task/mmap events Message-ID: <20151006083105.GA24254@danjae.theccd.local> References: <1443763159-29098-1-git-send-email-namhyung@kernel.org> <1443763159-29098-2-git-send-email-namhyung@kernel.org> <20151005125137.GA26800@krava.landal.opennet> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151005125137.GA26800@krava.landal.opennet> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On Mon, Oct 05, 2015 at 02:51:37PM +0200, Jiri Olsa wrote: > On Fri, Oct 02, 2015 at 02:18:42PM +0900, Namhyung Kim wrote: > > SNIP > > > > > +/** > > + * perf_evsel__is_dummy_tracking - Return whether given evsel is a dummy > > + * event for tracking meta events only > > + * > > + * @evsel - evsel selector to be tested > > + * > > + * Return %true if event is a dummy tracking event > > + */ > > +static inline bool perf_evsel__is_dummy_tracking(struct perf_evsel *evsel) > > +{ > > + return evsel->attr.type == PERF_TYPE_SOFTWARE && > > + evsel->attr.config == PERF_COUNT_SW_DUMMY && > > + evsel->attr.task == 1 && evsel->attr.mmap == 1; > > should this use now check for evsel->tracking ? Originally I think it need to differentiate the dummy tracking events and possible other dummy events. But it seems no need to do it. So yes, maybe I can just check the tracking bit. Anyway, I need to check the Intel PT code as Adrian said it might have multiple tracking events. Thanks, Namhyung