From patchwork Fri Aug 16 22:31:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Xu X-Patchwork-Id: 1148482 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="sBi2zD9k"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="YON8VEx/"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 469J3W0cVdz9sN6 for ; Sat, 17 Aug 2019 08:32:23 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727908AbfHPWcW (ORCPT ); Fri, 16 Aug 2019 18:32:22 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:42903 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbfHPWcV (ORCPT ); Fri, 16 Aug 2019 18:32:21 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id C9A75209B; Fri, 16 Aug 2019 18:32:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 16 Aug 2019 18:32:20 -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=jMcpWT3BOBrXz HHXvcq6IicYWXcTtdD131rXZuAKD/k=; b=sBi2zD9kXPOlU5CRSdZQOqZG92xVV udytZmUiUas0dHf3S5eUTR7aD5s57b6eTKMVuxt/MuIAhDG9ii0sXYsnMMz/ZdhA W0l5YEPIKgtIuHZjEtJe+d34fxltyO11agaxXwomPISjwh5gXFiOq/p2ktcRheOi RBgSSnJf6XbpeRxKdB8U0Gz9XabpsO7MduiZY+X7+ynSsYwCcFDDIJRmZxBXvYGO zIEgZrF3RmzZT0gB29jBcpg7QLRNEhCcuRM+09IOeYVeGHMy8s/xbA/rCSoX9bFo ZTFrjnVf5Gpon9m+NZBP/cg/cEYfjuUXrS5DHKH4GJWwICGeZLeW/2ThA== 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=jMcpWT3BOBrXzHHXvcq6IicYWXcTtdD131rXZuAKD/k=; b=YON8VEx/ txy7eXFH0RSC5B7+xW2N7rwgULBKKA/0iCMnuq+rQZ49KcHRoMa6vFwm2gZVVm4i 0IiDJBwOt8oQa9XUl3cSaPB039qkTrELOlRCABJf8AOZ3EI+fplO/P0VAA09uL0E qy8GimGdXXRtAhG2OjMQKJyiydYDEBQiCwvVZ/2YkOcADaf8sXGObsoB6Z9Q1oPv tXwNK3jP4jmRjyjtx1RJV09uguCdPc9/7Nk41OuROBwpV3zkWfP8U5y9QRl2BXZo dOgKMUzbXJhHwlVOCPTIdnJ5xB6xxlvoJHKE7/w+QBlOOhZdgwT8oREJv072R/PA yUSqe5892qAwqw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudefgedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvf fufffkofgjfhgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucgiuhcuoegu gihusegugihuuhhurdighiiiqeenucfkphepudelledrvddtuddrieegrddufeeknecurf grrhgrmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiiinecuvehluhhsthgv rhfuihiivgeptd X-ME-Proxy: Received: from dlxu-fedora-R90QNFJV.thefacebook.com (unknown [199.201.64.138]) by mail.messagingengine.com (Postfix) with ESMTPA id E8FD080061; Fri, 16 Aug 2019 18:32:18 -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 v3 bpf-next 3/4] tracing/probe: Sync perf_event.h to tools Date: Fri, 16 Aug 2019 15:31:48 -0700 Message-Id: <20190816223149.5714-4-dxu@dxuuu.xyz> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190816223149.5714-1-dxu@dxuuu.xyz> References: <20190816223149.5714-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,