From patchwork Mon Jun 5 15:22:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 102728 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp968675qgd; Mon, 5 Jun 2017 08:23:09 -0700 (PDT) X-Received: by 10.84.205.69 with SMTP id o5mr15935055plh.106.1496676189257; Mon, 05 Jun 2017 08:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496676189; cv=none; d=google.com; s=arc-20160816; b=onKl+hYzdSMjDOJRHVk3jp4OsSN6n8TSvf3HrD+ahj6FA/0TGoLSxtDtAWc3xYhjc1 8Pmz8bnzLjqN0mrTPO/8FZtv3aTm1KhcJprxI0OPhsRGyw68HYLnt/k+L7RxAdc1lXki GFieS9AbuSeX/41mndhqeeWWc3tZXSt+6GPswSP/MXH4NjGKNuNy/APFHD3FIRZ9SoFL U2VK+nAZsFmnzuk9XgP4qlq9aFQY3fVZHskBcZGO9+FWSVqFqpDRXn1hPMpdGrSumGxL gGNbhx3f7Im6szMsqivuNBKkrqpfEbus4onX3r6OC8z+uqyg2rJcwLtZCDHrFwjOarv2 2q6g== 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=wBHxAXQKKreRJsiX7J1eqXj95lUmMtir6V7vsTtLzCF+lckoEYr7Br3HLsxm/UgL0U jsso4jXwaIv4CBkCOtah1FoP8VDZ78URwjoHlxZpKR04Me0YA/WA1ljVikMPFOk/FU/z WjY85/YXnk7HeCSwJV1mZ1LatPTB4UdZC6GZG66PXuieVN0vGwdXn56fpm3pN5bBaVZb rP58O37/tQrXtRWyaVX+c5AX1CUfuQLGTkwOiYgxGyoo72cEpY0g56nUe0HMjv7LHl/7 zYUD6QC6gofT3STHd7dfSEnSCB4VpNeudxt8aWtP2FJKHW3o4voiTXumV5RfAGhbfN0h YmQA== 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 d7si7699824plj.262.2017.06.05.08.23.08; Mon, 05 Jun 2017 08:23:09 -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 S1751398AbdFEPWz (ORCPT + 25 others); Mon, 5 Jun 2017 11:22:55 -0400 Received: from foss.arm.com ([217.140.101.70]:34142 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbdFEPWv (ORCPT ); Mon, 5 Jun 2017 11:22:51 -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 5450F15BE; Mon, 5 Jun 2017 08:22:51 -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 254103F90E; Mon, 5 Jun 2017 08:22:51 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 5C4981AE17A1; Mon, 5 Jun 2017 16:22:58 +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 v4 3/5] perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples Date: Mon, 5 Jun 2017 16:22:55 +0100 Message-Id: <1496676177-29356-4-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1496676177-29356-1-git-send-email-will.deacon@arm.com> References: <1496676177-29356-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)