From nobody Sun Feb 8 03:37:47 2026 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 96A6F280CF8 for ; Wed, 23 Apr 2025 16:39:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745426383; cv=none; b=JnfAJsk1b/739SVlrOrQtZo37oCG9qUOP8uMmFBmKgGFDdrIsZQ/n3OXOOVZHxJE4HEpraKeXwA9VCLX+JMKz027hA235pD7eXbWZeUgqvmZ184uF5awVy8Birv9ObHDuKFdmYc6hAYPRTHWOVjkhWpXpEfK0dMfanPHGkq/CKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745426383; c=relaxed/simple; bh=zimmtmD99dnKOyLRfPg8967hyoaxqnN7TpuZFvJE1AI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UhcGPH62jo73v70biXvTSFcBijo68JfJk/Q14DOYBYqZd9O/QH87PyJZzGMyTydIHxVuNkoicWd+Zk/2aCAmWxVZszpEMcyUboRuFM2Y6mr6LKB9eMxLJG5KfTxtmHY+B918nG/ULrPoTPgibICftFd4Df4ks9+F/iBdQrp0l7E= 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=TeuGcN4E; arc=none smtp.client-ip=95.215.58.174 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="TeuGcN4E" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1745426367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4prA7EimAOb2F+VNMeXtULfXBkke0SBTV6754I0x+3g=; b=TeuGcN4Eifto+uSARFYL3HRAVc3zM6KG+WXqFy324+0jfPEfa/zr0zQ6nJ6PVOaiUs6vff idLXmyTH3DEWRYo8tmT/XHY5PLH5kyg0f3c5muKKJMKSQB3/9Su8COvK5g10mqy2NmWULf Z8VUXd/RtSdUykPOTbNHAz+Myql08AY= From: Tao Chen To: andrii@kernel.org, eddyz87@gmail.com, ast@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com, jolsa@kernel.org Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Tao Chen , Namhyung Kim Subject: [PATCH bpf-next] libbpf: remove sample_period init in perf_buffer Date: Thu, 24 Apr 2025 00:39:01 +0800 Message-Id: <20250423163901.2983689-1-chen.dylane@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" It seems that sample_period no used in perf buffer, actually only wakeup_events valid about events aggregation for wakeup. So remove it to avoid causing confusion. Fixes: fb84b8224655 ("libbpf: add perf buffer API") Acked-by: Jiri Olsa Acked-by: Namhyung Kim Signed-off-by: Tao Chen --- tools/lib/bpf/libbpf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 194809da5172..1830e3c011a5 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -13306,7 +13306,6 @@ struct perf_buffer *perf_buffer__new(int map_fd, si= ze_t page_cnt, attr.config =3D PERF_COUNT_SW_BPF_OUTPUT; attr.type =3D PERF_TYPE_SOFTWARE; attr.sample_type =3D PERF_SAMPLE_RAW; - attr.sample_period =3D sample_period; attr.wakeup_events =3D sample_period; =20 p.attr =3D &attr; --=20 2.43.0