Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1069631rwi; Thu, 20 Oct 2022 08:18:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4joZmM0IASSbuNuh/L5LUVQE91Bo2R2AMGifNYQGSM/wOa2sHgQCXUNMqZ73vMwXNo1yrt X-Received: by 2002:a17:907:94c3:b0:78e:2866:f89f with SMTP id dn3-20020a17090794c300b0078e2866f89fmr11172178ejc.617.1666279123913; Thu, 20 Oct 2022 08:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666279123; cv=none; d=google.com; s=arc-20160816; b=RKr5XAUKv9eXIlYAEclKg7dGvXmX4miViV5PFczezJwk2K7pXmb605PyWQZmGUcGNX gUgSVUdhgtM9FHaE+QvDcfIPs1Kxloyr2Rl+r7XRruGuuaiBR2FFWkgVWDj2F84Zy1iB jxD6uHW2CTJoGEdcELkidt+CXn4j+7fwM7kkoioG7bBhh+rWN3RQuWqW7SJYNt0f9mkB kRJDiSkfeSyYcd7CfQ2z8BaujSvySpQhdjuD/ALixPQsoo3MYBrFD6Dt76SS9jwMeCXC izRp40r37bZUTSksSyeFs3Rqg1pXXtQTRnfqBdvn4pB2taImc8crdNAcowAF12HzolfZ Nvwg== 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=zdzDJIqHIbcyLOrL9d4O0lTZ2NcPIMqKvl0w7ToAMvE=; b=0KLj1Cn53lU8s/sjqy+AZhs/kY7KDl97kkG62oOvw16k1+5XAs3+KY3Fu7xph0G6E5 pCMuZdQcEEoHSY/EQpPauy370yLL4lqhBveBLQw3u8B6jCpyJj1vzz0p40jzPNLsUO9T EUc/6KLN/4wyT8nSN+7djaOCG3+CWtOaW3MVXacq7frLlzGAixJBRedAtjR0srv3e9VQ XV9K6EeAlENld/I1dzWOsloO0zFqn6idrNO0JPd/01SHP0Jz8saU+Os0LUjweIYXuM8v VAFLg+p3D8rhSyGp0KhVwR3w4g6ITeVGbbkT1Nvd5CRC/ISCHgFy+dTSuVxb7VT1ur1+ 0trA== 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 ds4-20020a170907724400b0078e13cf5b1fsi18888044ejc.34.2022.10.20.08.18.18; Thu, 20 Oct 2022 08:18:43 -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 S229923AbiJTPOp (ORCPT + 99 others); Thu, 20 Oct 2022 11:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbiJTPOl (ORCPT ); Thu, 20 Oct 2022 11:14:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBB4F2CDE7; Thu, 20 Oct 2022 08:14:38 -0700 (PDT) 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 83128B8279A; Thu, 20 Oct 2022 15:14:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87859C433D7; Thu, 20 Oct 2022 15:14:35 +0000 (UTC) Date: Thu, 20 Oct 2022 11:14:39 -0400 From: Steven Rostedt To: richard clark Cc: bristot@kernel.org, linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Question about 'for_each_kernel_tracepoint(...)' function Message-ID: <20221020111439.76e72230@gandalf.local.home> In-Reply-To: References: 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 Thu, 20 Oct 2022 17:32:57 +0800 richard clark wrote: > Hi, > Can this function only find the trace points defined in the kernel It should find all tracepoints. > image? I want to define a trace event in my kernel module A, then B > module to register a probe callback function for that event TP in A. I > want to kick off a timer in A and call the traced function > periodically, thus I can monitor the events happening in A from B. You could also export the tracepoint from A and reference it directly in B. > > Can I do that, is it possible? > Try it and find out. Why ask? -- Steve