From patchwork Wed Jul 1 12:52:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrik Jakobsson X-Patchwork-Id: 6703211 Return-Path: X-Original-To: patchwork-intel-gfx@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 80E939F380 for ; Wed, 1 Jul 2015 12:53:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B88F204AF for ; Wed, 1 Jul 2015 12:53:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 57B6F204A0 for ; Wed, 1 Jul 2015 12:53:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 591F86EB07; Wed, 1 Jul 2015 05:53:05 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id A5AB66E544 for ; Wed, 1 Jul 2015 05:53:04 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 01 Jul 2015 05:52:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,385,1432623600"; d="scan'208";a="517181613" Received: from patrik-dev-mach.isw.intel.com ([10.237.180.146]) by FMSMGA003.fm.intel.com with ESMTP; 01 Jul 2015 05:52:52 -0700 From: Patrik Jakobsson To: strace-devel@lists.sourceforge.net, ldv@altlinux.org, gabriel@lse.epita.fr Date: Wed, 1 Jul 2015 14:52:45 +0200 Message-Id: <1435755168-16207-3-git-send-email-patrik.jakobsson@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435755168-16207-1-git-send-email-patrik.jakobsson@linux.intel.com> References: <1435755168-16207-1-git-send-email-patrik.jakobsson@linux.intel.com> Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v3 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.8 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 */