Message ID | 20221103045437.163510-6-irogers@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp321622wru; Wed, 2 Nov 2022 21:59:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM44Enhx4T7vUmxZ3uJjSYXgb0LWcRgGUSzvmDmdG15myAQTE/sSYHKkj/Cl5nStfZnI2jc7 X-Received: by 2002:a17:902:6542:b0:187:27fa:eef1 with SMTP id d2-20020a170902654200b0018727faeef1mr16958973pln.2.1667451582128; Wed, 02 Nov 2022 21:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667451582; cv=none; d=google.com; s=arc-20160816; b=P7c3Nll/EZ/NzH06SKdA6KwTFfXiWnnHMi+LrbiR12LAkiHP1IvnDOd2GGY8AdgoWB QFH9UyaA/erRrH0cpG2oK0LxGvRilmEs9Kk6tuTs0ZYmx2TL/FomWVX8l1paEkkmpJVK bixbIxXl+N+8QdUaSn5re9yDo/7nbMbdXi6HtHe45xH/aruFTJyJs9Z+WotbrU0Lxgn5 u7CnL4AjT81VKpl+ELEUI5/d5uuC5uyPtCqXO6fqqc1lA8wFwZCZJLdt90X9Q4KILGqs H33ndZfUwahaLIGiMVsM6VT3ROi4W0xUcc043kU+F3J34HMy4AryFk03iOFur8xmc/tI Ymkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=aytaF9VJiZ59kp8/UqWu1XpON56xoCf/kQCMxXol+VU=; b=W0to6A5106kAtEwZczTDGWld14e0KLhW/V4F0A/pr6nNdQSl9kkVE5L6+qDnvM/SCB TDntsyna5pQwy95GMUlmFW4mk+Vk0R6OsqbdqonmTzk/Vo4GksKBiAXHr+meTHqyIdbv LtmFpC9Mh7jwBnAZ/0/EYQOn0A+W27aicUSaPtzSeEDigzPz1CxAvdwcr6PI50Itw9kH W9LAc0McEUONXmLFVlPr74ipuFWJEVaZC32g4k3PgrZsxBqxNRRPP+2tsgGdRH+u9Pbr 5JhN6NvY1AiNpOjNjnCb4C1C9BZzpEV6WIVxk00KphFL2jEayeKqpE6ajvDSvohItict AdTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=kEyteBHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m8-20020a1709026bc800b0018537cc29f9si17318098plt.15.2022.11.02.21.59.29; Wed, 02 Nov 2022 21:59:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=kEyteBHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbiKCEzj (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Thu, 3 Nov 2022 00:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230372AbiKCEza (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Nov 2022 00:55:30 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C93417E1F for <linux-kernel@vger.kernel.org>; Wed, 2 Nov 2022 21:55:28 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id t6-20020a25b706000000b006b38040b6f7so1135511ybj.6 for <linux-kernel@vger.kernel.org>; Wed, 02 Nov 2022 21:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=aytaF9VJiZ59kp8/UqWu1XpON56xoCf/kQCMxXol+VU=; b=kEyteBHALJtRTPCwr3TZEqux/nFBzmqZ8z83EVjNVsVjV8geGkB546cSN8DcWAK3xx /8shHqXyw5Yq7GzzLxX7kaoQiW7lV6WRAAtknxyu4kv6jpU8KPoyUAZSRnCwp6xhn59U G/SKDZ32p4ES1uJKV6NbORrmpTcpfRSLhr/9IO3f8sXFgMAreer+RDjj+YoKp+KSh5CK YkNEXYD2qTEpKqpH/vhU0mvi7Fwl9qJnICFYdyyM8YslYE/Tag2jAJJVd0wDOocFLGQ9 xggyXpeHeV6ZBmx1CXgffPDeVODayjtgvfMrzUpT/6E+JoEWw1HtFv83jLOYakqalFif oJQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aytaF9VJiZ59kp8/UqWu1XpON56xoCf/kQCMxXol+VU=; b=Ff90Sdfwx3Hzre0JdyPxATLOU0SyPNyR8eBydA47WQJ4Eovc3poe8FXFxIUGc1ypBR 3wQ6kHfS8HSlmhy5HHOmeo6JwRwolBOoUmbm/SbgJSSYd7pJhG7Wk9xwjq7XcECkAr7F 5SusXQx3YprsxPyZHlokj5aPEKTfxWX7pWA54VzrPaAW+iSHg1nRCrZHNxNTLD/KMby9 pGXDSNtip0wNF/p/Keb6pxqhkzq4PutNhxDmfRkdhSFrJ6w+a7yNI98NubSbeoei2dLx J9hUZwaX5Yuv5ybE2KenQOMqDDDx9y0BTpfpeSIW/mz2bm/zJ7zJ1TqgmfOpuMYXdu43 iNGQ== X-Gm-Message-State: ACrzQf3hZ0X/ZlV+XTjcQvH6vBwm1rjFAU36geL9fJiMHKUrKzgXBzPc L+sN9OUpHZRBHzYlWgBHwE4pg7gjgqne X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:8a9d:7f38:6465:2d7b]) (user=irogers job=sendgmr) by 2002:a0d:ddd2:0:b0:367:27b6:db71 with SMTP id g201-20020a0dddd2000000b0036727b6db71mr185334ywe.432.1667451327234; Wed, 02 Nov 2022 21:55:27 -0700 (PDT) Date: Wed, 2 Nov 2022 21:54:35 -0700 In-Reply-To: <20221103045437.163510-1-irogers@google.com> Message-Id: <20221103045437.163510-6-irogers@google.com> Mime-Version: 1.0 References: <20221103045437.163510-1-irogers@google.com> X-Mailer: git-send-email 2.38.1.273.g43a17bfeac-goog Subject: [PATCH v1 5/7] perf trace: empty fix libbpf 1.0+ compatibility From: Ian Rogers <irogers@google.com> To: Leo Yan <leo.yan@linaro.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748449710446346261?= X-GMAIL-MSGID: =?utf-8?q?1748449710446346261?= |
Series |
Fix perf trace libbpf 1.0+ compatibility
|
|
Commit Message
Ian Rogers
Nov. 3, 2022, 4:54 a.m. UTC
Avoid use of tools/perf/include/bpf/bpf.h and use the more regular BPF
headers. Add raw_syscalls:sys_enter to avoid the evlist being empty.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/examples/bpf/empty.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/tools/perf/examples/bpf/empty.c b/tools/perf/examples/bpf/empty.c index 7d7fb0c9fe76..3e296c0c53d7 100644 --- a/tools/perf/examples/bpf/empty.c +++ b/tools/perf/examples/bpf/empty.c @@ -1,3 +1,12 @@ -#include <bpf/bpf.h> +// SPDX-License-Identifier: GPL-2.0 +#include <linux/bpf.h> +#include <bpf/bpf_helpers.h> -license(GPL); +struct syscall_enter_args; + +SEC("raw_syscalls:sys_enter") +int sys_enter(struct syscall_enter_args *args) +{ + return 0; +} +char _license[] SEC("license") = "GPL";