From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DDA1C4332F for ; Mon, 19 Dec 2022 18:24:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbiLSSYQ (ORCPT ); Mon, 19 Dec 2022 13:24:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231511AbiLSSYP (ORCPT ); Mon, 19 Dec 2022 13:24:15 -0500 Received: from out-105.mta0.migadu.com (out-105.mta0.migadu.com [91.218.175.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4423613D64 for ; Mon, 19 Dec 2022 10:24:14 -0800 (PST) Message-ID: <38a93791-97f1-2fe1-ba1a-04dde1980d85@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1671474252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+UGPwx94LpKP8jsRIP6cLgR4IAZId/6w5Rhk78q8wkk=; b=AU4hiZNIKZUopbCT6qKFNYIQW0Jp/sEZV4+bMwvnte0+7AfNmHU/Op/Ec00KGA/ia3vJrw /iaMkV5x/YVdrJ5PPAztKtcxB/ksLOrd644hnMZ/OcF1Gd93dOJGmoMzbJpvi+oNgT2yFu srzL3i16ckKxPyS7u6sMpav977bKCQA= Date: Mon, 19 Dec 2022 10:24:07 -0800 MIME-Version: 1.0 Subject: Re: [bpf-next v2 1/2] bpf: add runtime stats, max cost Content-Language: en-US To: Tonghao Zhang Cc: Daniel Borkmann , Yonghong Song , bpf@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Hou Tao , Song Liu References: <20221215043217.81368-1-xiangxia.m.yue@gmail.com> <553c4d32-aac1-f5d2-8f39-86cdca1af0d6@meta.com> <425c20bd-9e7e-4fc7-9050-7d9e9bfce972@iogearbox.net> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 12/19/22 12:04 AM, Song Liu wrote: > While max time cost might be useful in some debugging, I don't think > we should add it with kernel.bpf_stats_enabled. Otherwise, we can > argue p50/p90/p99 are also useful in some cases, and some other > metrics are useful in some other cases. These metrics together will > make kernel.bpf_stats_enabled too expensive for the use case above. > > Since the use case is for debugging, have you considered using > some other BPF programs to profile the target BPF program? > Please refer to "bpftool prog profile" or "perf stat -b " for > examples of similar solutions. +1. Please consider other suggested solutions that the same can be done in a more flexible way.