From patchwork Tue Aug 20 21:48:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Xu X-Patchwork-Id: 1150394 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Original-To: incoming-bpf@patchwork.ozlabs.org Delivered-To: patchwork-incoming-bpf@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=bpf-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="kP5EwCsV"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="WfM15Iqi"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46Ckvt055Vz9sNp for ; Wed, 21 Aug 2019 07:49:14 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730875AbfHTVtF (ORCPT ); Tue, 20 Aug 2019 17:49:05 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:45801 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730430AbfHTVtF (ORCPT ); Tue, 20 Aug 2019 17:49:05 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 10C852D24; Tue, 20 Aug 2019 17:49:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 20 Aug 2019 17:49:05 -0400 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=fm1; bh=z4oOh2xhhsCcC my3nCpcf0gr83yq5CvcoHQWJ/otDsI=; b=kP5EwCsV6T27tUgWYdhlESnp9q+j5 kT9++Hy70YvWqWRh6EirRf0AEeVUKO7Vr+GMwG9683xnv5zWXbH7Qrm+aUMp/c+6 Mkxs0dlnRO0uB+aAHtvWtfh3PsSxwwtxiLlvRWEksKEEWxbGu8WTDOfrh5YqymEU 5Xw36ToJEe0fUfb/fwalkQleSEpICjofhdl9eMdJcJKy2j1frTgMuC4kxlDvr3Gd MZyU5fRoDbu54NbNte7JfZeZf653SG7GuSWsGAPGfOr+Dxdsfv0uM6tcvcwiEy9m 3Ur7hnsE930rFw1U9WEsODkw81YZndKbvB70PqnImWEU0eUSnjIO3QpwQ== 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= fm3; bh=z4oOh2xhhsCcCmy3nCpcf0gr83yq5CvcoHQWJ/otDsI=; b=WfM15Iqi RTL6PLoBQp1vEzQkU2BOzTG748uaN4yNlgzNDa9c1jN17XnI0lI/fAKGhd0yM2Ai DNqxIuQa/gMkhZ0LfmzsKwQMaz7A700ZpHRzNiiN9bEFDlZZ/N0qxK90BSaf/Xqb 97eYFGWshZVctDWGoWPPR+NKcNEf8tZ7JdWgqzPqtBxTQd8WKqXTkjdC29X0U269 jYOEJuOfvh3MzFRIljWqwq4ct/uZiR12CNCepDgQIxWaqIceE5aObsBl+aFZO/2i NCnlszeGoYRWSqkyX2xsq94zXjngzp3/ehu3u6Jms/qlZmzAcanDawGIVP82oOc5 WChN8O+Wt+2jkQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudegvddgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvf fufffkofgjfhgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucgiuhcuoegu gihusegugihuuhhurdighiiiqeenucfkphepudelledrvddtuddrieegrddvnecurfgrrh grmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiiinecuvehluhhsthgvrhfu ihiivgepud X-ME-Proxy: Received: from dlxu-fedora-R90QNFJV.thefacebook.com (unknown [199.201.64.2]) by mail.messagingengine.com (Postfix) with ESMTPA id 08CCB80064; Tue, 20 Aug 2019 17:49:02 -0400 (EDT) From: Daniel Xu To: bpf@vger.kernel.org, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, peterz@infradead.org, mingo@redhat.com, acme@kernel.org Cc: Daniel Xu , ast@fb.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v4 bpf-next 3/4] tracing/probe: Sync perf_event.h to tools Date: Tue, 20 Aug 2019 14:48:18 -0700 Message-Id: <20190820214819.16154-4-dxu@dxuuu.xyz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190820214819.16154-1-dxu@dxuuu.xyz> References: <20190820214819.16154-1-dxu@dxuuu.xyz> MIME-Version: 1.0 Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Signed-off-by: Daniel Xu --- tools/include/uapi/linux/perf_event.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 7198ddd0c6b1..8783d29a807a 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -447,6 +447,28 @@ struct perf_event_query_bpf { __u32 ids[0]; }; +/* + * Structure used by below PERF_EVENT_IOC_QUERY_PROBE command + * to query information about the probe attached to the perf + * event. Currently only supports [uk]probes. + */ +struct perf_event_query_probe { + /* + * Size of structure for forward/backward compatibility + */ + __u64 size; + /* + * Set by the kernel to indicate number of times this probe + * was temporarily disabled + */ + __u64 nmissed; + /* + * Set by the kernel to indicate number of times this probe + * was hit + */ + __u64 nhit; +}; + /* * Ioctls that can be done on a perf event fd: */ @@ -462,6 +484,7 @@ struct perf_event_query_bpf { #define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32) #define PERF_EVENT_IOC_QUERY_BPF _IOWR('$', 10, struct perf_event_query_bpf *) #define PERF_EVENT_IOC_MODIFY_ATTRIBUTES _IOW('$', 11, struct perf_event_attr *) +#define PERF_EVENT_IOC_QUERY_PROBE _IOR('$', 12, struct perf_event_query_probe *) enum perf_event_ioc_flags { PERF_IOC_FLAG_GROUP = 1U << 0,