From patchwork Thu Jun 18 08:42:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrik Jakobsson X-Patchwork-Id: 6634511 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1C683C0020 for ; Thu, 18 Jun 2015 08:42:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BC08207F1 for ; Thu, 18 Jun 2015 08:42:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 57B24207C5 for ; Thu, 18 Jun 2015 08:42:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B14DE6EC9B; Thu, 18 Jun 2015 01:42:03 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id A4C396EC9A for ; Thu, 18 Jun 2015 01:41:59 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 18 Jun 2015 01:41:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,638,1427785200"; d="scan'208";a="729799030" Received: from rpjakobs-thinkcentre-e73.isw.intel.com ([10.237.180.145]) by fmsmga001.fm.intel.com with ESMTP; 18 Jun 2015 01:41:58 -0700 From: Patrik Jakobsson To: strace-devel@lists.sourceforge.net Date: Thu, 18 Jun 2015 10:42:42 +0200 Message-Id: <1434616965-5157-3-git-send-email-patrik.jakobsson@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434616965-5157-1-git-send-email-patrik.jakobsson@linux.intel.com> References: <1434616965-5157-1-git-send-email-patrik.jakobsson@linux.intel.com> Cc: intel-gfx@lists.freedesktop.org, ldv@altlinux.org Subject: [Intel-gfx] [PATCH v2 2/5] drm: Add private data field to trace control block X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 This field can be used by the decode functions of a syscall. The main usecase for now is to allow storing the driver name for drm devices across the lifetime of a trace control block. This allows us to do the driver identification once and reuse the information in all the decode stages of the ioctl. * defs.h: Add private data field in struct tcb Signed-off-by: Patrik Jakobsson --- defs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/defs.h b/defs.h index c02f810..5b0670e 100644 --- a/defs.h +++ b/defs.h @@ -266,6 +266,13 @@ struct tcb { int u_error; /* Error code */ long scno; /* System call number */ long u_arg[MAX_ARGS]; /* System call arguments */ + + /* + * Private data for the decoding functions of the syscall. TCB core does + * _not_ handle allocation / deallocation of this data. + */ + void *priv_data; + #if defined(LINUX_MIPSN32) || defined(X32) long long ext_arg[MAX_ARGS]; long long u_lrval; /* long long return value */