Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3541037ybz; Mon, 20 Apr 2020 04:59:51 -0700 (PDT) X-Google-Smtp-Source: APiQypKwhVVboF/sqHZOI+xK36EkPBVPalVqgT2RW1YzK8UB6JQDnegpdoVFr/zikqH4ReT1ihuh X-Received: by 2002:a50:cc87:: with SMTP id q7mr13344506edi.96.1587383990679; Mon, 20 Apr 2020 04:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587383990; cv=none; d=google.com; s=arc-20160816; b=CjbAzJoOnLOEHEZr+rLh4ELwApPvanpdsP49jNspZOKbEalr+lv2/LXE1l8elIhxOM 6o5QD/moNZgxNQBS5FwZr9/0O4cBNoVujkxlOmRGzJOGXqQtSauGROKNbh02T37R1Oza dqisC9jHSOFx7jeZwoPC7Fjp8SUDgLib7HsgBEhyLKgETdSdc8gs2Z8uPVB1+DfHM3tE ZJG8223Fh9arhWtiYZ+4dIJ0xTLQ1W3HB1cCwD3x0L0jQml/ND02BxWWnZXxwCXS8A2l LOsRT40/KuvXVbIv94nclmy73SFYOG8aaUxWp6FDCewtQO0A0j/RA3Y4BzkttDp6y9Rh a7Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Habz8ejxn66gVlXWCyTscZWhzIfCrKnr35p/fVLLtV8=; b=0FgFxeaDBHD5rf70XjgcuYISlaYNVgTNIEGJVQY8TLV6BMgAtVdP6BAzLpNa53Iuah eaDIN7qC4J7wal49+85FcEc8EU7wSNyGn34Y5PuD98Lywucoe49LN9lgkTQZW55N6RWo 4N2LuDlgfzV2w6iwLF0z8LyR2V/FpFb//ywWp2SIS4CRjtUtTXp3HK0Ji2NCYnwguzpm YV18p7y2rxaiBVF6fsgXwLbnBz6GMD9CXe7KNNsqRVS5xLfMqHxA7VuLscqw41i3RqXR BtlFP3b6DGfXLZhRflc9URz+E6HaxWaQTivkNR8N50MG84m8rd2JuXZxxApfSgFF7xFz iLdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GjPd3WKi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b89si385084edf.345.2020.04.20.04.59.27; Mon, 20 Apr 2020 04:59:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GjPd3WKi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726710AbgDTLzu (ORCPT + 99 others); Mon, 20 Apr 2020 07:55:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:40014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbgDTLzr (ORCPT ); Mon, 20 Apr 2020 07:55:47 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7244D2071C; Mon, 20 Apr 2020 11:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383747; bh=nL1LeGOm8/WZgsO1KtQEkujWWsCxvxA5HwYdNWw6Wyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GjPd3WKi8ZJ1kqyPYUDMB4we/fxbCzUEw33vDfJ3D4bBHmGLU/RkdP2Mi9vzmAs8s P+kuRB4kZOagMhPcgkPTo0aZug30HM48KckQc12t7mD1EPaqsMdFzwoE0nHp7n5QBG nJigeeAvfAKVARXq2mLV/0vtGZIKAYkYN1+Ju5WM= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Adrian Hunter , Mathieu Poirier , Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 29/60] perf cs-etm: Implement ->evsel_is_auxtrace() callback Date: Mon, 20 Apr 2020 08:52:45 -0300 Message-Id: <20200420115316.18781-30-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200420115316.18781-1-acme@kernel.org> References: <20200420115316.18781-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter Implement ->evsel_is_auxtrace() callback. Signed-off-by: Adrian Hunter Reviewed-by: Mathieu Poirier Cc: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200401101613.6201-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 62d2f9b9ce1b..3c802fde4954 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -631,6 +631,16 @@ static void cs_etm__free(struct perf_session *session) zfree(&aux); } +static bool cs_etm__evsel_is_auxtrace(struct perf_session *session, + struct evsel *evsel) +{ + struct cs_etm_auxtrace *aux = container_of(session->auxtrace, + struct cs_etm_auxtrace, + auxtrace); + + return evsel->core.attr.type == aux->pmu_type; +} + static u8 cs_etm__cpu_mode(struct cs_etm_queue *etmq, u64 address) { struct machine *machine; @@ -2618,6 +2628,7 @@ int cs_etm__process_auxtrace_info(union perf_event *event, etm->auxtrace.flush_events = cs_etm__flush_events; etm->auxtrace.free_events = cs_etm__free_events; etm->auxtrace.free = cs_etm__free; + etm->auxtrace.evsel_is_auxtrace = cs_etm__evsel_is_auxtrace; session->auxtrace = &etm->auxtrace; etm->unknown_thread = thread__new(999999999, 999999999); -- 2.21.1