Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1474192ybf; Sun, 1 Mar 2020 10:18:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxN09nH5B4ixYRlkVPSJbhnu5fzC/a/qR1jXuVSYR9QzuPTnAZHJZs+IL2w0utA8o85nWk0 X-Received: by 2002:a05:6830:155a:: with SMTP id l26mr10554967otp.339.1583086719421; Sun, 01 Mar 2020 10:18:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583086719; cv=none; d=google.com; s=arc-20160816; b=FK1pTyMpcYaGjvJaNgLZRf6heTSmT0gFk+VruclLxApDO/FDUbVVkoKLlTEBnMj8fB pHBLPWpLD96Qb5UZ/qT7HtJAILct2JzrFUF1MCpREV3SyiD98O/EbbtncwGqOoz++s4I 2tAjffwB3+fmcC8+CJ4YWT15UrFvBgHUAJ9bxdkVS/GGAnUSiX94G1SWK+MwsIegdSoj y/qW9zhZPIGnqExq25rqzIcOuEFTHRqlIkLZsbyOtGjhxQQtAFyZHl4OtueBzR9r+NtT FqTHH12Z5y8cREsMioNpzY51WcQeSWXfLgoMiILdi9X8cmAROCYduKu/mwrivXS85P/b dCXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=+HYgy7kdtIu6JU26qNZa3qm3eXZ4HXbfYGdDNTxOLAY=; b=NCy/D9Gw9ukheVk/7Y4G4mGVjU+hNDoK8QGTQJeq21oXGvB3LV++0qLsdbx61JlNkk lkALm6z78Bgj8iqf2kECpf6fWTice7VTHV2DDB37859eKcXJ8bC2/0EeHu4C5G0fucjr BBqNSg8+2S26nDLSkwVkczbcS997R0vxQJCIaM7zHyAz5kT0uGOx0ffgxfBAP2Twpwyd g19ToRBEA7WogN8SHXnKsd2qtnDDZzxquUSfgnniQFviCCMrMdFaTu72rfr1V5kRIt6m OpDR0NsHHOfDDpXr4rJyXnNYxtS+wzNOrXVnGNWTkAXDe+WFQo72gvB+eft5vatVr2P0 a3vg== 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 t15si4867363oth.176.2020.03.01.10.18.26; Sun, 01 Mar 2020 10:18:39 -0800 (PST) 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 S1726448AbgCASST (ORCPT + 99 others); Sun, 1 Mar 2020 13:18:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:34352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbgCASSS (ORCPT ); Sun, 1 Mar 2020 13:18:18 -0500 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D8586246C8; Sun, 1 Mar 2020 18:18:17 +0000 (UTC) Date: Sun, 1 Mar 2020 13:18:16 -0500 From: Steven Rostedt To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] trace: Export anonymous tracing Message-ID: <20200301131816.277dd398@oasis.local.home> In-Reply-To: <20200301155248.4132645-1-chris@chris-wilson.co.uk> References: <20200301155248.4132645-1-chris@chris-wilson.co.uk> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 1 Mar 2020 15:52:47 +0000 Chris Wilson wrote: > To facilitate construction of per-client event ringbuffers, in > particular for a per-client debug and error report log, it would be > extremely useful to create an anonymous file that can be handed to > userspace so that it can see its and only its events. trace already > provides a means of encapsulating the trace ringbuffer into a struct > file that can be opened via the tracefs, and so with a couple of minor > tweaks can provide the same access via an anonymous inode. I'm curious to why we need it to be anonymous. Why not allow them to be visible from the tracing directory. This could allow for easier debugging. Note, the trace instances have ref counters thus they can't be removed if something has a reference to it. Also, all the global functions require kernel doc comments to explain how they work and what they are for. -- Steve > > Signed-off-by: Chris Wilson > Cc: Steven Rostedt (VMware) > --- > include/linux/trace.h | 4 ++ > kernel/trace/trace.c | 142 ++++++++++++++++++++++++++++++------------ > 2 files changed, 105 insertions(+), 41 deletions(-) >