Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3541916ybz; Mon, 20 Apr 2020 05:00:47 -0700 (PDT) X-Google-Smtp-Source: APiQypIps7va5EHkFre8qX2uZEMYvdE+m9FYFmVANPVU17FDRcBj3ZaS0PV71Iv9M3JXJUmCPXk4 X-Received: by 2002:a50:c004:: with SMTP id r4mr13094362edb.110.1587384046962; Mon, 20 Apr 2020 05:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384046; cv=none; d=google.com; s=arc-20160816; b=UfCY5+cR2WBwXrXjbAaWnvfLZvTLuFwtzDSwwJOmQg/HMlx9z15AxmIA5XykBAvsFG P6lyW8xR0iRDwPfRxHryRA+dDZ2mham0yGdQwqNdjpN/1nLBU7/HA4+fGjJU+p0Jpch1 D74y71tA31ffwoGez7bECwAYxI6Wi4bxD8xv1SvSHlvmc+LDUkIX+OQGbwVs58eyAI7H hr3ehFvTofPF0tqpWmzumk4PybtOhTaYS4dorOwbro6pf3VtPPjWGaYlf7/3fk6i99f7 kKFIWCUBHfvN26zeR/LF+ivS+B+YRepFJxEMrzEDZ67RbB5IskN/ObJM23C6yFx9p1Jm RoTw== 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=XkI7M4XtivOK4hsV3KeL7KN9vbGwfESiOeS7e7qLtJU=; b=0TKXYrb+mFDmZwo3w+zE1BRMIsDPeOz7E2PVW1yCxFkevTWAtuAfXSLklqY/j+rOIl djqRDEdEC6gBiDbfAjLN2o8fikB3iwI6gRq1jkB25vJhhYyrLHlN1J/KILKSM6cZIzse FmRbWO7zJryDov9jvZL7OmhD/d8bQAfUww5CIZxW9Qq7gSngMB8cvbULXs2H0h96nv37 s5g9+0/+a0wfsWnoRzMMEO5UXT6NW/bYmICGJeMb+seZmAtcAwXEJ/LPn7P2Cbq+Zl8j fj2yWGRl+V1kkgQfr3QKg7jpeN2CadqQC9/XUerW2gn/br/tS6FE9ubH/5uYDI1qvcw1 rJHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yr0Ci0uK; 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 v23si400351ejo.321.2020.04.20.05.00.23; Mon, 20 Apr 2020 05:00:46 -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=Yr0Ci0uK; 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 S1726398AbgDTLzn (ORCPT + 99 others); Mon, 20 Apr 2020 07:55:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:39894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbgDTLzl (ORCPT ); Mon, 20 Apr 2020 07:55:41 -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 C81EE21D94; Mon, 20 Apr 2020 11:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383740; bh=B8TK3JQZYMUyhS8PYl5YqRDlU6E03SI5xl5k54AIv2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yr0Ci0uK/uftbhRQxvsEpqtFCz0bckuMb6uH4AxDaMa3E2azn9mxSVigsMxNtSqcU DrMYMS8MBuWt46LD288bfU3JH/+2WiMchGW6vV1BBcI9UlkOgMzEfGghVvwtSe1NqT pfui3D+ngflKzW4K3DqKRZRa6wItRi91jrK5Bm7U= 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 , Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 27/60] perf intel-bts: Implement ->evsel_is_auxtrace() callback Date: Mon, 20 Apr 2020 08:52:43 -0300 Message-Id: <20200420115316.18781-28-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 Cc: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200401101613.6201-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/intel-bts.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index 34cb380d19a3..059e1c805ed0 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c @@ -728,6 +728,15 @@ static void intel_bts_free(struct perf_session *session) free(bts); } +static bool intel_bts_evsel_is_auxtrace(struct perf_session *session, + struct evsel *evsel) +{ + struct intel_bts *bts = container_of(session->auxtrace, struct intel_bts, + auxtrace); + + return evsel->core.attr.type == bts->pmu_type; +} + struct intel_bts_synth { struct perf_tool dummy_tool; struct perf_session *session; @@ -883,6 +892,7 @@ int intel_bts_process_auxtrace_info(union perf_event *event, bts->auxtrace.flush_events = intel_bts_flush; bts->auxtrace.free_events = intel_bts_free_events; bts->auxtrace.free = intel_bts_free; + bts->auxtrace.evsel_is_auxtrace = intel_bts_evsel_is_auxtrace; session->auxtrace = &bts->auxtrace; intel_bts_print_info(&auxtrace_info->priv[0], INTEL_BTS_PMU_TYPE, -- 2.21.1