Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2386785rwb; Thu, 29 Sep 2022 09:32:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM600AMTFkkyelVxD2ur+u9IbheoeeX8RYL0bVXWirhWMXloDjw1IcN2fpJxI6+O3OhcEE2U X-Received: by 2002:a17:906:9b83:b0:730:b3ae:343 with SMTP id dd3-20020a1709069b8300b00730b3ae0343mr3501734ejc.670.1664469123239; Thu, 29 Sep 2022 09:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664469123; cv=none; d=google.com; s=arc-20160816; b=w7TjXGmBGa3qLkjUgL8RLuDcaJn9Ug8vo5YxrM6IvplCjiddwibc9LNRwZZ7AWNAAB BkBT7legT8kk9JNLCdkTcavccSjgVYHzbJvNe53ZvO1p94dngn0g/5maxcQAGwP9Gkvm J8vk/wxrzCWn1IEpDKlx87pEtq37ue4dm4qB72BkVBtSZeERG1gwo26ylMr4JslXZYPz /WXB3NEybIxtxzDtrK/QlDGwPcOGQoCtb8Cdl+XvrLMxyCrWkcmc0pXmcHkAfCOKSeUE +HWtSTUoffE05Wd5bZ4qDX+k6kG0e5/xOebqEmrO2MnMv1b8OibzRKNevNGJtc9iakoh lkJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cZG4VxDd4FzBz/EOsma58nLK/qNyK8iWP/Ncqazkjcw=; b=yktuZy785Zo+0OrvfcysMzzw8kWuC5W9kbALzvwRqEN+EZCzXyJB11wg/ZgQr+9MYZ uTm2nV0C3AsM9RJmZ8r1Rw9+Byc0W0Kz935TuGbr+6jaRIaGmrNDE+czqcFvf8QEqCU+ nuL6dg15zS3Sen6DQ4f7wrOlM73v7XlpMMrURr82viDg8N6VoprbouPgnYu01iP9Gl+1 Pk0PxW7fQBuDug1P2ORvvWxycS2oJNasXnRMdvI/olhnaXITXQ/I8lcqAgvIvIesXsbV bpyde1lhsyvTub5apPiNCiyLSRv+1TO8QZICyYYH4EQeFYB9uYndSCVZC32e+l0L+/jt 1SdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ia066oiL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a23-20020a1709063e9700b0078251f3e609si7978929ejj.516.2022.09.29.09.31.37; Thu, 29 Sep 2022 09:32:03 -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=@google.com header.s=20210112 header.b=ia066oiL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236162AbiI2QV5 (ORCPT + 99 others); Thu, 29 Sep 2022 12:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236128AbiI2QUf (ORCPT ); Thu, 29 Sep 2022 12:20:35 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CBFB26AF4 for ; Thu, 29 Sep 2022 09:19:47 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-353fbfa727cso19698747b3.4 for ; Thu, 29 Sep 2022 09:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=cZG4VxDd4FzBz/EOsma58nLK/qNyK8iWP/Ncqazkjcw=; b=ia066oiLFSG4ooKCn0+TTOISUXJotPk/M95/srhxi0SdL8NN7xhHIKFtRLyHlrm9Lo uZY3gmvTBrjkGxQMUqJj4fhop8hYpmzqmQFxAwsuvvR7iNaES//9VjNYrRYuLNnmf+LI XcJi5TwxeuHSWkICh7IYBPrGWzP99gXAW1BGZtOTADuV0wFI6YA4aI5XU2E3t6l21MRE zy3qMaUGKRJ+rybVBZTtZikfGa5WoHeNt48sTKhqzehvu89Ts9mCNce7cZTB1W77OLIN A13pB32QJzEN02VrcxMuUj10iTRUgyj8KN88XdAzgd8nAe+AbujfvW7UKbLLiRlw3888 lLNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=cZG4VxDd4FzBz/EOsma58nLK/qNyK8iWP/Ncqazkjcw=; b=Y27QvT2J0VW54MaMmdJ3UbVkeZcZiqg2jtNRcjLQubXx8wvtfWZsk0oVYeyatZlOYN 2XSj0GU/ECyORm+vmUNkrQGLo2LPjnSOsiQT+yVZMIIhhnMq9eKbv1kFcdSXgEfBfCzW tY2rBfkjZgQyD+MaVHuViiaeZ6ImUcYc5Q/6c39lK49L2HMHBUh0KjsMl6pocgc/xnbm fDJBZJIt2cqq2yHlDEwc2wcC5oTToctTVLwGtVaU4sMnWCPkr9PoMiMeG9reFpDyq81X vPOS+/C/Sr4aruuwkZYSnQwmOiKENYpmGm63uH50RVTXcujnzjqAQmxVWzSpIly907bP doNg== X-Gm-Message-State: ACrzQf1cu+0I85SG6gbgevY1X37YVuljyZCMxaXyJu0nO0dsGecb/Jos 26z3DloTLy2C9VmLQuQGgWlJ0t5cI3i9p0suBJ8nKw== X-Received: by 2002:a81:6756:0:b0:345:525e:38 with SMTP id b83-20020a816756000000b00345525e0038mr4057628ywc.47.1664468386499; Thu, 29 Sep 2022 09:19:46 -0700 (PDT) MIME-Version: 1.0 References: <20220928221514.27350-1-yepeilin.cs@gmail.com> In-Reply-To: <20220928221514.27350-1-yepeilin.cs@gmail.com> From: Eric Dumazet Date: Thu, 29 Sep 2022 09:19:34 -0700 Message-ID: Subject: Re: [PATCH net-next] net/sock: Introduce trace_sk_data_ready() To: Peilin Ye Cc: "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Paolo Abeni , Peilin Ye , Cong Wang , netdev , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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, Sep 28, 2022 at 3:15 PM Peilin Ye wrote: > > From: Peilin Ye > > As suggested by Cong, introduce a tracepoint for all ->sk_data_ready() > and ->saved_data_ready() call sites. For example: > > <...> > cat-7011 [005] ..... 92.018695: sk_data_ready: family=16 protocol=17 func=sock_def_readable > cat-7012 [005] ..... 93.612922: sk_data_ready: family=16 protocol=16 func=sock_def_readable > cat-7013 [005] ..... 94.653854: sk_data_ready: family=16 protocol=16 func=sock_def_readable > <...> > > Suggested-by: Cong Wang > Signed-off-by: Peilin Ye I will not comment on if/why these tracepoints are useful, only on the way you did this work. I would rather split this in two parts. First patch adding and using a common helper. static inline void sock_data_ready(struct sock *sk) { sk->sk_data_ready(sk); } s/sk->sk_data_ready(sk)/sock_data_ready(sk)/ Second patch adding the tracing point once in the helper ? Alternatively, why not add the tracepoint directly in the called functions (we have few of them), instead of all call points ?