* perf test LLVM failure
@ 2017-06-13 8:40 Thomas-Mich Richter
2017-06-16 16:09 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Thomas-Mich Richter @ 2017-06-13 8:40 UTC (permalink / raw)
To: Hendrik Brueckner, linux-perf-users
I have Fedora 25 with an 4.11 kernel and get this error
[root@s8360047 perf]# ./perf test LLVM
35: LLVM search and compile :
35.1: Basic BPF llvm compile : Ok
35.2: kbuild searching : Ok
35.3: Compile source for BPF prologue generation: FAILED!
35.4: Compile source for BPF relocation : Skip
[root@s8360047 perf]#
The error message is
libbpf: Program 'func=null_lseek file->f_mode offset orig'
contains non-map related relo data pointing to section 5
I have installed
clang-3.8.1-1.fc25.s390x
clang-libs-3.8.1-1.fc25.s390x
libpfm-4.8.0-2.ibm.fc25.s390x
compiler-rt-3.9.1-1.fc25.s390x
llvm-libs-3.8.1-2.fc25.s390x
and when I compile the test/bpf-script-test-prologue.c manually
the compile does not show any error message.
The error comes from file ../lib/bpf/libbpf.c
function bpf_program__collect_reloc()
Any ideas what cauese this and how to fix it?
By the way Fedora 24 with the same kernel version as above runs fine.
--
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf test LLVM failure
2017-06-13 8:40 perf test LLVM failure Thomas-Mich Richter
@ 2017-06-16 16:09 ` Arnaldo Carvalho de Melo
2017-06-19 0:34 ` Wangnan (F)
0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-06-16 16:09 UTC (permalink / raw)
To: Thomas-Mich Richter
Cc: Hendrik Brueckner, linux-perf-users, Wang Nan, Alexei Starovoitov
Em Tue, Jun 13, 2017 at 10:40:37AM +0200, Thomas-Mich Richter escreveu:
> I have Fedora 25 with an 4.11 kernel and get this error
>
> [root@s8360047 perf]# ./perf test LLVM
> 35: LLVM search and compile :
> 35.1: Basic BPF llvm compile : Ok
> 35.2: kbuild searching : Ok
> 35.3: Compile source for BPF prologue generation: FAILED!
> 35.4: Compile source for BPF relocation : Skip
> [root@s8360047 perf]#
>
> The error message is
> libbpf: Program 'func=null_lseek file->f_mode offset orig'
> contains non-map related relo data pointing to section 5
Wang, can you please take a look at this?
- Arnaldo
> I have installed
> clang-3.8.1-1.fc25.s390x
> clang-libs-3.8.1-1.fc25.s390x
> libpfm-4.8.0-2.ibm.fc25.s390x
> compiler-rt-3.9.1-1.fc25.s390x
> llvm-libs-3.8.1-2.fc25.s390x
>
> and when I compile the test/bpf-script-test-prologue.c manually
> the compile does not show any error message.
>
> The error comes from file ../lib/bpf/libbpf.c
> function bpf_program__collect_reloc()
>
> Any ideas what cauese this and how to fix it?
>
> By the way Fedora 24 with the same kernel version as above runs fine.
>
> --
> Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
> --
> Vorsitzende des Aufsichtsrats: Martina Koederitz
> Geschäftsführung: Dirk Wittkopp
> Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf test LLVM failure
2017-06-16 16:09 ` Arnaldo Carvalho de Melo
@ 2017-06-19 0:34 ` Wangnan (F)
2017-06-19 7:45 ` Thomas-Mich Richter
0 siblings, 1 reply; 6+ messages in thread
From: Wangnan (F) @ 2017-06-19 0:34 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Thomas-Mich Richter
Cc: Hendrik Brueckner, linux-perf-users, Alexei Starovoitov
Hi,
I made a quick test on my ubuntu system, unable to reproduce.
My clang environment:
$ clang --version
clang version 3.8.1-12ubuntu1 (tags/RELEASE_381/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
My source code:
$ git show
commit a351e9b9fc24e982ec2f0e76379a49826036da12
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Apr 30 19:47:48 2017 -0700
Linux 4.11
Test result:
$ ./perf test LLVM
35: LLVM search and compile :
35.1: Basic BPF llvm compile : Ok
35.2: kbuild searching : Ok
35.3: Compile source for BPF prologue generation: Ok
35.4: Compile source for BPF relocation : Ok
In your environment, clang produces a buggy BPF object file during
'perf test LLVM', but produces a correct BPF object when you compile
it manually. I think the cmdline you provided to clang is different
from the cmdline 'perf test' generated.
Could you please provide the result of 'perf test -vv LLVM'
and the cmdline you use for manual testing?
Also, it would be thankful if you provide the '.o' file produced
by perf test and by your manually testing. Following are steps
to get it.
If you build perf from source, please apply the following patch:
################### BEGIN ###################
diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c
index 482b536..e0694e0 100644
--- a/tools/perf/tests/llvm.c
+++ b/tools/perf/tests/llvm.c
@@ -138,6 +138,8 @@ int test__llvm(int subtest)
void *obj_buf = NULL;
size_t obj_buf_sz = 0;
bool should_load_fail = false;
+ FILE *fp;
+ char fn[64];
if ((subtest < 0) || (subtest >= __LLVM_TESTCASE_MAX))
return TEST_FAIL;
@@ -152,6 +154,14 @@ int test__llvm(int subtest)
bpf_source_table[subtest].desc);
}
}
+
+ snprintf(fn, sizeof(fn), "/tmp/perf-test-llvm-%d.o", subtest);
+ fp = fopen(fn, "wb");
+ if (fp) {
+ fwrite(obj_buf, obj_buf_sz, 1, fp);
+ fclose(fp);
+ }
+
free(obj_buf);
return ret;
################### END ###################
then do 'perf test LLVM', and give me /tmp/perf-test-llvm-2.o
If you can't change perf's source code, you can use strace to capture
the content of it:
$ strace -f -o /tmp/out -s 8192 ./perf test -vv LLVM
In resulting /tmp/out, search 'write.*ELF.*null_lseek', you will find
a line looks like:
12101 write(3, "\177ELF\2\1\1\0\0\0 ... ", 928) = 928
Send that line to me.
Thank you.
On 2017/6/17 0:09, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jun 13, 2017 at 10:40:37AM +0200, Thomas-Mich Richter escreveu:
>> I have Fedora 25 with an 4.11 kernel and get this error
>>
>> [root@s8360047 perf]# ./perf test LLVM
>> 35: LLVM search and compile :
>> 35.1: Basic BPF llvm compile : Ok
>> 35.2: kbuild searching : Ok
>> 35.3: Compile source for BPF prologue generation: FAILED!
>> 35.4: Compile source for BPF relocation : Skip
>> [root@s8360047 perf]#
>>
>> The error message is
>> libbpf: Program 'func=null_lseek file->f_mode offset orig'
>> contains non-map related relo data pointing to section 5
> Wang, can you please take a look at this?
>
> - Arnaldo
>
>> I have installed
>> clang-3.8.1-1.fc25.s390x
>> clang-libs-3.8.1-1.fc25.s390x
>> libpfm-4.8.0-2.ibm.fc25.s390x
>> compiler-rt-3.9.1-1.fc25.s390x
>> llvm-libs-3.8.1-2.fc25.s390x
>>
>> and when I compile the test/bpf-script-test-prologue.c manually
>> the compile does not show any error message.
>>
>> The error comes from file ../lib/bpf/libbpf.c
>> function bpf_program__collect_reloc()
>>
>> Any ideas what cauese this and how to fix it?
>>
>> By the way Fedora 24 with the same kernel version as above runs fine.
>>
>> --
>> Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
>> --
>> Vorsitzende des Aufsichtsrats: Martina Koederitz
>> Geschäftsführung: Dirk Wittkopp
>> Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: perf test LLVM failure
2017-06-19 0:34 ` Wangnan (F)
@ 2017-06-19 7:45 ` Thomas-Mich Richter
2017-06-19 10:29 ` Wangnan (F)
0 siblings, 1 reply; 6+ messages in thread
From: Thomas-Mich Richter @ 2017-06-19 7:45 UTC (permalink / raw)
To: Wangnan (F), Arnaldo Carvalho de Melo
Cc: Hendrik Brueckner, linux-perf-users, Alexei Starovoitov
[-- Attachment #1: Type: text/plain, Size: 4036 bytes --]
On 06/19/2017 02:34 AM, Wangnan (F) wrote:
> Hi,
>
> I made a quick test on my ubuntu system, unable to reproduce.
>
> My clang environment:
>
> $ clang --version
> clang version 3.8.1-12ubuntu1 (tags/RELEASE_381/final)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> InstalledDir: /usr/bin
>
> My source code:
> $ git show
> commit a351e9b9fc24e982ec2f0e76379a49826036da12
> Author: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Sun Apr 30 19:47:48 2017 -0700
>
> Linux 4.11
>
>
> Test result:
>
> $ ./perf test LLVM
> 35: LLVM search and compile :
> 35.1: Basic BPF llvm compile : Ok
> 35.2: kbuild searching : Ok
> 35.3: Compile source for BPF prologue generation: Ok
> 35.4: Compile source for BPF relocation : Ok
>
>
>
> In your environment, clang produces a buggy BPF object file during
> 'perf test LLVM', but produces a correct BPF object when you compile
> it manually. I think the cmdline you provided to clang is different
> from the cmdline 'perf test' generated.
>
> Could you please provide the result of 'perf test -vv LLVM'
> and the cmdline you use for manual testing?
>
> Also, it would be thankful if you provide the '.o' file produced
> by perf test and by your manually testing. Following are steps
> to get it.
>
> If you build perf from source, please apply the following patch:
>
> ################### BEGIN ###################
>
> diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c
> index 482b536..e0694e0 100644
> --- a/tools/perf/tests/llvm.c
> +++ b/tools/perf/tests/llvm.c
> @@ -138,6 +138,8 @@ int test__llvm(int subtest)
> void *obj_buf = NULL;
> size_t obj_buf_sz = 0;
> bool should_load_fail = false;
> + FILE *fp;
> + char fn[64];
>
> if ((subtest < 0) || (subtest >= __LLVM_TESTCASE_MAX))
> return TEST_FAIL;
> @@ -152,6 +154,14 @@ int test__llvm(int subtest)
> bpf_source_table[subtest].desc);
> }
> }
> +
> + snprintf(fn, sizeof(fn), "/tmp/perf-test-llvm-%d.o", subtest);
> + fp = fopen(fn, "wb");
> + if (fp) {
> + fwrite(obj_buf, obj_buf_sz, 1, fp);
> + fclose(fp);
> + }
> +
> free(obj_buf);
>
> return ret;
> ################### END ###################
>
> then do 'perf test LLVM', and give me /tmp/perf-test-llvm-2.o
>
> If you can't change perf's source code, you can use strace to capture
> the content of it:
> $ strace -f -o /tmp/out -s 8192 ./perf test -vv LLVM
>
> In resulting /tmp/out, search 'write.*ELF.*null_lseek', you will find
> a line looks like:
>
> 12101 write(3, "\177ELF\2\1\1\0\0\0 ... ", 928) = 928
>
> Send that line to me.
>
> Thank you.
>
Thank you very much for your help. I attach a tgz file which contains:
llvm/
llvm/llvmsubtest3.c <-- Source code of failing subtest 35.3
llvm/llvmsubtest3 <-- Object code
llvm/bpftest1.c <-- Souce code of BPF test (unneeded)
llvm/Makefile <-- Makefile to build llvmsubtest2 and 3
llvm/llvmsubtest2.c <-- Souce code of succeeding subtest 35.2
llvm/llvmsubtest2 <-- Object code
llvm/output/ <-- Output directory for command ./perf test -vv LLVM
llvm/output/llvm.out <-- Verbose output of ./perf test -vv LLVM
llvm/output/perf-test-llvm-1.o <-- Object code for subtest 2
llvm/output/perf-test-llvm-2.o <-- Object code for subtest 3
llvm/output/perf-test-llvm-0.o <-- Object code for subtest 0
This provides all the information you requested.
The object files perf-test-llvm-[012].o have been captured with the
patch you provided.
The object code for llvmsubtest3.c compiled using my makefile
and the perf test LLVM code is identifcal:
[root@s8360047 llvm]# cmp llvmsubtest3 /tmp/perf-test-llvm-2.o
[root@s8360047 llvm]#
Thanks
--
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
[-- Attachment #2: llvmtest-failure.tgz --]
[-- Type: application/x-compressed-tar, Size: 3199 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf test LLVM failure
2017-06-19 7:45 ` Thomas-Mich Richter
@ 2017-06-19 10:29 ` Wangnan (F)
2017-06-19 11:59 ` Thomas-Mich Richter
0 siblings, 1 reply; 6+ messages in thread
From: Wangnan (F) @ 2017-06-19 10:29 UTC (permalink / raw)
To: Thomas-Mich Richter, Arnaldo Carvalho de Melo
Cc: Hendrik Brueckner, linux-perf-users, Alexei Starovoitov
Hi,
Thank you for your quick reply.
The problem is caused by following relocation information:
$ readelf -a ./llvmsubtest3
...
[ 5] _ftrace_branch PROGBITS 0000000000000000 00000260
00000000000000a0 0000000000000000 WA 0 0 4
...
Relocation section '.relfunc=null_lseek file->f_mode offset orig' at
offset 0x490 contains 4 entries:
Offset Info Type Sym. Value Sym. Name
000000000038 000b00000001 unrecognized: 1 0000000000000000
_ftrace_branch
0000000000b0 000b00000001 unrecognized: 1 0000000000000000
_ftrace_branch
000000000128 000b00000001 unrecognized: 1 0000000000000000
_ftrace_branch
0000000001c0 000b00000001 unrecognized: 1 0000000000000000
_ftrace_branch
Relocation section '.rel_ftrace_branch' at offset 0x4d0 contains 8 entries:
Offset Info Type Sym. Value Sym. Name
000000000000 000200000001 unrecognized: 1 0000000000000000
.L__func__.bpf_func__n
000000000008 000100000001 unrecognized: 1 0000000000000015 .L.str
000000000028 000200000001 unrecognized: 1 0000000000000000
.L__func__.bpf_func__n
000000000030 000100000001 unrecognized: 1 0000000000000015 .L.str
000000000050 000200000001 unrecognized: 1 0000000000000000
.L__func__.bpf_func__n
000000000058 000100000001 unrecognized: 1 0000000000000015 .L.str
000000000078 000200000001 unrecognized: 1 0000000000000000
.L__func__.bpf_func__n
000000000080 000100000001 unrecognized: 1 0000000000000015 .L.str
...
So I think the failure is because you enabled CONFIG_PROFILE_ALL_BRANCHES.
I can reproduce your buggy result by selecting
CONFIG_PROFILE_ALL_BRANCHES in my
kbuild:
$ ./perf test LLVM
35: LLVM search and compile :
35.1: Basic BPF llvm compile : Ok
35.2: kbuild searching : Ok
35.3: Compile source for BPF prologue generation: FAILED!
35.4: Compile source for BPF relocation : Skip
Simply undef CONFIG_PROFILE_ALL_BRANCHES in clang opts not working
because it is
introduced by "#include <uapi/linux/fs.h>", which override cmdline
options. So I
think the best way is to undefine 'if' inside BPF script.
Please have a look on the patch I sent:
http://lkml.kernel.org/r/20170620183203.2517-1-wangnan0@huawei.com
Thank you.
On 2017/6/19 15:45, Thomas-Mich Richter wrote:
> On 06/19/2017 02:34 AM, Wangnan (F) wrote:
>> Hi,
>>
>> I made a quick test on my ubuntu system, unable to reproduce.
>>
>> My clang environment:
>>
>> $ clang --version
>> clang version 3.8.1-12ubuntu1 (tags/RELEASE_381/final)
>> Target: x86_64-pc-linux-gnu
>> Thread model: posix
>> InstalledDir: /usr/bin
>>
>> My source code:
>> $ git show
>> commit a351e9b9fc24e982ec2f0e76379a49826036da12
>> Author: Linus Torvalds <torvalds@linux-foundation.org>
>> Date: Sun Apr 30 19:47:48 2017 -0700
>>
>> Linux 4.11
>>
>>
>> Test result:
>>
>> $ ./perf test LLVM
>> 35: LLVM search and compile :
>> 35.1: Basic BPF llvm compile : Ok
>> 35.2: kbuild searching : Ok
>> 35.3: Compile source for BPF prologue generation: Ok
>> 35.4: Compile source for BPF relocation : Ok
>>
>>
>>
>> In your environment, clang produces a buggy BPF object file during
>> 'perf test LLVM', but produces a correct BPF object when you compile
>> it manually. I think the cmdline you provided to clang is different
>> from the cmdline 'perf test' generated.
>>
>> Could you please provide the result of 'perf test -vv LLVM'
>> and the cmdline you use for manual testing?
>>
>> Also, it would be thankful if you provide the '.o' file produced
>> by perf test and by your manually testing. Following are steps
>> to get it.
>>
>> If you build perf from source, please apply the following patch:
>>
>> ################### BEGIN ###################
>>
>> diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c
>> index 482b536..e0694e0 100644
>> --- a/tools/perf/tests/llvm.c
>> +++ b/tools/perf/tests/llvm.c
>> @@ -138,6 +138,8 @@ int test__llvm(int subtest)
>> void *obj_buf = NULL;
>> size_t obj_buf_sz = 0;
>> bool should_load_fail = false;
>> + FILE *fp;
>> + char fn[64];
>>
>> if ((subtest < 0) || (subtest >= __LLVM_TESTCASE_MAX))
>> return TEST_FAIL;
>> @@ -152,6 +154,14 @@ int test__llvm(int subtest)
>> bpf_source_table[subtest].desc);
>> }
>> }
>> +
>> + snprintf(fn, sizeof(fn), "/tmp/perf-test-llvm-%d.o", subtest);
>> + fp = fopen(fn, "wb");
>> + if (fp) {
>> + fwrite(obj_buf, obj_buf_sz, 1, fp);
>> + fclose(fp);
>> + }
>> +
>> free(obj_buf);
>>
>> return ret;
>> ################### END ###################
>>
>> then do 'perf test LLVM', and give me /tmp/perf-test-llvm-2.o
>>
>> If you can't change perf's source code, you can use strace to capture
>> the content of it:
>> $ strace -f -o /tmp/out -s 8192 ./perf test -vv LLVM
>>
>> In resulting /tmp/out, search 'write.*ELF.*null_lseek', you will find
>> a line looks like:
>>
>> 12101 write(3, "\177ELF\2\1\1\0\0\0 ... ", 928) = 928
>>
>> Send that line to me.
>>
>> Thank you.
>>
> Thank you very much for your help. I attach a tgz file which contains:
> llvm/
> llvm/llvmsubtest3.c <-- Source code of failing subtest 35.3
> llvm/llvmsubtest3 <-- Object code
> llvm/bpftest1.c <-- Souce code of BPF test (unneeded)
> llvm/Makefile <-- Makefile to build llvmsubtest2 and 3
> llvm/llvmsubtest2.c <-- Souce code of succeeding subtest 35.2
> llvm/llvmsubtest2 <-- Object code
> llvm/output/ <-- Output directory for command ./perf test -vv LLVM
> llvm/output/llvm.out <-- Verbose output of ./perf test -vv LLVM
> llvm/output/perf-test-llvm-1.o <-- Object code for subtest 2
> llvm/output/perf-test-llvm-2.o <-- Object code for subtest 3
> llvm/output/perf-test-llvm-0.o <-- Object code for subtest 0
>
> This provides all the information you requested.
> The object files perf-test-llvm-[012].o have been captured with the
> patch you provided.
> The object code for llvmsubtest3.c compiled using my makefile
> and the perf test LLVM code is identifcal:
>
> [root@s8360047 llvm]# cmp llvmsubtest3 /tmp/perf-test-llvm-2.o
> [root@s8360047 llvm]#
>
> Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf test LLVM failure
2017-06-19 10:29 ` Wangnan (F)
@ 2017-06-19 11:59 ` Thomas-Mich Richter
0 siblings, 0 replies; 6+ messages in thread
From: Thomas-Mich Richter @ 2017-06-19 11:59 UTC (permalink / raw)
To: Wangnan (F), Arnaldo Carvalho de Melo
Cc: Hendrik Brueckner, linux-perf-users, Alexei Starovoitov
On 06/19/2017 12:29 PM, Wangnan (F) wrote:
> Hi,
>
> Thank you for your quick reply.
>
> The problem is caused by following relocation information:
>
> $ readelf -a ./llvmsubtest3
> ...
> [ 5] _ftrace_branch PROGBITS 0000000000000000 00000260
> 00000000000000a0 0000000000000000 WA 0 0 4
> ...
> Relocation section '.relfunc=null_lseek file->f_mode offset orig' at offset 0x490 contains 4 entries:
> Offset Info Type Sym. Value Sym. Name
> 000000000038 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch
> 0000000000b0 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch
> 000000000128 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch
> 0000000001c0 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch
>
> Relocation section '.rel_ftrace_branch' at offset 0x4d0 contains 8 entries:
> Offset Info Type Sym. Value Sym. Name
> 000000000000 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n
> 000000000008 000100000001 unrecognized: 1 0000000000000015 .L.str
> 000000000028 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n
> 000000000030 000100000001 unrecognized: 1 0000000000000015 .L.str
> 000000000050 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n
> 000000000058 000100000001 unrecognized: 1 0000000000000015 .L.str
> 000000000078 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n
> 000000000080 000100000001 unrecognized: 1 0000000000000015 .L.str
> ...
>
> So I think the failure is because you enabled CONFIG_PROFILE_ALL_BRANCHES.
>
> I can reproduce your buggy result by selecting CONFIG_PROFILE_ALL_BRANCHES in my
> kbuild:
>
> $ ./perf test LLVM
> 35: LLVM search and compile :
> 35.1: Basic BPF llvm compile : Ok
> 35.2: kbuild searching : Ok
> 35.3: Compile source for BPF prologue generation: FAILED!
> 35.4: Compile source for BPF relocation : Skip
>
> Simply undef CONFIG_PROFILE_ALL_BRANCHES in clang opts not working because it is
> introduced by "#include <uapi/linux/fs.h>", which override cmdline options. So I
> think the best way is to undefine 'if' inside BPF script.
>
> Please have a look on the patch I sent:
>
> http://lkml.kernel.org/r/20170620183203.2517-1-wangnan0@huawei.com
>
> Thank you.
>
>
Thank you very much for your quick fix. I can confirm that the patch
also fixes my issue on s390.
[root@s8360047 perf]# ./perf test LLVM
35: LLVM search and compile :
35.1: Basic BPF llvm compile : Ok
35.2: kbuild searching : Ok
35.3: Compile source for BPF prologue generation: Ok
35.4: Compile source for BPF relocation : Ok
[root@s8360047 perf]#
You have my Tested-by/Acked-by.
--
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-06-19 11:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 8:40 perf test LLVM failure Thomas-Mich Richter
2017-06-16 16:09 ` Arnaldo Carvalho de Melo
2017-06-19 0:34 ` Wangnan (F)
2017-06-19 7:45 ` Thomas-Mich Richter
2017-06-19 10:29 ` Wangnan (F)
2017-06-19 11:59 ` Thomas-Mich Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).