Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2303143rwb; Mon, 15 Aug 2022 02:57:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR45u4jHupueEsicexjK/aTnjIIstz5Cuno/06WIW3YbQRDf4fbw6tUXDE3/Gl58JDUJblO0 X-Received: by 2002:a05:6a00:22d0:b0:52e:49f3:3f52 with SMTP id f16-20020a056a0022d000b0052e49f33f52mr15718417pfj.54.1660557424870; Mon, 15 Aug 2022 02:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660557424; cv=none; d=google.com; s=arc-20160816; b=nJXwhEuNAQ6FEGmleZiFMTtulS9lwS3i/7wS40Rda2P6kMGTgOgPKLU0HmqKWsqeoD eppoMr3tB/5qebcHOy/tVDEWi1oZZAOmGtjWR3s1+DfpW6uCuMLycgr7CaZzneQAoHMW LIdzxb4ykam5sZcB6v9+u2iCkURm+98JHrlqYuGn67YUSsMda4g6/PxFKRQkHft5vZg2 p3sOjEb9E0KmjGaN02yj5kYzhDENadezDuEnCETr33dcG5PjwvH1fdgbzF0nw3A+8PKy LPzMCcjcTmNc5umaSBG/TKLx8vhgnzxH0clZTO9hHLQvxB2tNekTFwMNjwvzPzQq/bWu 9YZw== 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=f6h5YvnnhUBTVA2/77kd5JhLYGCJQmP66s+igL3NlOE=; b=TRQdPF/ji+li35BQgLg/pjuDnStC7jAJUNEYe0Z7Ua92GmYJROVB7kbxOO0HKm5rJR w4UkkEDDzD/u+19AGL4lh903/lx1oym/HFIbMj6aoX4DOXLxM9hiJt9PuftsOCijjVSn AuAVjvJw/yfF/Z9ZBjD/nQt0moy9eXHdV/lqS58HJOZlb0B9XqVRXASZ1TmP/IlpoKSw JoablvOPPgva3uAXlM1zo5pKEKSvUk08+B0bVSUAU3625lG32j2fccb6QCKj/LU1x1vZ aLBxzCSDcNZrSP93XGNfp2mDbQf3T+YPCU+eefQSjdkQSfpcGPpyNtDGuoPib2FnOaYP jGUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jOzwbKkU; 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 j17-20020a17090a7e9100b001f50bbcc59dsi14632133pjl.9.2022.08.15.02.56.53; Mon, 15 Aug 2022 02:57:04 -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=20210112 header.b=jOzwbKkU; 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 S242148AbiHOJoi (ORCPT + 99 others); Mon, 15 Aug 2022 05:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242142AbiHOJoh (ORCPT ); Mon, 15 Aug 2022 05:44:37 -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 72C282250B; Mon, 15 Aug 2022 02:44:36 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id s11so8889896edd.13; Mon, 15 Aug 2022 02:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc; bh=f6h5YvnnhUBTVA2/77kd5JhLYGCJQmP66s+igL3NlOE=; b=jOzwbKkUhnit+kSc3f7FEboyZKhP/xwrtiWbkz9oKw7d4uwnoL+B6BiggWJwUQxlID D+Vm2/azR63JPfbRkBmbJa3taWE/lFYP/Jx64n0k6LvvObmjUrW+NC/PQJzTI+VCWuxh YbPEy7sDt1mNJ+WlZnrMrAPsXq7hYbsBnvvHHmQLqnE5E4ApVy3vg1tnhFRAnNdPFvny lv4FEsyv8uaYjZ22iuBeWAN9EaQ8urRcC2mvc4x8GTzNmdY21douLB1egiG5hs+7cK28 V3jUudGGZgAsIjPyZM291cOAGHNVmdbi6tEUbnicUq866U0EMUXlNfT0ELcDzuOGb8Z3 TVtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc; bh=f6h5YvnnhUBTVA2/77kd5JhLYGCJQmP66s+igL3NlOE=; b=kSaXfShAmxZWujyiPZRrpH6eXRNmokFCPxuHymytGjtwUnIdhj66XzGlUMbdNrkCSU lmlRpa1htOBQK1V0Nc9G6GvEtPCyXEBd/rJE28HqnhKu9gi3V1sqV81sP++E5Pq404WO Qc9u268Ti0CDrvmH4Vesp948V24MFa6eWQF8V11aGdjUj+MOOjDYQVGff6S9WqUD216v 7ME8JJuwOHsUbDAzb53ed+bmDbsQxhxxKZ8Z6JqBS482dgWkanrdvHi5/1l4GI981rxI zwArTRxBcUZc08Www4/XnYCHY0f1V8yurV8AbU9oFMIL0z/d3AhthjW7LzLVwz2Q/eO1 B43Q== X-Gm-Message-State: ACgBeo3VA9R8rJxf/hPew7FFCAjiECtEZV8gLonOUEwhZbtsh/SQHpYR OVZKEsELzPNSpp79/Ibqmf4= X-Received: by 2002:a05:6402:35d5:b0:43d:a02f:cbfb with SMTP id z21-20020a05640235d500b0043da02fcbfbmr13400449edc.275.1660556674984; Mon, 15 Aug 2022 02:44:34 -0700 (PDT) Received: from krava ([193.85.244.190]) by smtp.gmail.com with ESMTPSA id n26-20020a170906379a00b007308fab3eb7sm3844720ejc.195.2022.08.15.02.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 02:44:34 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Mon, 15 Aug 2022 11:44:32 +0200 To: Peter Zijlstra Cc: Steven Rostedt , Jiri Olsa , Alexei Starovoitov , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Ingo Molnar , bpf , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , LKML , Josh Poimboeuf Subject: Re: [RFC] ftrace: Add support to keep some functions out of ftrace Message-ID: References: <20220722072608.17ef543f@rorschach.local.home> <20220722120854.3cc6ec4b@gandalf.local.home> <20220722122548.2db543ca@gandalf.local.home> <20220722174120.688768a3@gandalf.local.home> <20220813150252.5aa63650@rorschach.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Aug 15, 2022 at 10:03:17AM +0200, Peter Zijlstra wrote: > On Sat, Aug 13, 2022 at 03:02:52PM -0400, Steven Rostedt wrote: > > On Fri, 12 Aug 2022 23:18:15 +0200 > > Jiri Olsa wrote: > > > > > the patch below moves the bpf function into sepatate object and switches > > > off the -mrecord-mcount for it.. so the function gets profile call > > > generated but it's not visible to ftrace > > Why ?!? there's bpf dispatcher code that updates bpf_dispatcher_xdp_func function with bpf_arch_text_poke and that can race with ftrace update if the function is traced the idea to solve it is to 'mark' the function independent of ftrace, and add a way to make the function invissible to ftrace but with the profile code fentry call generated jirka