Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3971116pxb; Tue, 19 Apr 2022 13:53:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL9DIP6UBvCn6bUzU+xTuiKvGaCZeENEPhX0eQi4jpROYU8sobaBNmRLaI1s4j8+oYQq/y X-Received: by 2002:aa7:d39a:0:b0:41d:828d:c75 with SMTP id x26-20020aa7d39a000000b0041d828d0c75mr19736778edq.27.1650401611719; Tue, 19 Apr 2022 13:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650401611; cv=none; d=google.com; s=arc-20160816; b=kNhiG5fRTf4hZ7l3uau6A7ggEUEfcQUyN5H6ZCPQ/yS7fnvSJQUdnLr7rVfbtEs/ua UNPbP62of/4VI1ZkSl7LE5I9oVMJ+FRhErxBhOHP+VXwnXNxj2llYo+8B4cunZQvXPat cNPOZFLirdgU++QMbYzr6dpPD1dqBjJus45G+EMJjYqWXwF4b9QTU3eOIg/mb27kgqKT fjMDpgqapqSszumc6GQIfAUfyCsUJPWQZPSPBnbE5z+bCBptmBwHRIOa0GB6oX4RInvb /R7HutL9Zz1s1Dp2CWnUHjAnsrzmbPfIa6yUsuPE1FXwl5aIciwXQ0v5x3MnQs9L+5k5 E3uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=T4lbV1Nd1bWim71vsqpoRZgb2AeFFU4JzidY392ATyU=; b=YCjzb365wiVVmn5qAGnws3DN3yqkq3r7G2zOypHOXy9o5pdINd9OmnNCI5qw2zEK4G FX345fL1p6hoP/FoTsaMaA6oW4mVLhVPmR0B1C/K0x9E++oK6/hPiLYExn+WYItpwwfg jgc2OMrLTpQAS5XbOmsPh9YPoZ7gziGz7dzboOpjSnkjWp+2/3RNQca4dDO+HuHGFQtX S1sEpjFh/W2vJdQNNQopYqcIqZSpRsWPQ3r6xgcTIW1egs0Mh+3luxcns6Oreojsko+n PqTSxdffOVj9kMVlIJdOREDVu/kZmUmcxc5uYGkAkRObOG4atUx68Ld0ij5tWy3HZt12 SR8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a170906824b00b006e89e29235csi232677ejx.579.2022.04.19.13.52.57; Tue, 19 Apr 2022 13:53:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347826AbiDRU4J (ORCPT + 99 others); Mon, 18 Apr 2022 16:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231984AbiDRU4H (ORCPT ); Mon, 18 Apr 2022 16:56:07 -0400 X-Greylist: delayed 586 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 18 Apr 2022 13:53:26 PDT Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 797E022BD9 for ; Mon, 18 Apr 2022 13:53:26 -0700 (PDT) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4KhzRW3NyFz9sRj; Mon, 18 Apr 2022 22:43:35 +0200 (CEST) Date: Mon, 18 Apr 2022 22:43:29 +0200 From: Hagen Paul Pfeifer To: Beau Belgrave Cc: rostedt@goodmis.org, mhiramat@kernel.org, linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Desnoyers Subject: Re: [PATCH v8 00/12] user_events: Enable user processes to create and write to trace events Message-ID: References: <20211216173511.10390-1-beaub@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211216173511.10390-1-beaub@linux.microsoft.com> X-Key-Id: 98350C22 X-Key-Fingerprint: 490F 557B 6C48 6D7E 5706 2EA2 4A22 8D45 9835 0C22 X-GPG-Key: gpg --recv-keys --keyserver wwwkeys.eu.pgp.net 98350C22 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Beau Belgrave | 2021-12-16 09:34:59 [-0800]: >The typical scenario is on process start to mmap user_events_status. Processes >then register the events they plan to use via the REG ioctl. The ioctl reads >and updates the passed in user_reg struct. The status_index of the struct is >used to know the byte in the status page to check for that event. The >write_index of the struct is used to describe that event when writing out to >the fd that was used for the ioctl call. The data must always include this >index first when writing out data for an event. Data can be written either by >write() or by writev(). Hey Beau, a little bit late to the party. A few questions from my side: What are the exact weak points of USDT compared to User Events that stand in the way of further extend USDT (in a non-compatible way, sure, just as an different approach!)? The nice thing about USDT is that I can search for all possible probes of the system via "find / | readelf | ". Since they are listed in a dedicated ELF section (.note.stapsdt) - they are visible & transparent. I can also map a hierarchy/structure in Executable/DSO via clever choice of names. The big disadvantage of USDT is the lack of type information, but from a registration, explicit point of view, they are nice. Or in other words: why not extends the USDT approach? Why not u32 val = 23; const char *garbage = "tracestring"; DYNAMIC_TRACE_PROBE2("foo:bar", val, u32, garbage, cstring); Sure, the argument names, here "val" and "garbage" should also be saved. I also like the "just one additional header to the project to get things running" (#include "sdt.h"). Sure, a DYNAMIC_TRACE_IS_ACTIVE("foo:bar") would be great. But in fact we have never needed that in the past. hgn