From patchwork Thu Sep 28 14:09:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 114446 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp789698qgf; Thu, 28 Sep 2017 07:10:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDolqyIQXvfoyDaqqqLkipJQsA+++lnossz24GonU+ZZDUVLdMZAWBZ0F2+4l39thR9hrjZ X-Received: by 10.101.66.70 with SMTP id d6mr4339754pgq.169.1506607800455; Thu, 28 Sep 2017 07:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506607800; cv=none; d=google.com; s=arc-20160816; b=iIL4YAIMuZsqDFuD1OEcdX8R7Wh0MvDQDbDuX1Gl/gVV8enqHhMX6TtLSdM8ryjWpz 6zT7zEqT8sbk5iknduK3TG15DL21KQzYDOi+cJ3U8t/Ir+RtQA8mzZYtKlqfpLiwSjwu DXoLwJItP1qDduZc18s6dGJYrums7Rzuzft/+GWnEt2AMh/YpYSE383Qh12oVYGZtBkz qAPS6uYVOwhz7RfRhTp+8/qDY7L+mv30VBOdEQBK4bvqj6b0og0U2T9XCsQYV/4SnkHJ iW9WbWXINyP5sAujIqqK/c0h2e1Vkqz//M+lobyol+8/wlNj2B+Y9+1jczRnptDvv3nH 7JHQ== 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=hIkm6VsAkhkd0IuSE2T68wFm/UP0NVSOvUBBLICx2oY=; b=HyM7VStRY4o5liT21lD/Q4GWgDA5pyKC3ZvUz7Tt0nLEDbGF0IuEubvtKcF490zlIL fOznhjlWHIi2UztklG6Rpfd9dJEU/vOAEFEluf7Y8w1Xk147VCgXkLotp93sqNH+JmZV 0FF4p5mDdeXRjywyRRzlUtOmeOXFZvzgrewPSsV1PqvkoQKsZHMfH+N8EmmCFwgFM8N3 hQ/wsQA58kCCmBNrL574MkuiglSt72eKCzF9Zi+L4Y4w49xbcY+p5gQS8SCNrQN3UDcy mStVJSNbgZvqAzzvEMFa1kwXGGPPMUH6lVFapYm4ocMu+DkPgHpInWnBbCXUHF0gYsr7 iDJw== 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 t4si1498419plj.101.2017.09.28.07.10.00; Thu, 28 Sep 2017 07:10:00 -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 S1753248AbdI1OJn (ORCPT + 26 others); Thu, 28 Sep 2017 10:09:43 -0400 Received: from foss.arm.com ([217.140.101.70]:58188 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbdI1OJi (ORCPT ); Thu, 28 Sep 2017 10:09:38 -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 32427164F; Thu, 28 Sep 2017 07:09:38 -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 03C1A3F7C4; Thu, 28 Sep 2017 07:09:38 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 9785E1AE305A; Thu, 28 Sep 2017 15:09:52 +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 v5 3/7] perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples Date: Thu, 28 Sep 2017 15:09:47 +0100 Message-Id: <1506607791-8621-4-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1506607791-8621-1-git-send-email-will.deacon@arm.com> References: <1506607791-8621-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 140ae638cfd6..7ca1b22ea417 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -941,6 +941,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)