Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3903748ybf; Tue, 3 Mar 2020 15:26:48 -0800 (PST) X-Google-Smtp-Source: ADFU+vuv7nOgOlCqM+2kf1J4lp01c4ApbHGIVFIaNe4aFF62/RhZeLlwAf8KzdY6AyzUGvEAL6eU X-Received: by 2002:a05:6808:aac:: with SMTP id r12mr681292oij.59.1583278008207; Tue, 03 Mar 2020 15:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583278008; cv=none; d=google.com; s=arc-20160816; b=FOh0/uZ5lt978d6Hge6ih2qJTsL0pGVapTiDJyjjOIEEb0yUfiShpVQSLkw4Yj0Vj1 6hVqIZvDqZXV7tgaY0BIzTr5CWP7eB2YpKYvmjVdiIu/QHFiCshu/5fMKHXcAtZZlaAr CACzgbLOhqu1aCXYJG9SifZGS/PiI0Z0tohOUO0cq2f3tonCVRAf5hOPxSYj8G2KDdBL 7F9OvQHsme9qiThWCni6MBrMWq8B5F2iEg9Q3RhVkqBPYmrbPui9XGNXOT7CJHYQR1cj xuLmhpGjnpEDoC6rw+7SiGSuRgpbd4ImoxcwxAIilut5Uzsm0mgH5KY24PgOygO+SK5w AQ4Q== 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=F4UFhBPi85uGjTpVfh/wajCmQJYqTYaAQXsv9TQCqxw=; b=BKu7IkLRuv7gQjv15QG997www0Xh+DZyRIuEqQcG1W7g/8dpQRuvwtJQwxS8YpSr2j BAD3BnFHI1i//2VcfdW3Ui289iuBwz9uERt9/oabjuroIWOeGtOx8M3Vtvt2FJES4cri vM4Em36pwsJjiQgGg17CQ3xOSrVXypk89sZN8MHIjoXC4zLCqv5uB+JWD0x0rWNVxmn0 25Ep4ip6Mjs2xfx2NGdeePIxG35MGY5gNdH9itMYzOvwarWOYnWoNwgiuUyY2eJcAIrH 7fI71qIlsNwd6OvSOg3P6QElGu3rzlLWh0sZW2TfQCHXuhM/BfkkbsSFZn99+wH2jw0x k+qQ== 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 u13si69468otg.56.2020.03.03.15.26.35; Tue, 03 Mar 2020 15:26:48 -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 S1728292AbgCCXZB (ORCPT + 99 others); Tue, 3 Mar 2020 18:25:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:37146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728079AbgCCXZB (ORCPT ); Tue, 3 Mar 2020 18:25:01 -0500 Received: from gandalf.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 369D120716; Tue, 3 Mar 2020 23:25:00 +0000 (UTC) Date: Tue, 3 Mar 2020 18:24:58 -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: <20200303182458.1210c3bc@gandalf.local.home> In-Reply-To: <158310134594.5508.5362429296192213548@skylake-alporthouse-com> References: <20200301155248.4132645-1-chris@chris-wilson.co.uk> <20200301131816.277dd398@oasis.local.home> <158310134594.5508.5362429296192213548@skylake-alporthouse-com> 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, 01 Mar 2020 22:22:25 +0000 Chris Wilson wrote: > Quoting Steven Rostedt (2020-03-01 18:18:16) > > 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. > > Do you really want a few thousand (or even tens) i915-client-%d? That > does not particularly seem like it adds ease-of-use, and would need to be > restricted to the client [or root]. The intent is for the client to have > a private channel for detailed debug/error reporting of its own calls > into the kernel. Fair enough, I would still want "trace_array_create()" to take a name. If it is NULL, it becomes anonymous, but if you want it to appear in the tracing directory, you can add a name to it. Again, adding kernel doc comments to the global functions is still necessary. -- Steve