Hi Alexei,
Thank you for so quick response!
On Fri, Dec 9, 2016 at 12:37 AM, Alexei Starovoitov
wrote:
> On Thu, Dec 8, 2016 at 8:20 AM, Ming Lei via iovisor-dev
> wrote:
>> Hi,
>>
>> Bcc can be installed on ubuntu 16.04/arm64 successfully, but when
>> I try to trace, the folllowing failure[1] is triggered.
>>
>> So is bcc not ready for arm64? Or something is wrong?
>>
>> BTW, clang/llvm is 3.8, and I am happy to try any patches/tests
>> if you have ideas about the issue.
>>
>> Thanks,
>> Ming
>> %w0
>> 13 warnings generated.
>> LLVM ERROR: Inline asm not supported by this streamer because we don't
>> have an asm parser for this target
>
> I suspect this is due to bcc not passing -D__ASM_SYSREG_H into clang
> like we do in samples/bpf/Makefile to workaround this issue.
Yeah, that is one problem, once I apply the following change,
vfscount.py starts working, but a new issue[1] is triggered when
'trace vfs_open' is run:
diff --git a/src/cc/frontends/clang/kbuild_helper.cc
b/src/cc/frontends/clang/kbuild_helper.cc
index 8fbefd2..77cfc39 100644
--- a/src/cc/frontends/clang/kbuild_helper.cc
+++ b/src/cc/frontends/clang/kbuild_helper.cc
@@ -84,6 +84,7 @@ int KBuildHelper::get_flags(const char
*uname_machine, vector *cflags) {
cflags->push_back("-include");
cflags->push_back("./include/linux/kconfig.h");
cflags->push_back("-D__KERNEL__");
+ cflags->push_back("-D__ASM_SYSREG_H");
cflags->push_back("-D__HAVE_BUILTIN_BSWAP16__");
cflags->push_back("-D__HAVE_BUILTIN_BSWAP32__");
cflags->push_back("-D__HAVE_BUILTIN_BSWAP64__");
Do you have any idea about this issue?
[1] waring log
ubuntu@ubuntu:~/git/bcc/tools$ sudo ./trace.py vfs_open
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:19:
In file included from include/linux/timex.h:56:
In file included from include/uapi/linux/timex.h:56:
In file included from include/linux/time.h:5:
In file included from include/linux/seqlock.h:35:
In file included from include/linux/spinlock.h:87:
In file included from ./arch/arm64/include/asm/spinlock.h:21:
In file included from ./arch/arm64/include/asm/processor.h:32:
In file included from ./arch/arm64/include/asm/alternative.h:4:
./arch/arm64/include/asm/cpufeature.h:180:53: error: use of undeclared
identifier
'ID_AA64MMFR0_BIGENDEL_SHIFT'
return cpuid_feature_extract_unsigned_field(mmfr0,
ID_AA64MMFR0_BIGENDEL_...
^
./arch/arm64/include/asm/cpufeature.h:181:47: error: use of undeclared
identifier
'ID_AA64MMFR0_BIGENDEL0_SHIFT'
cpuid_feature_extract_unsigned_field(mmfr0,
ID_AA64MMFR0_BIGENDEL...
^
./arch/arm64/include/asm/cpufeature.h:186:55: error: use of undeclared
identifier
'ID_AA64PFR0_EL0_SHIFT'
u32 val = cpuid_feature_extract_unsigned_field(pfr0,
ID_AA64PFR0_EL0_SHIFT);
^
./arch/arm64/include/asm/cpufeature.h:188:16: error: use of undeclared
identifier
'ID_AA64PFR0_EL0_32BIT_64BIT'
return val == ID_AA64PFR0_EL0_32BIT_64BIT;
^
./arch/arm64/include/asm/cpufeature.h:216: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 include/linux/ptrace.h:5:
In file included from include/linux/sched.h:19:
In file included from include/linux/timex.h:56:
In file included from include/uapi/linux/timex.h:56:
In file included from include/linux/time.h:5:
In file included from include/linux/seqlock.h:35:
In file included from include/linux/spinlock.h:87:
In file included from ./arch/arm64/include/asm/spinlock.h:21:
In file included from ./arch/arm64/include/asm/processor.h:34:
./arch/arm64/include/asm/hw_breakpoint.h:149:29: error: use of
undeclared identifier
'SYS_ID_AA64DFR0_EL1'
u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
^
./arch/arm64/include/asm/hw_breakpoint.h:152:7: error: use of
undeclared identifier
'ID_AA64DFR0_BRPS_SHIFT'
ID_AA64DFR0_BRPS_SHIFT);
^
./arch/arm64/include/asm/hw_breakpoint.h:158:29: error: use of
undeclared identifier
'SYS_ID_AA64DFR0_EL1'
u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
^
./arch/arm64/include/asm/hw_breakpoint.h:161:7: error: use of
undeclared identifier
'ID_AA64DFR0_WRPS_SHIFT'
ID_AA64DFR0_WRPS_SHIFT);