From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84FC0EEA9 for ; Fri, 20 Jun 2025 02:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750387572; cv=none; b=g2GSzyLCvGPKVux92+dbDy63A/NcRCIrAQxCX9c1QxO7/ijkSeFLa9LPfPojwuTuhB5P7nAsMUAFFENOQRO4nvASivzOg5t4Rdl9JMM4H9cmBJHp4ZVN3Y+MEDLG4jsdFpzd/2pKS9T1wDve213btZQelCzN/YXIqAd1vmL9rZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750387572; c=relaxed/simple; bh=t4gjhn+JnmvuUxa3BiFn451KQfDVJ8qO65IO06u1JzM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QI3zNzkaZVb/TNJ6xeNBAan/qOhzrM1fuFpj2zZDiDAEDgOb391WAp6GduzS6B65CX1+7L6OxqTH5beCqIs6ZEXxTSaACseHmcMDQW76PmIyftKesnEwiEP6N69JrCIfs/DDJNHcJCskPAbmBd3c9xX6W/vUbvxqOWmhalm5K68= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=sZQ90c6i; arc=none smtp.client-ip=91.218.175.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="sZQ90c6i" Message-ID: <9eedd830-9222-4ac0-8ccd-72499fb85b13@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1750387568; 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=JwfnmNENQgWbWLAJgNr0YpJvx//VvI8W+nKQ5vtSGrc=; b=sZQ90c6i+iiNiRtu2Qz0X/3N1IrMVKVd+TWCo6maaaR7ZNrJp9XozHb/5e/OnTZNA2i68S S95tBr92dpk9OsyQ/y3xbr6HcVf8fsilk+vjfnBFoiOJZC7uqNS12EXukhEipKxboGOuvY QHEOuiW818H4dZKXUv5SPXnMX2NlXv0= Date: Fri, 20 Jun 2025 10:45:58 +0800 Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v4 2/2] bpf: Add show_fdinfo for kprobe_multi To: Alexei Starovoitov Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Matt Bobrowski , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , bpf , LKML , linux-trace-kernel References: <20250619034257.70520-1-chen.dylane@linux.dev> <20250619034257.70520-2-chen.dylane@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Chen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 在 2025/6/20 01:17, Alexei Starovoitov 写道: > On Wed, Jun 18, 2025 at 8:44 PM Tao Chen wrote: >> >> Show kprobe_multi link info with fdinfo, the info as follows: >> >> link_type: kprobe_multi >> link_id: 1 >> prog_tag: a15b7646cb7f3322 >> prog_id: 21 >> type: kprobe_multi > > .. > >> + seq_printf(seq, >> + "type:\t%s\n" >> + "kprobe_cnt:\t%u\n" >> + "missed:\t%lu\n", >> + kmulti_link->flags == BPF_F_KPROBE_MULTI_RETURN ? "kretprobe_multi" : >> + "kprobe_multi", > > why print the same info twice ? > seq_printf(m, "link_type:\t%s\n", bpf_link_type_strs[type]); > in bpf_link_show_fdinfo() already did it in a cleaner way. > link_type only shows 'kprobe_multi', maybe we can show the format like: // for kretprobe_multi retprobe: true // for kprobe_multi retprobe: false > Same issue in the other patch. > > pw-bot: cr -- Best Regards Tao Chen