Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3541118ybz; Mon, 20 Apr 2020 04:59:57 -0700 (PDT) X-Google-Smtp-Source: APiQypKB0a2R7kPOrp1xJQPPnPMxgfaGDnobSxSXma93dLyD8Y59HGZMX5OuYqvleYJLa0jwXdq8 X-Received: by 2002:a05:6402:1694:: with SMTP id a20mr1924148edv.322.1587383997122; Mon, 20 Apr 2020 04:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587383997; cv=none; d=google.com; s=arc-20160816; b=lb64dnnY7V/eyzfCJxtuY58dd84EWSsj8rDslXZCO0skxTe/1OFBYBx+t96FgCILv8 Jj4rNHF+LJvi4XA36ZiZwoZLegiP2kdstEvxhdBtZ5dpVxQA3Lh6utb8yRI+9k1HPQdD Rn+N/7+7qVNNYNSP1hxCQ+Eu8h3KZv2NkiUkHUqktWKpfFWpRA/2xpgdIyYwnvcezujh I2sp1LnXTkKdOonpME+LtawrVaVovdF6Lo+yWAkyfLm3Qm5uSwwj2vepkg3NDNgzgH4F btE8b9x4UOENLbnBTIiKZVcSxIo8HttweEIaUxgzGC7vCybhd9i/1OkZbBdJH6tpEQRc 0r2Q== 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=vA0/5tS0tXSjHt3X88VLeObvOM7SN81NkuET32KYP7Q=; b=E/EdTNQR9wM7Wy1n1EaroSLgmKyzsOQBqWo2/ebCJ/NYQmw0RHDGKhaU6ioNKMy3Lr FRJghMH3sS3p5Oz3BvIarSciVqkrcmQvIgMxfBWlEQ/VPS1jBxngfJ4LaAxOfFP3jLcw pdmhnJMI49J9iKITI7KXsIm3I31GSHOpCvL4WTg8N7CJNQGRZw5HXap490dbiUeHmakt zx3z++0UpWN9g/tTpN6n9sEtqs+jGZi1R5Z0/EKCFzEirHd0HlDCX+5+Pi+xqnMeJIj9 xnm/fLfbK8WSglusaTSK3sWJh0xrDscZkV4fudF4xKIIyaKmtNo5zoHSPe6yabO3KvzN vkRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C2UXOjf6; 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 h22si396073ejq.363.2020.04.20.04.59.34; Mon, 20 Apr 2020 04:59:57 -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=C2UXOjf6; 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 S1726980AbgDTLzy (ORCPT + 99 others); Mon, 20 Apr 2020 07:55:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:40076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbgDTLzv (ORCPT ); Mon, 20 Apr 2020 07:55:51 -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 C3E5E2072B; Mon, 20 Apr 2020 11:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383750; bh=VZN1h7cjWd3DPg/tcndQSyK/rsbx7rzEzxBfHfiUW/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C2UXOjf6VNONVbXOgVWYYIhkpFxPfN5PiD8QJNS34jo2ix3QQvuGewdtpKNprMtCD F7RgLlZUkRivVVGWlsa6idLIQeBlDZMiC2y+QNzXzGXWBcC7//O3HCLOu2u6J3HH3x u3pvgLQuzG69I8RojPIMgpZZ3DSX2Eo3L8snKj18= 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 , Thomas Richter , Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 30/60] perf s390-cpumsf: Implement ->evsel_is_auxtrace() callback Date: Mon, 20 Apr 2020 08:52:46 -0300 Message-Id: <20200420115316.18781-31-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 Acked-by: Thomas Richter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200401101613.6201-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/s390-cpumcf-kernel.h | 1 + tools/perf/util/s390-cpumsf.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/tools/perf/util/s390-cpumcf-kernel.h b/tools/perf/util/s390-cpumcf-kernel.h index d4356030b504..f55ca07f3ca1 100644 --- a/tools/perf/util/s390-cpumcf-kernel.h +++ b/tools/perf/util/s390-cpumcf-kernel.h @@ -11,6 +11,7 @@ #define S390_CPUMCF_DIAG_DEF 0xfeef /* Counter diagnostic entry ID */ #define PERF_EVENT_CPUM_CF_DIAG 0xBC000 /* Event: Counter sets */ +#define PERF_EVENT_CPUM_SF_DIAG 0xBD000 /* Event: Combined-sampling */ struct cf_ctrset_entry { /* CPU-M CF counter set entry (8 byte) */ unsigned int def:16; /* 0-15 Data Entry Format */ diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c index 6785cd87aa4d..d7779e48652f 100644 --- a/tools/perf/util/s390-cpumsf.c +++ b/tools/perf/util/s390-cpumsf.c @@ -1047,6 +1047,14 @@ static void s390_cpumsf_free(struct perf_session *session) free(sf); } +static bool +s390_cpumsf_evsel_is_auxtrace(struct perf_session *session __maybe_unused, + struct evsel *evsel) +{ + return evsel->core.attr.type == PERF_TYPE_RAW && + evsel->core.attr.config == PERF_EVENT_CPUM_SF_DIAG; +} + static int s390_cpumsf_get_type(const char *cpuid) { int ret, family = 0; @@ -1142,6 +1150,7 @@ int s390_cpumsf_process_auxtrace_info(union perf_event *event, sf->auxtrace.flush_events = s390_cpumsf_flush; sf->auxtrace.free_events = s390_cpumsf_free_events; sf->auxtrace.free = s390_cpumsf_free; + sf->auxtrace.evsel_is_auxtrace = s390_cpumsf_evsel_is_auxtrace; session->auxtrace = &sf->auxtrace; if (dump_trace) -- 2.21.1