From patchwork Thu May 18 17:24:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 100115 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp825559qge; Thu, 18 May 2017 10:25:34 -0700 (PDT) X-Received: by 10.84.216.77 with SMTP id f13mr6133064plj.130.1495128334132; Thu, 18 May 2017 10:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495128334; cv=none; d=google.com; s=arc-20160816; b=ayApgw+TdDLYQ5o4XpaDroFvV9t3dH0rzpQ4rZCSsRZ2w4I86kqFb2gZWcgpU+KPSi 6bPQkSZKnIDu51XDjFoxCeLFfy2Q9I0V5QB0uc4VxyeQP7V4rYRJyVyHS5j99d43B3uf MMtXkhle9NeN4QtFrbq78Yeih/RkRAr+70nQlzq+97tOiyCjwgjfnDgO028YS3uXP4xn nYsI4JG3fQ/cKEvNvMOvZdImPXKhr3Uije3xuqYb5viHgBNrV0FVfUbcI3pqvmDqnyTi o2ZJ21gD42R0uCn+jttJVPrDAmnQXEHY5mJ345lW+Syce8qUMjjbZMyM9xCmxd6ZvRaI 2Bng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=XpHGBjUaVEOLEPTJMogdGkidXohtP3E23w9zv+NVnZI=; b=a65ay1jTTqoaVu4mJbusY60SqbduEnIcCpxyxQ9K7+fe+Gu/JDJsv7ZIQTRaogiVtM uyiZpPJxaY9ToroYOa69dB/jKl3anj27krqvqOFBFriv20yG0AHe82lzrx/p+gqPmEf1 JCJOsxlEbDNzTUr71UmzVRo/iXzLJblg+hdn6y4oxUNvyDq58tKW4UHEsy7o1xWWfG96 KhD5EXEgNlxClQbJXXDnS5fydf6Gaptc/pdvD6IecA1cPUv6NNPHynIdBjDCt+aANgpf U5S9pagPeJc/GtLKoEUfEE1N9RdhMUpBIIv4dUIfNnP9JdVle/ACiD2PpallIuujhhjC QUdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22si1436870pgu.27.2017.05.18.10.25.33; Thu, 18 May 2017 10:25:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934714AbdERRZU (ORCPT + 25 others); Thu, 18 May 2017 13:25:20 -0400 Received: from foss.arm.com ([217.140.101.70]:34706 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932969AbdERRYf (ORCPT ); Thu, 18 May 2017 13:24:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9F6451650; Thu, 18 May 2017 10:24:34 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 705803F7C4; Thu, 18 May 2017 10:24:34 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id E2C0E1AE3935; Thu, 18 May 2017 18:24:34 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: marc.zyngier@arm.com, mark.rutland@arm.com, kim.phillips@arm.com, tglx@linutronix.de, peterz@infradead.org, alexander.shishkin@linux.intel.com, robh@kernel.org, suzuki.poulose@arm.com, pawel.moll@arm.com, mathieu.poirier@linaro.org, mingo@redhat.com, linux-kernel@vger.kernel.org, Will Deacon Subject: [PATCH v3 3/5] perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples Date: Thu, 18 May 2017 18:24:31 +0100 Message-Id: <1495128273-13941-4-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1495128273-13941-1-git-send-email-will.deacon@arm.com> References: <1495128273-13941-1-git-send-email-will.deacon@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ARM SPE architecture permits an implementation to ignore a sample if the sample is due to be taken whilst another sample is already being produced. In this case, it is desirable to report the collision to userspace, as they may want to lower the sample period. This patch adds a PERF_AUX_FLAG_COLLISION flag, so that such events can be relayed to userspace. Signed-off-by: Will Deacon --- include/uapi/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) -- 2.1.4 diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index b1c0b187acfe..157034597d21 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -916,6 +916,7 @@ enum perf_callchain_context { #define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */ #define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */ #define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */ +#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */ #define PERF_FLAG_FD_NO_GROUP (1UL << 0) #define PERF_FLAG_FD_OUTPUT (1UL << 1)