Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13360793rwl; Wed, 4 Jan 2023 07:11:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXtTv30onx7v7fxWIMHISNJXHA+jR+kBoygeWS82qIILdfgIiH1RP/bI4uQRaNFs0BzJjLwc X-Received: by 2002:a17:907:a501:b0:7c1:700:1e2d with SMTP id vr1-20020a170907a50100b007c107001e2dmr41514600ejc.20.1672845067292; Wed, 04 Jan 2023 07:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672845067; cv=none; d=google.com; s=arc-20160816; b=CS3bZ7md5xe8F5ig4+YYhN0nY29cldRJDd54lrZ2UQzYnRZM7Io634GhL41R5bIJc3 UDprR8Oop95ttJB0m4pdGLYEIHMZ+yi92kivOGmPci94WJdmv1yFpajoMH85zHbOjln6 LvvKLwbfsIa0ZOrRI6wVS3Or+tlEtxKKRSITpLIm6KuN2v5LVZHGVGGdCEBtofuXZwVx nloFrq1BKYHt8zwWF8UIX1X1rio7+04/UoCYbT4dW4uGjswUd0twydxy5/yVJG5oPpA2 sokDqfezHoZr7p+70LIpLOF/95lid+uaK2LUVT9W0qVuJ9sie+xdXwn7FQz1Q62eMHwm xtMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=vicZwiY8A+ZpO7B++DOr97orrVnzvtZFxguKc9BhwRo=; b=BdhINP+r4321VSg5QMcWVOd23/CDdfztaNd48WJjFZ6pI5EAHHy8AtDDwuQ44gstDg EoFtXILo6Lc9KvtjIU+mOdA+4qqPx9NVpUIb7ldmgDXIXU6WiX+UCtQshnOlH/0TCid9 aWAOlnPJEEkyKke3t44yeJAbcjwYtciuSSy11fUUyWqfrCflVaK3+K2ERj3aeWqz52xv 8bbgJVm2T9QMCz5COBDSF7jORVG2zOHm3c39U0MQwC8KNYreIorHul6dgro2oLm/uWn+ CXjTbL3VtfKnsx+vDBEnOusO+e8sH5Suzb8+LomLAPw3nDkt6+xMQKNmPK7kTLOfcyKp eVgA== 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 hd32-20020a17090796a000b007c6be268253si31826086ejc.608.2023.01.04.07.10.52; Wed, 04 Jan 2023 07:11:07 -0800 (PST) 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 S233197AbjADOzZ (ORCPT + 59 others); Wed, 4 Jan 2023 09:55:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234523AbjADOzX (ORCPT ); Wed, 4 Jan 2023 09:55:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2014619286 for ; Wed, 4 Jan 2023 06:55:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C9228B8169E for ; Wed, 4 Jan 2023 14:55:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96BE1C433F1; Wed, 4 Jan 2023 14:55:18 +0000 (UTC) Date: Wed, 4 Jan 2023 09:55:14 -0500 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: John Stultz , LKML , Lingutla Chandrasekhar , Thomas Gleixner , "Paul E. McKenney" , "Connor O'Brien" , kernel-team@android.com, "J . Avila" Subject: Re: [PATCH] trace: Add trace points for tasklet entry/exit Message-ID: <20230104095514.0481f1d8@gandalf.local.home> In-Reply-To: <20230104232918.2791484c39ac54c59a7110f4@kernel.org> References: <20230103185408.2874345-1-jstultz@google.com> <20230103151554.5c0a6c6f@gandalf.local.home> <20230104232918.2791484c39ac54c59a7110f4@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 On Wed, 4 Jan 2023 23:29:18 +0900 Masami Hiramatsu (Google) wrote: > > # echo 'e:tasklet_info tasklet/tasklet_entry state=+8($tasklet):u64' > dynamic_events > > Hmm, what about saving 'state' and 'count' instead of 'tasklet'? > > I have a question about the basic policy of making a new tracepoint. The policy is to have something that is useful for analysis and debugging ;-) > > Of course we can expand the event with eprobes as you said, but without > eprobe, this 'tasklet' field of this event just exposing a kernel > internal object address. That is useless in most cases. And also the > offset (layout) in the kernel data structure can be changed by some > debug options. We need an external tool to find correct offset (e.g. > perf probe). > > So my question is when adding a new event, whether it should expose a > (address of) related data structure, or expose some value fields of > the structure. IMHO, the basic policy is latter. Of course if the > data structure is enough big and most of its fields are usually not > interesting, it may be better to save the data structure itself. This isn't unprecedented. Lots of tracepoints expose a pointer to a structure. It's useful as that pointer becomes an identifier and can be tracked. The reason I prefer eprobe, is because it prevents anything from making it into a ABI. We should try not exposing internally used fields if possible. By exposing state and count, something can easily depend on those fields as they are then exposed in the format file. Where as, eprobes is just reading offsets of a pointer, and not something that can become ABI, especially because the addresses may change with different compiled options. -- Steve