Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp540549rwr; Thu, 27 Apr 2023 05:10:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4pgniDcjfz+vbG46AOJI0OO2IRex+mNqdvPRUYnlzOC0q9bHjFTxrXZjSh7YNSVSYT47Gb X-Received: by 2002:a17:903:244b:b0:1a6:5f92:3ba with SMTP id l11-20020a170903244b00b001a65f9203bamr1627292pls.0.1682597449173; Thu, 27 Apr 2023 05:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682597449; cv=none; d=google.com; s=arc-20160816; b=nWUhUwwXspQD9KCo4by8hnAOKxSwb2Fx0kGsoaN2iK9OSqhKdHYTYpXlyyYIzeIlB5 z8+F/wlriJNk/aJ/1C8axxq07PbkD+LTG5GdghPFDWYSoCMX8yt/lYSgFxx4WX2vRumf g12LpJZH9O4CY734Znd50nDaUxC6KuvNzwbNxo6gkzTGBoFktHDjpc560N/dbpqKHYF7 qwMQq2SNkgTpS0WLUyknOAl2GSwdiTf3FbhZKC8L7KvsmHw1uoUcFxAUsED/f8Lv6yME mSryhq9qqdjJYyg3ljbfmBDPMOgqifpIizlYcmVEQW3IIsdCpHKkfHLeqHOlk5hhuBxd yKJQ== 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:date:from:dkim-signature; bh=OIM5opgixvrOYalE8rCsEBOmPPvBNCuLSu9kQtrDeAQ=; b=T3W6H/E3L8XI5gbNGZMRzSFg4EA1JyAgXARtK6ccTrYFd0Qj+jJiuDiNU8CHjCAU16 AzUU11bEzFGIH3REsEZD7zQB22v0FVPQK9M8nrbw0Of8vCJjim1vbk+wt3w/c2Dr5KI9 gxtPXlA+wfbtfnLOhjPy7+uh4U/XMgQyfzbnJ65pcoLfudYpLWXrAIMdpz1tDacGvCf/ J+f+fGnSQHBvOf6uMMW7GvAMdQNzDMOqCL2ifc69BoHa6TgsJeCnP40eUu97g/ECVW0N NmYW6OF5o/AXUGpPM1ud5irtZiRm1dwyLOx0d4Kqa8nP0graoJKseB9YKL33BlLha+a3 XOKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HI8KTtnQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a170903229100b001a6e58380f6si19534530plh.523.2023.04.27.05.10.34; Thu, 27 Apr 2023 05:10:49 -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=@gmail.com header.s=20221208 header.b=HI8KTtnQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243283AbjD0L7M (ORCPT + 99 others); Thu, 27 Apr 2023 07:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243771AbjD0L7K (ORCPT ); Thu, 27 Apr 2023 07:59:10 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCD3E5FCB; Thu, 27 Apr 2023 04:59:07 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-507bdc5ca2aso14786464a12.3; Thu, 27 Apr 2023 04:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682596746; x=1685188746; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=OIM5opgixvrOYalE8rCsEBOmPPvBNCuLSu9kQtrDeAQ=; b=HI8KTtnQHBV1ybyYVgTYdz26k/XYeAgozGRgAxu2OQmy502C2CDtyqPUnws7Of+FDg ajXRiV3AwNW1xHiRHK/S+F5vdi7gitBQp7NioL6eLChKkzOt8JgecVzRhy/kN8DqNJdT 7S04h2e9oQhmGupfLgCrcUmEKLfiY4HuqgN9kyuKQGcz3OpzFDK1lQOtdH3rW1Dfr99K fsjx0uv40Arcim58LyUFivc2BrIm1w6ULBRW6b9R/Thy7a5utJk8WzZWQyfM13IwILTr wEDLr8rMfe5LQH+3jUI0/LscQOBVsIftK5G/DbN2Y7p8UxNrRavQEw8aOBzpEROi/M2w 7Cyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682596746; x=1685188746; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OIM5opgixvrOYalE8rCsEBOmPPvBNCuLSu9kQtrDeAQ=; b=aIvEzO2oPuvz6MNWDDgtxBSVPXm5qiUb7/lLEBaLtAw0cPgUv25wF2SiNn2ORAX5ux hXPj8N0X4V56fDlH6A/DyWWOAAp79coVwqtgyU3c7oagAN6jlQQiSIWwC92WF9aOZg6w e/R/Q4SvUyaw8UzQQ0xtNTbJgJUVDohNgS+Myd/NuY0sQOn3PegY7sPPATRQqB5xi+Yg U0OiWchkq69CnnHVwLjb6Aj6Y6ivKNRmGo9Nceemkp8hvQ5vdXLPcuiOcby3VCyL4iKy E86bSSQ8e4WX5/NWl4r55hO0k+jHsuJ31Jrkdm0XMWGjAp4FfQ3RJSH7yFxUayIe4Ali 3BSg== X-Gm-Message-State: AC+VfDwT12MNFlW5ZHzjlYAXgVVJQjFfeIW4jTEkDYEv61HGVZuMm3+9 fjWR7bNVIOrWKG2/7OQn794= X-Received: by 2002:aa7:d054:0:b0:506:b2a3:a8cd with SMTP id n20-20020aa7d054000000b00506b2a3a8cdmr1215762edo.40.1682596745539; Thu, 27 Apr 2023 04:59:05 -0700 (PDT) Received: from krava (2001-1ae9-1c2-4c00-8b88-53b7-c55c-8535.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:8b88:53b7:c55c:8535]) by smtp.gmail.com with ESMTPSA id o25-20020aa7d3d9000000b00509bd19b869sm6722435edr.48.2023.04.27.04.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 04:59:05 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Thu, 27 Apr 2023 13:59:03 +0200 To: "Masami Hiramatsu (Google)" 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: References: <168255826500.2565678.17719875734305974633.stgit@mhiramat.roam.corp.google.com> <168255830406.2565678.710162679499561673.stgit@mhiramat.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <168255830406.2565678.710162679499561673.stgit@mhiramat.roam.corp.google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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, 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' ? 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