Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3624439ybz; Mon, 20 Apr 2020 06:31:29 -0700 (PDT) X-Google-Smtp-Source: APiQypK8knD9MGezlTQoCy6FFVB/1rBT5fxyrjWyoSfCkthvl3bMaySVlB+zYZVf3pbKg0nPJ/Sr X-Received: by 2002:aa7:db0b:: with SMTP id t11mr3405995eds.304.1587389489314; Mon, 20 Apr 2020 06:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587389489; cv=none; d=google.com; s=arc-20160816; b=vAQGGMvC/fBKptCykuQLKCNBujJQjXiDLGJYlK6XxDzB9JSIpAUp4lQsdF+iAu32r0 k0kFAP0CjjlQPtfa/NUeOBQje5BikahvTY6odnQ/dHzAsxKcRjjfQkh7zJNipUaoQdmp fqAQc++SdPWLgR8NQnujOQjkjYuQhy32uxYNKghxzLcrn0jeB8pi2035vt1H4TRsHYQQ UFBrrIPTYOJS4wj0J62Yw0m1pi4FBooLMkVXT1vQ4Rg/RO8bNQV9TCU5Mp9wpJSMqSzr QFYeVRCSEdvAP6kgXqTO7ZjcIAWfYXTE9du4HnVHlk/Q7SZEjZV7Yrm7iel+LG/j6kT8 vFnA== 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=Opx5ppmOVN50pUaN7B9AttkWQRHOFrLdBWNJAkB8cec=; b=UDXYjZEgree3+5Y1hEfhSNI9wb0qOatIVhkRahoFnmKMmOHU50bS9fCexn/fmw2wtj E0g7P0gZy1r+FIRFhJTPD7WuqjtNZ/LZ1GLxwtoqTB2EpJh107OtXmSRvrydfW096tLU kgSX8H+4/bvYSPwPMVdq6Q+z9ZCt444tCGxJHw9/RO+hkA3IAJyPiPw3cjtFCirMXdek MlAxJpxFli7DyaDQzQcPC74WDiuTFw3fBivSm+vXrQZuSLQDB007UIbbCWyhACf+eLVF SkS106CRZ438nblO0z5S3v7e1MsCxfdOgX0/Krw3CeTZ/Jb2zNqguhYbG7VTCdjdc1iH fklg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pt5Yp3mX; 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 r11si537405edq.390.2020.04.20.06.31.04; Mon, 20 Apr 2020 06:31:29 -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=Pt5Yp3mX; 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 S1726952AbgDTLzj (ORCPT + 99 others); Mon, 20 Apr 2020 07:55:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:39826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726945AbgDTLzi (ORCPT ); Mon, 20 Apr 2020 07:55:38 -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 AA2252071C; Mon, 20 Apr 2020 11:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383737; bh=4Ibcbil+kVZDtrWxqM+PwTKg7AVpk/st230fd46atPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pt5Yp3mXyoYFsFMNs2rEJLJHLEBv3wXcVrthdkrZ/tdR7a0mJnAVsYFvwMbAIhjpk T2QarmCizDDuaQDV4o+ck+zm7AB0FrQlQ9F9rOvofptxzRal7pYQ1JUdb2X4N6Kf29 Cn+mlQe70NcrvBJYMxpCVUQPd1EXAzkzvLiq5p2g= 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 26/60] perf intel-pt: Implement ->evsel_is_auxtrace() callback Date: Mon, 20 Apr 2020 08:52:42 -0300 Message-Id: <20200420115316.18781-27-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-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/intel-pt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 23c8289c2472..db25c77d82f3 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -2715,6 +2715,15 @@ static void intel_pt_free(struct perf_session *session) free(pt); } +static bool intel_pt_evsel_is_auxtrace(struct perf_session *session, + struct evsel *evsel) +{ + struct intel_pt *pt = container_of(session->auxtrace, struct intel_pt, + auxtrace); + + return evsel->core.attr.type == pt->pmu_type; +} + static int intel_pt_process_auxtrace_event(struct perf_session *session, union perf_event *event, struct perf_tool *tool __maybe_unused) @@ -3310,6 +3319,7 @@ int intel_pt_process_auxtrace_info(union perf_event *event, pt->auxtrace.flush_events = intel_pt_flush; pt->auxtrace.free_events = intel_pt_free_events; pt->auxtrace.free = intel_pt_free; + pt->auxtrace.evsel_is_auxtrace = intel_pt_evsel_is_auxtrace; session->auxtrace = &pt->auxtrace; if (dump_trace) -- 2.21.1