Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1434939rwr; Thu, 27 Apr 2023 18:23:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WvhybZLr34z9kzcjOTVCSxKwXf55XltPd6Sd4CraZNjBgfjdyriDvI3oz8RXZZZBmsIJo X-Received: by 2002:a17:903:11c6:b0:1a0:48c6:3b43 with SMTP id q6-20020a17090311c600b001a048c63b43mr3901824plh.37.1682645013950; Thu, 27 Apr 2023 18:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682645013; cv=none; d=google.com; s=arc-20160816; b=s0TIXQdhIAr3OAy84j5qpf93WaSu/WUiFTFkE3CE9Zm/V7or1G1aI1SzmORhoi4V0O rQoMVpm0rV98jf4OZ94DbIKEduP+b68OCiSRZwCM3AsI01JBmvL6O1uLQFxFfQThI9qS LJ8I6w8jiSqkHm/Yj+3snuB7anDRIAuwK55oVwew8V8VMHFCAVAr42P2vmjCO2QzOw6R Vb2lFBQxOIGOdMOVAHtpWD7NAtr9ZoHoqA6TB1ljvI8s2t8vVmp2DXnZGhl8f6AxUTsE OgA1+7m8Grb3z7U/fNVyRleoetZbiOBIcZ6FKQyDHcexBUs8Iz26jhdrSWRUZPXmmWQS FfuA== 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 :dkim-signature; bh=M3RAJwSuiAdBlbMj6VeoDLZbRMNFrhFX65sfS4WdX2w=; b=yD5NCLubW6fjDI+SfeKRuXNjRS439LX/J6bD9z05czQgJb1hWK6xhSJWQrRiuSSFi7 cdJaLY7mq6QCx3Tl77HASm7MNkl0f3Nq5nC3GWUWkPJh0Lsu0LmDhtHMDjexZoh4qywh ci1QsXPxVYuZdQH8MXajgf5gjSPDOSPXx/fcPw/QN6GQXfpZyRPBtjR85/osvyaEi3km rCFhVQHYLwORTQyaugFRkBUmK0i/+K4Ti99NknWfhQ/knMGfjTNULVCdGhGou2FWet3L gKIxj+KoW/SJ4QcjcBD0oX1wZvHPgskSHI5cq9jNm3yTS3QfX9hUErjC2TUUZC/jDr3z uSog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dNXwIngT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a170903111000b001a23bf7a7b9si17161144plh.501.2023.04.27.18.23.20; Thu, 27 Apr 2023 18:23:33 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dNXwIngT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344746AbjD1BWc (ORCPT + 99 others); Thu, 27 Apr 2023 21:22:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344303AbjD1BWa (ORCPT ); Thu, 27 Apr 2023 21:22:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11AAB212D; Thu, 27 Apr 2023 18:22:30 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9DAF461DE4; Fri, 28 Apr 2023 01:22:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9654CC433D2; Fri, 28 Apr 2023 01:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682644949; bh=XaCC5NAJmW00ZGy4LFRYDHsTuAomILBmil6dBGf4mvo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dNXwIngTdD4iZDNgfN3c43qvxxIFCrRA904hegsAfZ+yYn2b+JkdXk68VVKTlX53r npFYhrwGCm926XQvWBcJF2FaS9+sL05EjDN/J4w31qNiDRIAqklnGx3dq1evuz54nh oSM2mJDogYbDpRp2WCPZcjVMgjYBPrwvaKxebMPWw7BzJLQUpJZ+IFUbU5j9WKEAlA HwKalIldF9ve0bGPnIu0PraNW96XOV6NysRYw7OWac5PRJSaBnCrZSRVRDO+gGtkMR 115mSA945fJc8d3tmYZ8qVfW8QsAcTBDpcldXg8Zggtl9uc6h3jPH4wrBFFdKkU1FP UJS4hXbTb7J0Q== Date: Fri, 28 Apr 2023 10:22:24 +0900 From: Masami Hiramatsu (Google) To: Jiri Olsa Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Florent Revest , Mark Rutland , Will Deacon , Mathieu Desnoyers , Martin KaFai Lau , bpf@vger.kernel.org Subject: Re: [PATCH v7 04/11] tracing/probes: Add tracepoint support on fprobe_events Message-Id: <20230428102224.061dfbc9a925ab550cb978a8@kernel.org> In-Reply-To: References: <168255826500.2565678.17719875734305974633.stgit@mhiramat.roam.corp.google.com> <168255830406.2565678.710162679499561673.stgit@mhiramat.roam.corp.google.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; 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.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,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 On Thu, 27 Apr 2023 13:59:03 +0200 Jiri Olsa wrote: > On Thu, Apr 27, 2023 at 10:18:24AM +0900, Masami Hiramatsu (Google) wrote: > > SNIP > > > ret = traceprobe_parse_probe_arg(&ep->tp, i, argv[i], flags); > > diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c > > index 0049d9ef2402..7c8be8a3616f 100644 > > --- a/kernel/trace/trace_fprobe.c > > +++ b/kernel/trace/trace_fprobe.c > > @@ -9,6 +9,7 @@ > > #include > > #include > > #include > > +#include > > #include > > > > #include "trace_dynevent.h" > > @@ -17,6 +18,7 @@ > > #include "trace_probe_tmpl.h" > > > > #define FPROBE_EVENT_SYSTEM "fprobes" > > +#define TRACEPOINT_EVENT_SYSTEM "tracepoints" > > so the created tracepoints go under 'events/tracepoints' directory, > should the name be more fprobe specific? like under 'events/fprobe/tracepoints' ? No, because trace event only support single-level class directory, and I think this can provide a more abstract interface to the user. Thanks, > > jirka > > > #define RETHOOK_MAXACTIVE_MAX 4096 > > > > static int trace_fprobe_create(const char *raw_command); > > @@ -41,6 +43,8 @@ struct trace_fprobe { > > struct dyn_event devent; > > struct fprobe fp; > > const char *symbol; > > + struct tracepoint *tpoint; > > + struct module *mod; > > struct trace_probe tp; > > }; > > > > @@ -68,6 +72,11 @@ static bool trace_fprobe_is_return(struct trace_fprobe *tf) > > return tf->fp.exit_handler != NULL; > > } > > > > +static bool trace_fprobe_is_tracepoint(struct trace_fprobe *tf) > > +{ > > + return tf->tpoint != NULL; > > +} > > + > > SNIP -- Masami Hiramatsu (Google)