From patchwork Thu May 7 14:15:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 6359411 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A7F449F399 for ; Thu, 7 May 2015 16:23:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9174203B6 for ; Thu, 7 May 2015 16:23:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E3802203AD for ; Thu, 7 May 2015 16:23:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E6836E1A6; Thu, 7 May 2015 09:23:45 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E3336E817; Thu, 7 May 2015 07:16:02 -0700 (PDT) Received: by wgic8 with SMTP id c8so18497910wgi.1; Thu, 07 May 2015 07:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=FKgqZJNUbqjv4O4k7SDPTC4cKXhyCx3AUPayUN4e7YQ=; b=z8JojUHLOlbCAH4i3pmlyjbnOVsre5KqDI0vdopSWzS1p0G24UcnGiC80uj3tlgwzq LYKJDstMIFXQMoWJtDFwJGRxY3ZYDuJHTtszntIauxf4PK5U78k7u8eZbb0SmUNWRtEa yeiDMqNnxeyJA5kMsXHzkzChtp04l8UDMFysAVXcDYiYaQLDla2gLxhUIVuaaAi0EjvF gC8k9Y3kdotzu/luqJ1Ja7KhqJcwp39KmEc3XqFGGUVgYxqs1pmVq2L0lSfvE1w4yp9+ 95oXUkeqOI6XlD7mjVWEMIKkj7RBx74nxSWJHEf3XdbkQj7SNDuwcHjN4THf7/ipwOXe NIqQ== X-Received: by 10.180.208.99 with SMTP id md3mr7169517wic.34.1431008161250; Thu, 07 May 2015 07:16:01 -0700 (PDT) Received: from sixbynine.org (cpc26-heme10-2-0-cust305.9-1.cable.virginm.net. [86.3.57.50]) by mx.google.com with ESMTPSA id ch2sm4199509wib.18.2015.05.07.07.16.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2015 07:16:00 -0700 (PDT) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Subject: [RFC PATCH 04/11] perf: Add a PERF_RECORD_DEVICE event type Date: Thu, 7 May 2015 15:15:47 +0100 Message-Id: <1431008154-6833-5-git-send-email-robert@sixbynine.org> X-Mailer: git-send-email 2.3.2 In-Reply-To: <1431008154-6833-1-git-send-email-robert@sixbynine.org> References: <1431008154-6833-1-git-send-email-robert@sixbynine.org> X-Mailman-Approved-At: Thu, 07 May 2015 09:23:43 -0700 Cc: Peter Zijlstra , linux-api@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ingo Molnar , Paul Mackerras , Arnaldo Carvalho de Melo , Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To allow for more extensible, device specific, perf record types this adds a generic PERF_RECORD_DEVICE type that can be used by device drivers. Driver developers can then document some driver-specific header to further detail such a record's type. Signed-off-by: Robert Bragg --- include/uapi/linux/perf_event.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index a25967b..688e192 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -726,6 +726,19 @@ enum perf_event_type { */ PERF_RECORD_MMAP2 = 10, + /* + * The DEVICE record implies some device driver specific record that + * will have some further mechanism for describing the contents of + * the record (i.e. some driver specific event header). + * + * struct { + * struct perf_event_header header; + * + * struct DEVICE_EVENT_HEADER device_header; + * }; + */ + PERF_RECORD_DEVICE = 11, + PERF_RECORD_MAX, /* non-ABI */ };