Skip to content

Commit

Permalink
bpf: use bpf/bpf_helpers.h from libbpf-dev[el]
Browse files Browse the repository at this point in the history
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
  • Loading branch information
kvanhees committed Feb 7, 2024
1 parent 89f8d66 commit 3a42fb8
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bpf/Build
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(objdir)/include/.dir.stamp:
@touch $(objdir)/include/.dir.stamp

BPFLIBS += bpf_dlib
bpf_dlib_CPPFLAGS = -Ilibdtrace -Iinclude -I$(objdir)/include
bpf_dlib_CPPFLAGS = -Ilibdtrace -Iinclude -I$(objdir)/include -idirafter /usr/include
bpf_dlib_TARGET = dlibs/bpf_dlib
bpf_dlib_DIR := $(current-dir)
bpf_dlib_SRCDEPS = $(objdir)/include/.dir.stamp
Expand Down
4 changes: 2 additions & 2 deletions bpf/agg_lqbin.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <stdint.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>

#ifndef noinline
# define noinline __attribute__((noinline))
Expand Down
4 changes: 2 additions & 2 deletions bpf/agg_qbin.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <stdint.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>

#ifndef noinline
# define noinline __attribute__((noinline))
Expand Down
4 changes: 2 additions & 2 deletions bpf/get_agg.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <stdint.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>
#include <bpf-lib.h>
#include <dt_bpf_maps.h>
#include <dt_dctx.h>
Expand Down
4 changes: 2 additions & 2 deletions bpf/get_bvar.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <stddef.h>
#include <stdint.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>
#include <dtrace/conf.h>
#include <dtrace/dif_defines.h>
#include <dtrace/faults_defines.h>
Expand Down
4 changes: 2 additions & 2 deletions bpf/get_dvar.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <stdint.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>
#include <bpf-lib.h>
#include <dt_dctx.h>

Expand Down
4 changes: 2 additions & 2 deletions bpf/probe_error.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <stdint.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>
#include <dt_dctx.h>

#ifndef noinline
Expand Down
4 changes: 2 additions & 2 deletions bpf/speculation.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <stdint.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>
#include <bpf-lib.h>
#include <dt_bpf_maps.h>

Expand Down
4 changes: 2 additions & 2 deletions bpf/strlen.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*/
#include <linux/bpf.h>
#include <bpf-helpers.h>
#include <bpf/bpf_helpers.h>
#include <stdint.h>
#include <dt_dctx.h>
#include <bpf-lib.h>
Expand Down
5 changes: 3 additions & 2 deletions dtrace.spec
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ Name: dtrace
License: Universal Permissive License (UPL), Version 1.0
Group: Development/Tools
Requires: cpp elfutils-libelf zlib libpcap libpfm
BuildRequires: glibc-headers bison flex zlib-devel elfutils-libelf-devel systemd systemd-devel
BuildRequires: glibc-static %{glibc32} wireshark libpcap-devel valgrind-devel libpfm-devel
BuildRequires: glibc-headers bison flex zlib-devel elfutils-libelf-devel
BuildRequires: systemd systemd-devel glibc-static %{glibc32} wireshark
BuildRequires: libpcap-devel valgrind-devel libpfm-devel libbpf-devel
%if "%{?dist}" == ".el7"
Requires: fuse
BuildRequires: fuse-devel
Expand Down

0 comments on commit 3a42fb8

Please sign in to comment.