Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1095468ybl; Thu, 23 Jan 2020 13:30:01 -0800 (PST) X-Google-Smtp-Source: APXvYqz+K3CFH00TVxHIfWwzVmc7o4u2FFT4OgN1X3LJ3xSTWyg2+TkNLYLYhJHhAYSH29Vp3UQ4 X-Received: by 2002:a05:6830:14d9:: with SMTP id t25mr324294otq.258.1579815001153; Thu, 23 Jan 2020 13:30:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579815001; cv=none; d=google.com; s=arc-20160816; b=nUdrp8MO+Ijute4AZzGNSnvXgQANF/8Elr11dHgQrMhsCZv9sJuklYvNInTuuuRcXc jrB7iKOJhc7J1z8nvoFN55hg5S+pyF/o6M1yUhotMD4ur9GAFc+5RCn5R59fynsaZ9A0 IJoqUAkmuFtt99NJ54ENDPBe3gS/VvkGefwkjCUWbSjRX3WrjnxEcSgi+tyLD5HKpqea Senxkt43oWV47ZtEWmzTs2gNgQbulOLop4jNK2CxozdXXXy3iG8+s8UUhm/IXd72fL88 nDkZRhdJAq+sNQAlhxfaT60hUfsINKkUZvf4NCj1a6QCyifYcVqJaI6fapMWeq83d2Hj fH/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=i2TbaaLRbCuDS5CihmwELlkML+zGJC6EN5XnNvRO3WY=; b=VfVMNreEwALWQMchNLcqpCfuvZC6rjcN/O3ZdZbTHnv3eH7tcsPmVxGrK2OS8z1sKF 7iO6bP0nfRaSHfqNbRaTWjgQ8EaNqRBMj5eedGIL31j8okuaYXrm//VGS6feze2NDX88 /4+cvYr27H6gWs873ICirgwCRx4Gk7dOEAzbWakd0Yt61xqhwn+9EaYt4zOD41ISDnqF PM+wZ23yhsN1ZXHMzMcpmSvApMELJ4lrZArf8+w2pbUfnsWBGXS1arhF6q2A6YOK/dIz w2VN56rruC2J0yVS+xvRFoj19NXRd9nx//xFdRqut8cQxi1fFuD28qqLI6Rs9G22Tkik uevw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm2 header.b=BmcQl186; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=NYWc3pN9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x26si1369223oie.73.2020.01.23.13.29.49; Thu, 23 Jan 2020 13:30:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm2 header.b=BmcQl186; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=NYWc3pN9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729590AbgAWVXt (ORCPT + 99 others); Thu, 23 Jan 2020 16:23:49 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:44453 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728765AbgAWVXl (ORCPT ); Thu, 23 Jan 2020 16:23:41 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 9B82A5F91; Thu, 23 Jan 2020 16:23:40 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 23 Jan 2020 16:23:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=i2TbaaLRbCuDS 5CihmwELlkML+zGJC6EN5XnNvRO3WY=; b=BmcQl186+HHoH0Gc6tj0f2bHqulnA o13G5rDPgIg8yUEvyinOXBnrnQktIHKXMU9vzaujM6BeWpG/BghQv2bPl+L4VoM2 eFLg3sFHrdRdFYcmLiIaF8s9RmJjrl0DfmgI/hqnn+AZQWphvPoPnQtVR8a2/Z8O Wf899bJkjtH8oeFkv67N9U2CSgYzUE8lQZ2TVs9buT4o9OFYk/17bw4A17ybKBkp bJju5rZgr8vLteVBBCjpijU9nBw/G/XA/wHX/MF1XZwsKxaBZXxn3PIRFfpOBMYN etLuSXpS3IJ/vrFVXx1kxJtQX7bVFFJpQs8J/0/3US+vOEnN+27ncaAuw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=i2TbaaLRbCuDS5CihmwELlkML+zGJC6EN5XnNvRO3WY=; b=NYWc3pN9 GCDQoQoAiu5AwTwk2oN3HZ/yuhYEOHs3bTUKDQ5TeWAWoiKU1BBBdE0mWL0to4o8 2c3y6eBNm6D3XYouCYfj/Hh3NeevNSIXI8k++MTAwvhAizZ8mPcWeGwr0RGASW5W vuBEoWp/QuGnYRDUn/MYoBSq0QMGf0XTpbYx3CleN1dWqEbiGCrRbuClzfyZtNFD eS60/jzZPTI8dSQqeDUXUPcYomUVd5g7rgcyjwn2o3YV/UkaehAffyYp0cT103/z PydzRQndcbc+8npMt9iIUA393FX1ghoofKHH6Gt3pQZAxbHISz1DRNMUXAxcnDeg HBAOcUKglln/Tg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddvgdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhephffvuf ffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffrghnihgvlhcuighuuceougig uhesugiguhhuuhdrgiihiieqnecukfhppeduleelrddvtddurdeigedrudefheenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugihu uhhurdighiii X-ME-Proxy: Received: from dlxu-fedora-R90QNFJV.thefacebook.com (unknown [199.201.64.135]) by mail.messagingengine.com (Postfix) with ESMTPA id 301283060AA8; Thu, 23 Jan 2020 16:23:39 -0500 (EST) From: Daniel Xu To: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, songliubraving@fb.com, yhs@fb.com, andriin@fb.com Cc: Daniel Xu , linux-kernel@vger.kernel.org, kernel-team@fb.com, peterz@infradead.org, mingo@redhat.com, acme@kernel.org Subject: [PATCH v3 bpf-next 2/3] tools/bpf: Sync uapi header bpf.h Date: Thu, 23 Jan 2020 13:23:11 -0800 Message-Id: <20200123212312.3963-3-dxu@dxuuu.xyz> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200123212312.3963-1-dxu@dxuuu.xyz> References: <20200123212312.3963-1-dxu@dxuuu.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Daniel Xu --- tools/include/uapi/linux/bpf.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f1d74a2bd234..50c580c8a201 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -2892,6 +2892,18 @@ union bpf_attr { * Obtain the 64bit jiffies * Return * The 64 bit jiffies + * + * int bpf_perf_prog_read_branches(struct bpf_perf_event_data *ctx, void *buf, u32 buf_size) + * Description + * For en eBPF program attached to a perf event, retrieve the + * branch records (struct perf_branch_entry) associated to *ctx* + * and store it in the buffer pointed by *buf* up to size + * *buf_size* bytes. + * + * Any unused parts of *buf* will be filled with zeros. + * Return + * On success, number of bytes written to *buf*. On error, a + * negative value. */ #define __BPF_FUNC_MAPPER(FN) \ FN(unspec), \ @@ -3012,7 +3024,8 @@ union bpf_attr { FN(probe_read_kernel_str), \ FN(tcp_send_ack), \ FN(send_signal_thread), \ - FN(jiffies64), + FN(jiffies64), \ + FN(perf_prog_read_branches), /* integer value in 'imm' field of BPF_CALL instruction selects which helper * function eBPF program intends to call -- 2.21.1