linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
To: "Wangnan (F)" <wangnan0@huawei.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
	linux-perf-users@vger.kernel.org,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Subject: Re: perf test LLVM failure
Date: Mon, 19 Jun 2017 13:59:50 +0200	[thread overview]
Message-ID: <3ede448f-4af5-2a40-4f40-6d159fca6798@linux.vnet.ibm.com> (raw)
In-Reply-To: <4dc06e88-f779-0549-85e7-95610ec4612b@huawei.com>

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

      reply	other threads:[~2017-06-19 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ede448f-4af5-2a40-4f40-6d159fca6798@linux.vnet.ibm.com \
    --to=tmricht@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).