Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3539383ybz; Mon, 20 Apr 2020 04:57:45 -0700 (PDT) X-Google-Smtp-Source: APiQypKJtuIyzYjSrfc4qu/DBT62luIp1u8gpT8PM7083OQhLzzOb2E6sLUUT5ax4O+rHAhWk1E7 X-Received: by 2002:a05:6402:120a:: with SMTP id c10mr13001999edw.15.1587383865163; Mon, 20 Apr 2020 04:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587383865; cv=none; d=google.com; s=arc-20160816; b=a7s0QaiyshGcj67+tvLez2eqZ6L7OtHA7nn4bPZ9BfuW03jOJBUyc+XS8yAqKrvvPm yyHQfbbdG75psPFoF/AziDQz3Q7rtK6Gw7PbzsFEUEpo8u9xup+4OYk9AAepIIABFDOe T3UgN73po5S7i8IJ1Bam7OYq1EcTebYHkoLzW562n85rl0mAlNaLXvVn6VHgS4Y/UBfY ZPB3owteaaUGfWuTOunCKoGL48wQafjl8NUWf7XwrUN9QGPw+t0QLKa5FVEIPv5/+r9u AwJE8iVQeNz2DmpFVfnnxaaedjmmRR0DYPb8443gsJxXIBFIbyPsqpcYCWdudnAsRgdg /QiQ== 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=XXznoviGhQgR1iv1VowN26AwMIuF0B/gJgwdikchQyo=; b=QQIolWRyRFi0oV1uBOQIMLAydWcO9wTjllTimNnlUSFOisPZJet0eWzmysdmnADwym x7jrucvRU7NLHFLk4XbxpFlyu8w0ljCovqB56mKHYuTfxL7JjRWYuwm0Za1oZcHTCUgP nTgNyY/8RpqlatxXmg8CR1UoHrBX3srjqL0CEVgRUgY7ZSW2IP/68xlnuKFAlTspBMd9 aTwhtHMECXs28u96uxCYOcpGtMC/KnkjRpgdyd3/NFNb9egy/FMnBOzFzzXVJSChJus7 +cM49bVIpW/jt0+0FHV75YpCNWe5eUY0j78cY08JjSeKQGltnGz+PieiLbi5s4CQE39N BygA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i3zPBODl; 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 cc27si446457edb.544.2020.04.20.04.57.22; Mon, 20 Apr 2020 04:57:45 -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=i3zPBODl; 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 S1726748AbgDTLzq (ORCPT + 99 others); Mon, 20 Apr 2020 07:55:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:39962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbgDTLzo (ORCPT ); Mon, 20 Apr 2020 07:55:44 -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 E5A0521744; Mon, 20 Apr 2020 11:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383744; bh=EPJxrD7KUuHGqvdsNGSmsyKWjnbaIlI1xgBj6dkG7yA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i3zPBODld+uPpDI6QjFO9tMWBlrp6zjRUb8TuW87UXH6S55OBwRm20VUenpNEAbj0 kq9EGtEIdNtQV7FvLBKKxioPv+W12sG6qSC0VsLpdjBIEbQAY1CHh42wOcgMGBcgxS +sajlXTDG4COli9mTxTIRPirZxKe7e2/EBUxZEII= 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 , Leo Yan , Andi Kleen , Jiri Olsa , Kim Phillips , Arnaldo Carvalho de Melo Subject: [PATCH 28/60] perf arm-spe: Implement ->evsel_is_auxtrace() callback Date: Mon, 20 Apr 2020 08:52:44 -0300 Message-Id: <20200420115316.18781-29-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: Leo Yan Cc: Andi Kleen Cc: Jiri Olsa Cc: Kim Phillips Link: http://lore.kernel.org/lkml/20200401101613.6201-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/arm-spe.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index 53be12b23ff4..875a0dd540e5 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -176,6 +176,14 @@ static void arm_spe_free(struct perf_session *session) free(spe); } +static bool arm_spe_evsel_is_auxtrace(struct perf_session *session, + struct evsel *evsel) +{ + struct arm_spe *spe = container_of(session->auxtrace, struct arm_spe, auxtrace); + + return evsel->core.attr.type == spe->pmu_type; +} + static const char * const arm_spe_info_fmts[] = { [ARM_SPE_PMU_TYPE] = " PMU Type %"PRId64"\n", }; @@ -218,6 +226,7 @@ int arm_spe_process_auxtrace_info(union perf_event *event, spe->auxtrace.flush_events = arm_spe_flush; spe->auxtrace.free_events = arm_spe_free_events; spe->auxtrace.free = arm_spe_free; + spe->auxtrace.evsel_is_auxtrace = arm_spe_evsel_is_auxtrace; session->auxtrace = &spe->auxtrace; arm_spe_print_info(&auxtrace_info->priv[0]); -- 2.21.1