-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bcc tools fail to run on arm64 #1202
Comments
Hi Maran, So I hit the same thing, although when just building the samples from the kernel sources: https://lkml.org/lkml/2017/8/5/143 . Ping me if you're interested in working together on this problem ([email protected]) as well |
Hi, @maranp @joelagnel , I have just added inline asm support in llvm trunk. I checked the offending asm codes in linux:arch/arm64/include/asm/sysreg.h. It contains a bunch of directives which the newly added bpf inline asm functionality should support, although it ultimately ignores them since there is no use. Could you build llvm from latest source and to see whether the issue still exists in bcc and linux:samples/bpf? Please let me know if you still have issues and I would like to see whether the issue can be resolved from llvm/clang part. |
I can try this soon, thanks! |
Hi @yonghong-song , Registered Targets: clang version 6.0.0 (http://llvm.org/git/clang.git 29487927c0f5d8cd6b23978a0216b17041161cc5) (http://llvm.org/git/llvm.git df6ca162269f9d756f8742bf4b658dcf690e3eb5) Following is excerpt from the build failure. |
Thanks for trying. Now I see. The issue is not just asm codes outside the function body. The function with assembly code inside is used somehow. Need to check this instance more. |
HI, @abhijitayarekar, I do not have arm64 build environment. Could you generate a preprocessed file (-E) and attached here? This will make it easy for me to investigate. Thanks! |
Looked at this error a little more closely. Still not sure about the second error. For the first error, the fundamental error is due to we are actually compiling for x86. From the above command line options, there is no indication that this is compiling for bpf. However, adding "-target bpf" may not help either since "sp" is not a legal register name in bpf as well. |
Hi @yonghong-song, |
@abhijitayarekar I can reproduce your failure now. As mentioned in my previous comments, the error message you saw is because the clang/llc compiler is on x86_64 host and default target You can use the following way to resolve your issue.
[[email protected] ~/work/net-next/samples/bpf] clang compiler is able to successfully compile the program since arm64 headers (2). later on, "llc" command with bpf target will succeed as well since the arm64 inline Please give a try and let me know whether this mechanism works for you or not. |
Hi @yonghong-song,
--target aarch64 works. Also --target arm64 works.
I tested with --target $(ARCH)
Although i still have to disable assembly definitions in
arch/arm64/include/asm/sysreg.h
…On Mon, Oct 2, 2017 at 10:07 PM, yonghong-song ***@***.***> wrote:
@abhijitayarekar <https://github.com/abhijitayarekar> I can reproduce
your failure now. As mentioned in my previous comments, the error message
you saw is because the clang/llc compiler is on x86_64 host and default
target
is x86_64 and it won't recognize the arm inline assembly syntax.
You can use the following way to resolve your issue.
(1). Add "-target aarch64" to clang compilation flag.
The following patch illustrates the change. Obviously it is a hack.
***@***.*** ~/work/net-next/samples/bpf] git diff Makefile
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index ebc2ad6..3452384 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -233,5 +233,5 @@ $(obj)/%.o: $(src)/%.c
-D__TARGET_ARCH_$(ARCH) -Wno-compare-distinct-pointer-types
-Wno-gnu-variable-sized-type-not-at-end
-Wno-address-of-packed-member -Wno-tautological-compare \
-
-Wno-unknown-warning-option \
-
-Wno-unknown-warning-option -target aarch64 \
-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
***@***.*** ~/work/net-next/samples/bpf]
clang compiler is able to successfully compile the program since arm64
headers
will be correctly recognized by the aarch64 target.
(2). later on, "llc" command with bpf target will succeed as well since
the arm64 inline
assembly has been removed as they are not used anywhere.
Please give a try and let me know whether this mechanism works for you or
not.
If possible, please try all programs in samples/bpf directory.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1202 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AH69hq9CoEghClocipoAlEw8yKjWFKM5ks5socEZgaJpZM4NmCya>
.
--
Regards
Abhijit
|
Could you describe what did you do for "Although i still have to disable assembly definitions in arch/arm64/include/asm/sysreg.h"? I am curious why you need to do this since "-target aarch64" should take care of this? |
Hi Abhijith,
Could you also send a patch to LKML then to add this argument to Makefile?
Thanks a lot Yonghong for helping fix clang.
On Tue, Oct 3, 2017 at 4:07 PM, abhijitayarekar <[email protected]>
wrote:
… Hi @yonghong-song,
--target aarch64 works. Also --target arm64 works.
I tested with --target $(ARCH)
Although i still have to disable assembly definitions in
arch/arm64/include/asm/sysreg.h
On Mon, Oct 2, 2017 at 10:07 PM, yonghong-song ***@***.***>
wrote:
> @abhijitayarekar <https://github.com/abhijitayarekar> I can reproduce
> your failure now. As mentioned in my previous comments, the error message
> you saw is because the clang/llc compiler is on x86_64 host and default
> target
> is x86_64 and it won't recognize the arm inline assembly syntax.
>
> You can use the following way to resolve your issue.
> (1). Add "-target aarch64" to clang compilation flag.
> The following patch illustrates the change. Obviously it is a hack.
> ***@***.*** ~/work/net-next/samples/bpf] git diff Makefile
> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> index ebc2ad6..3452384 100644
> --- a/samples/bpf/Makefile
> +++ b/samples/bpf/Makefile
> @@ -233,5 +233,5 @@ $(obj)/%.o: $(src)/%.c
> -D__TARGET_ARCH_$(ARCH) -Wno-compare-distinct-pointer-types
> -Wno-gnu-variable-sized-type-not-at-end
> -Wno-address-of-packed-member -Wno-tautological-compare \
>
> -
>
> -Wno-unknown-warning-option \
>
>
>
> -
>
> -Wno-unknown-warning-option -target aarch64 \
> -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
>
>
> ***@***.*** ~/work/net-next/samples/bpf]
>
> clang compiler is able to successfully compile the program since arm64
> headers
> will be correctly recognized by the aarch64 target.
>
> (2). later on, "llc" command with bpf target will succeed as well since
> the arm64 inline
> assembly has been removed as they are not used anywhere.
>
> Please give a try and let me know whether this mechanism works for you or
> not.
> If possible, please try all programs in samples/bpf directory.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1202 (comment)>, or
mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/
AH69hq9CoEghClocipoAlEw8yKjWFKM5ks5socEZgaJpZM4NmCya>
> .
>
--
Regards
Abhijit
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1202 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AACSVFGNPuT4WPCzOuFaODO1Nw_hJxY4ks5sor4pgaJpZM4NmCya>
.
|
Hi @yonghong-song,
I had to disable assembly instructions in sysreg.h because i was using
llvm-3.8.0 instead of the one built from git.
Tested with the llvm built from from git and no need for disabling the
instructions :)
Only change required is to remove the definition -D__ASM_SYSREG_H from
Makefile and add -target $(ARCH)
Hi @joelagnel,
Yes. Ill send the Makefile patch to LKML.
Thanks to both of you :)
…On Tue, Oct 3, 2017 at 9:16 PM, Joel ***@***.***> wrote:
Hi Abhijith,
Could you also send a patch to LKML then to add this argument to Makefile?
Thanks a lot Yonghong for helping fix clang.
On Tue, Oct 3, 2017 at 4:07 PM, abhijitayarekar ***@***.***>
wrote:
> Hi @yonghong-song,
> --target aarch64 works. Also --target arm64 works.
> I tested with --target $(ARCH)
>
> Although i still have to disable assembly definitions in
> arch/arm64/include/asm/sysreg.h
>
>
>
> On Mon, Oct 2, 2017 at 10:07 PM, yonghong-song ***@***.***
>
> wrote:
>
> > @abhijitayarekar <https://github.com/abhijitayarekar> I can reproduce
> > your failure now. As mentioned in my previous comments, the error
message
> > you saw is because the clang/llc compiler is on x86_64 host and default
> > target
> > is x86_64 and it won't recognize the arm inline assembly syntax.
> >
> > You can use the following way to resolve your issue.
> > (1). Add "-target aarch64" to clang compilation flag.
> > The following patch illustrates the change. Obviously it is a hack.
> > ***@***.*** ~/work/net-next/samples/bpf] git diff Makefile
> > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> > index ebc2ad6..3452384 100644
> > --- a/samples/bpf/Makefile
> > +++ b/samples/bpf/Makefile
> > @@ -233,5 +233,5 @@ $(obj)/%.o: $(src)/%.c
> > -D__TARGET_ARCH_$(ARCH) -Wno-compare-distinct-pointer-types
> > -Wno-gnu-variable-sized-type-not-at-end
> > -Wno-address-of-packed-member -Wno-tautological-compare \
> >
> > -
> >
> > -Wno-unknown-warning-option \
> >
> >
> >
> > -
> >
> > -Wno-unknown-warning-option -target aarch64 \
> > -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
> >
> >
> > ***@***.*** ~/work/net-next/samples/bpf]
> >
> > clang compiler is able to successfully compile the program since arm64
> > headers
> > will be correctly recognized by the aarch64 target.
> >
> > (2). later on, "llc" command with bpf target will succeed as well since
> > the arm64 inline
> > assembly has been removed as they are not used anywhere.
> >
> > Please give a try and let me know whether this mechanism works for you
or
> > not.
> > If possible, please try all programs in samples/bpf directory.
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#1202 (comment)>,
or
> mute
> > the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AH69hq9CoEghClocipoAlEw8yKjWFKM5ks5socEZgaJpZM4NmCya>
> > .
> >
>
>
>
> --
> Regards
> Abhijit
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1202 (comment)>, or
mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/
AACSVFGNPuT4WPCzOuFaODO1Nw_hJxY4ks5sor4pgaJpZM4NmCya>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1202 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AH69hlmQgHwh8Iz5lMnEJW3n8womvNvOks5sowacgaJpZM4NmCya>
.
--
Regards
Abhijit
|
Thanks for looking into the issue. I couldn't get back to it sooner. I still face the same issue. My kernel has this patch And I use upstream llvm (6.0) and made sure this patch is included Both the linux kernel and llvm+clang are built natively on arm64 board. However, I face the same issue as I posted in the initial report. I am pasting one compilation command line, if it helps to identify issues with the way the build is going on. cd /home/mpakkirisamy/ebpf/bcc/build/src/cc/frontends/clang && /usr/bin/c++ -I/usr/local/include/../tools/clang/include -I/home/mpakkirisamy/ebpf/bcc/src -I/home/mpakkirisamy/ebpf/bcc/build/src -I/home/mpakkirisamy/ebpf/bcc/build/src/cc -I/home/mpakkirisamy/ebpf/bcc/src/cc -I/home/mpakkirisamy/ebpf/bcc/build/src/cc/frontends/b -I/home/mpakkirisamy/ebpf/bcc/src/cc/frontends/b -I/home/mpakkirisamy/ebpf/bcc/src/cc/frontends/clang -I/usr/local/include -I/home/mpakkirisamy/ebpf/bcc/src/cc/compat -Wall -isystem /usr/local/include -fno-rtti -fPIC -DBCC_PROG_TAG_DIR='"/var/tmp/bcc"' -DLLVM_MAJOR_VERSION=6 -DKERNEL_MODULES_DIR='"/lib/modules"' -O3 -DNDEBUG -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=gnu++11 -o CMakeFiles/clang_frontend.dir/kbuild_helper.cc.o -c /home/mpakkirisamy/ebpf/bcc/src/cc/frontends/clang/kbuild_helper.cc Am I missing something trivial? Here is the error log when attempting to execute a bcc tool |
I just fixed an issue related to the following error message:
Could you pull the latest bcc code and give a try? |
With the latest bcc code, I could successfully execute the bcc scripts on aarch64 machine. Thanks for fixing this. I am closing the issue. |
I assumed that the errors related with sysreg was fixed by the commit 7abe63a. Just wonder how "bpfasmparser" in the following line solved this issue. Is it transformed to some flags used by clang? Or is the parser called by bcc to do some preprocessing? I'm now facing the same problem, and look forward to the internals since we are compiling eBPF code without bcc. Thanks in advance. |
@yonghong-song is bpfasmparser passed as a flag to clang? I'm trying to port this tool to ARM (kinvolk/traceloop#28) and we call clang from a Makefile. |
Find at the end, the error generated on trying to execute bcc scripts on arm64.
My configuration is Linux kernel 4.11.1 + clang 3.8. and upstream branch of ebpf.
I went through the discussion in this thread https://lists.iovisor.org/pipermail/iovisor-dev/2016-December/000557.html
and also added
cflags->push_back("-D__ASM_SYSREG_H");
to
src/cc/frontends/clang/kbuild_helper.c
However, could not find a way to fix this. Can bcc scripts be run on arm64?
./examples/hello_world.py
bpf: Invalid argument
Traceback (most recent call last):
File "./examples/hello_world.py", line 11, in
BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\n"); return 0; }').trace_print()
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 301, in init
self.trace_autoload()
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 904, in trace_autoload
fn = self.load_func(func_name, BPF.KPROBE)
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 345, in load_func
(func_name, errstr))
Exception: Failed to load BPF program kprobe__sys_clone: Invalid argument
mpakkirisamy@crb9:~/ebpf/bcc$ sudo ./examples/tracing/hello_perf_output.py
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:9:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/list.h:8:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/kernel.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/printk.h:8:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/cache.h:5:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cache.h:19:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cachetype.h:19:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:112:9: warning: implicit declaration of
function 'read_sysreg_s' is invalid in C99 [-Wimplicit-function-declaration]
return read_cpuid(MIDR_EL1);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:103:27: note: expanded from macro
'read_cpuid'
#define read_cpuid(reg) read_sysreg_s(SYS ## reg)
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:112:9: error: use of undeclared identifier
'SYS_MIDR_EL1'
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:103:41: note: expanded from macro
'read_cpuid'
#define read_cpuid(reg) read_sysreg_s(SYS ## reg)
^
:55:1: note: expanded from here
SYS_MIDR_EL1
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:9:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/list.h:8:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/kernel.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/printk.h:8:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/cache.h:5:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cache.h:19:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cachetype.h:19:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:117:9: error: use of undeclared identifier
'SYS_MPIDR_EL1'
return read_cpuid(MPIDR_EL1);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:103:41: note: expanded from macro
'read_cpuid'
#define read_cpuid(reg) read_sysreg_s(SYS_ ## reg)
^
:55:1: note: expanded from here
SYS_MPIDR_EL1
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:9:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/list.h:8:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/kernel.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/printk.h:8:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/cache.h:5:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cache.h:19:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cachetype.h:19:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:132:9: error: use of undeclared identifier
'SYS_CTR_EL0'
return read_cpuid(CTR_EL0);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:103:41: note: expanded from macro
'read_cpuid'
#define read_cpuid(reg) read_sysreg_s(SYS_ ## reg)
^
:55:1: note: expanded from here
SYS_CTR_EL0
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:10:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rcupdate.h:38:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/spinlock.h:87:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/spinlock.h:21:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/processor.h:34:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/hw_breakpoint.h:20:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cpufeature.h:207:53: error: use of undeclared
identifier 'ID_AA64MMFR0_BIGENDEL_SHIFT'
return cpuid_feature_extract_unsigned_field(mmfr0, ID_AA64MMFR0_BIGENDEL_SHIFT) == 0x1 ||
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cpufeature.h:208:47: error: use of undeclared
identifier 'ID_AA64MMFR0_BIGENDEL0_SHIFT'
cpuid_feature_extract_unsigned_field(mmfr0, ID_AA64MMFR0_BIGENDEL0_SHIFT) == 0x1;
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cpufeature.h:213:55: error: use of undeclared
identifier 'ID_AA64PFR0_EL0_SHIFT'
u32 val = cpuid_feature_extract_unsigned_field(pfr0, ID_AA64PFR0_EL0_SHIFT);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cpufeature.h:215:16: error: use of undeclared
identifier 'ID_AA64PFR0_EL0_32BIT_64BIT'
return val == ID_AA64PFR0_EL0_32BIT_64BIT;
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cpufeature.h:233:39: error: use of undeclared
identifier 'SYS_ID_AA64MMFR0_EL1'
return id_aa64mmfr0_mixed_endian_el0(read_cpuid(ID_AA64MMFR0_EL1));
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cputype.h:103:41: note: expanded from macro
'read_cpuid'
#define read_cpuid(reg) read_sysreg_s(SYS_ ## reg)
^
:159:1: note: expanded from here
SYS_ID_AA64MMFR0_EL1
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:10:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rcupdate.h:38:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/spinlock.h:87:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/spinlock.h:21:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/processor.h:34:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/hw_breakpoint.h:20:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/cpufeature.h:243:55: error: use of undeclared
identifier 'SYS_ID_AA64MMFR0_EL1'
return id_aa64mmfr0_mixed_endian_el0(read_system_reg(SYS_ID_AA64MMFR0_EL1));
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:10:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rcupdate.h:38:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/spinlock.h:87:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/spinlock.h:21:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/processor.h:34:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/hw_breakpoint.h:22:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/virt.h:81:9: warning: implicit declaration of
function 'read_sysreg' is invalid in C99 [-Wimplicit-function-declaration]
return read_sysreg(CurrentEL) == CurrentEL_EL2;
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/virt.h:81:21: error: use of undeclared identifier
'CurrentEL'
return read_sysreg(CurrentEL) == CurrentEL_EL2;
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:10:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rcupdate.h:38:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/spinlock.h:87:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/spinlock.h:21:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/processor.h:34:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/hw_breakpoint.h:152:29: error: use of undeclared
identifier 'SYS_ID_AA64DFR0_EL1'
u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/hw_breakpoint.h:155:7: error: use of undeclared
identifier 'ID_AA64DFR0_BRPS_SHIFT'
ID_AA64DFR0_BRPS_SHIFT);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/hw_breakpoint.h:161:29: error: use of undeclared
identifier 'SYS_ID_AA64DFR0_EL1'
u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/hw_breakpoint.h:164:7: error: use of undeclared
identifier 'ID_AA64DFR0_WRPS_SHIFT'
ID_AA64DFR0_WRPS_SHIFT);
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rculist.h:10:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/rcupdate.h:46:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/ktime.h:25:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/jiffies.h:8:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/include/linux/timex.h:65:
In file included from /lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/timex.h:19:
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/arch_timer.h:71:4: warning: implicit declaration of
function 'write_sysreg' is invalid in C99 [-Wimplicit-function-declaration]
write_sysreg(val, cntp_ctl_el0);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/arch_timer.h:71:22: error: use of undeclared
identifier 'cntp_ctl_el0'
write_sysreg(val, cntp_ctl_el0);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/arch_timer.h:74:22: error: use of undeclared
identifier 'cntp_tval_el0'
write_sysreg(val, cntp_tval_el0);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/arch_timer.h:80:22: error: use of undeclared
identifier 'cntv_ctl_el0'
write_sysreg(val, cntv_ctl_el0);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/arch_timer.h:83:22: error: use of undeclared
identifier 'cntv_tval_el0'
write_sysreg(val, cntv_tval_el0);
^
/lib/modules/4.11.1-4478c-bpfsamp/build/arch/arm64/include/asm/arch_timer.h:97:23: error: use of undeclared
identifier 'cntp_ctl_el0'
return read_sysreg(cntp_ctl_el0);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
Traceback (most recent call last):
File "./examples/tracing/hello_perf_output.py", line 34, in
b = BPF(text=prog)
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 294, in init
raise Exception("Failed to compile BPF module %s" % src_file)
Exception: Failed to compile BPF module
The text was updated successfully, but these errors were encountered: