linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tools/perf] perf test LLVM failure on 4.9
@ 2018-01-23 12:37 Pintu Kumar
  2018-01-23 13:17 ` Arnaldo Carvalho de Melo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Pintu Kumar @ 2018-01-23 12:37 UTC (permalink / raw)
  To: linux-kernel, kernelnewbies, Pintu Kumar, quentin.monnet, daniel,
	davem, wangnan0, acme, alexander.shishkin, mingo

Hi All,

I am verifying all perf tests on Ubuntu-16 x86-64 platform using the
kernel version 4.9.20.
I have installed several others packages including: clang, llvm

But, when I run 'perf test' I get some FAILURE.
Specially, 'perf test LLVM' is failing.

Please check the below error logs:

----------------------------------------------------
# perf test LLVM
35: Test LLVM searching and compiling                        :
35.1: Basic BPF llvm compiling test                          : FAILED!
35.2: Test kbuild searching                                  : Skip
35.3: Compile source for BPF prologue generation test        : Skip
35.4: Compile source for BPF relocation test                 : Skip
----------------------------------------------------

When I run with -v I get this:

-----------------------------------------------------
# perf test -v LLVM
35: Test LLVM searching and compiling                        :
35.1: Basic BPF llvm compiling test                          :
--- start ---
test child forked, pid 3304
Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'
WARNING:        unable to get correct kernel building directory.
Hint:   Set correct kbuild directory using 'kbuild-dir' option in [llvm]
        section of ~/.perfconfig or set it to "" to suppress kbuild
        detection.

Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'


int _version SEC("version") = LINUX_VERSION_CODE;
' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS
-DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS
$KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign
-working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o
-
libbpf: 2129190-4a0 doesn't provide kernel version
Failed to parse test case 'Basic BPF llvm compiling test'
test child finished with -1
---- end ----
Test LLVM searching and compiling subtest 0: FAILED!
-----------------------------------------------------


Basic BPF LLVM compiling test is failing.
It reports that bpf could not able to read the kernel version from uname.
Is it because of this that 'perf test LLVM' is failing ?

My uname says:
4.9-xxxx-amd-x86-64

My kernel version is: 4.9.20 (from Makefile)

So, I dont think there is any problem with kernel version.

If any body have come across this problem please let me know how to
resolve this issue.



Thank You!

Regards,
Pintu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [tools/perf] perf test LLVM failure on 4.9
  2018-01-23 12:37 [tools/perf] perf test LLVM failure on 4.9 Pintu Kumar
@ 2018-01-23 13:17 ` Arnaldo Carvalho de Melo
  2018-01-23 18:55 ` valdis.kletnieks
  2018-01-24  1:09 ` Wangnan (F)
  2 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-01-23 13:17 UTC (permalink / raw)
  To: Wang Nan
  Cc: wangnan0, Pintu Kumar, daniel, kernelnewbies, alexander.shishkin,
	linux-kernel, acme, mingo, quentin.monnet, davem

Em Tue, Jan 23, 2018 at 06:07:25PM +0530, Pintu Kumar escreveu:
> Hi All,
> 
> I am verifying all perf tests on Ubuntu-16 x86-64 platform using the
> kernel version 4.9.20.
> I have installed several others packages including: clang, llvm
> 
> But, when I run 'perf test' I get some FAILURE.
> Specially, 'perf test LLVM' is failing.

Wang, could you please take a look? I'll be traveling this week, so
probably will not have time for trying to work on this.

- Arnaldo
 
> Please check the below error logs:
> 
> ----------------------------------------------------
> # perf test LLVM
> 35: Test LLVM searching and compiling                        :
> 35.1: Basic BPF llvm compiling test                          : FAILED!
> 35.2: Test kbuild searching                                  : Skip
> 35.3: Compile source for BPF prologue generation test        : Skip
> 35.4: Compile source for BPF relocation test                 : Skip
> ----------------------------------------------------
> 
> When I run with -v I get this:
> 
> -----------------------------------------------------
> # perf test -v LLVM
> 35: Test LLVM searching and compiling                        :
> 35.1: Basic BPF llvm compiling test                          :
> --- start ---
> test child forked, pid 3304
> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'
> WARNING:        unable to get correct kernel building directory.
> Hint:   Set correct kbuild directory using 'kbuild-dir' option in [llvm]
>         section of ~/.perfconfig or set it to "" to suppress kbuild
>         detection.
> 
> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'
> 
> 
> int _version SEC("version") = LINUX_VERSION_CODE;
> ' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS
> -DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS
> $KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign
> -working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o
> -
> libbpf: 2129190-4a0 doesn't provide kernel version
> Failed to parse test case 'Basic BPF llvm compiling test'
> test child finished with -1
> ---- end ----
> Test LLVM searching and compiling subtest 0: FAILED!
> -----------------------------------------------------
> 
> 
> Basic BPF LLVM compiling test is failing.
> It reports that bpf could not able to read the kernel version from uname.
> Is it because of this that 'perf test LLVM' is failing ?
> 
> My uname says:
> 4.9-xxxx-amd-x86-64
> 
> My kernel version is: 4.9.20 (from Makefile)
> 
> So, I dont think there is any problem with kernel version.
> 
> If any body have come across this problem please let me know how to
> resolve this issue.
> 
> 
> 
> Thank You!
> 
> Regards,
> Pintu

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [tools/perf] perf test LLVM failure on 4.9
  2018-01-23 12:37 [tools/perf] perf test LLVM failure on 4.9 Pintu Kumar
  2018-01-23 13:17 ` Arnaldo Carvalho de Melo
@ 2018-01-23 18:55 ` valdis.kletnieks
  2018-01-24  1:09 ` Wangnan (F)
  2 siblings, 0 replies; 5+ messages in thread
From: valdis.kletnieks @ 2018-01-23 18:55 UTC (permalink / raw)
  To: Pintu Kumar
  Cc: linux-kernel, kernelnewbies, quentin.monnet, daniel, davem,
	wangnan0, acme, alexander.shishkin, mingo

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

On Tue, 23 Jan 2018 18:07:25 +0530, Pintu Kumar said:

> My uname says:
> 4.9-xxxx-amd-x86-64

Literally 4.9-xxxx?  No 3rd number? And why 'xxxx'? (Hint - obfuscating doesn't
help here, it's hard to debug when we don't see the *actual* string.)

Some unames from my various machines:

4.15.0-rc7-next-20180112-dirty (x86_64 laptop)
4.9.35-v7+  (raspberry pi)
4.9.73   (Lede-based router)
3.10.0-229.20.1.el7.x86_64 (RHEL 7.3)
3.0.101-68-default (SLES 11.4)

I'm pretty sure the fact that your uname is only returning 2 numbers
before the '-' is the root cause of your problem.

[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [tools/perf] perf test LLVM failure on 4.9
  2018-01-23 12:37 [tools/perf] perf test LLVM failure on 4.9 Pintu Kumar
  2018-01-23 13:17 ` Arnaldo Carvalho de Melo
  2018-01-23 18:55 ` valdis.kletnieks
@ 2018-01-24  1:09 ` Wangnan (F)
  2018-01-24 14:53   ` Pintu Kumar
  2 siblings, 1 reply; 5+ messages in thread
From: Wangnan (F) @ 2018-01-24  1:09 UTC (permalink / raw)
  To: Pintu Kumar, linux-kernel, kernelnewbies, quentin.monnet, daniel,
	davem, acme, alexander.shishkin, mingo



On 2018/1/23 20:37, Pintu Kumar wrote:
> Hi All,
>
> I am verifying all perf tests on Ubuntu-16 x86-64 platform using the
> kernel version 4.9.20.
> I have installed several others packages including: clang, llvm
>
> But, when I run 'perf test' I get some FAILURE.
> Specially, 'perf test LLVM' is failing.
>
> Please check the below error logs:
>
> ----------------------------------------------------
> # perf test LLVM
> 35: Test LLVM searching and compiling                        :
> 35.1: Basic BPF llvm compiling test                          : FAILED!
> 35.2: Test kbuild searching                                  : Skip
> 35.3: Compile source for BPF prologue generation test        : Skip
> 35.4: Compile source for BPF relocation test                 : Skip
> ----------------------------------------------------
>
> When I run with -v I get this:
>
> -----------------------------------------------------
> # perf test -v LLVM
> 35: Test LLVM searching and compiling                        :
> 35.1: Basic BPF llvm compiling test                          :
> --- start ---
> test child forked, pid 3304
> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'
> WARNING:        unable to get correct kernel building directory.
> Hint:   Set correct kbuild directory using 'kbuild-dir' option in [llvm]
>          section of ~/.perfconfig or set it to "" to suppress kbuild
>          detection.
>
> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'
>
>
> int _version SEC("version") = LINUX_VERSION_CODE;
> ' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS
> -DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS
> $KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign
> -working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o
> -
> libbpf: 2129190-4a0 doesn't provide kernel version
> Failed to parse test case 'Basic BPF llvm compiling test'
> test child finished with -1
> ---- end ----
> Test LLVM searching and compiling subtest 0: FAILED!
> -----------------------------------------------------
>
>
> Basic BPF LLVM compiling test is failing.
> It reports that bpf could not able to read the kernel version from uname.
> Is it because of this that 'perf test LLVM' is failing ?
>
> My uname says:
> 4.9-xxxx-amd-x86-64

'perf test LLVM' requires a well formed uname string (%d.%d.%d). Please see
tools/perf/fetch_kernel_version . If your distro uses another method to 
report
kernel version number (from your uname string, sublevel can't be 
determined),
please help us improve that function like what we have done for ubuntu
(checking /proc/version_signature).


> My kernel version is: 4.9.20 (from Makefile)
>
> So, I dont think there is any problem with kernel version.
>
> If any body have come across this problem please let me know how to
> resolve this issue.
>
>
>
> Thank You!
>
> Regards,
> Pintu



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [tools/perf] perf test LLVM failure on 4.9
  2018-01-24  1:09 ` Wangnan (F)
@ 2018-01-24 14:53   ` Pintu Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Pintu Kumar @ 2018-01-24 14:53 UTC (permalink / raw)
  To: Wangnan (F), Pintu Kumar
  Cc: linux-kernel, kernelnewbies, quentin.monnet, daniel, davem, acme,
	alexander.shishkin, mingo

Hi,

Thanks for your help.
Yes it was a sub version issue.

Earlier, while building the kernel I left the SUBLEVEL as blank.

make -j8 bindeb-pkg SUBLEVEL=20

After passing the correct sublevel now the test is working.

But still following are failing:

16: Try 'import perf' in python, checking link problems      : FAILED!
37.2: Test BPF prologue generation                           : FAILED!


This is the error I get:

16: Try 'import perf' in python, checking link problems      :
--- start ---
test child forked, pid 7637
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named perf
test child finished with -1
---- end ----
Try 'import perf' in python, checking link problems: FAILED!


Looking at the vmlinux_path (8 entries long)
symsrc__init: cannot get elf header.
Failed to find the path for kernel: Invalid ELF file
bpf_probe: failed to convert perf probe eventsFailed to add events
selected by BPF
test child finished with -1
---- end ----
Test BPF filter subtest 1: FAILED!



Thanks,
Pintu


On Wed, Jan 24, 2018 at 6:39 AM, Wangnan (F) <wangnan0@huawei.com> wrote:
>
>
> On 2018/1/23 20:37, Pintu Kumar wrote:
>>
>> Hi All,
>>
>> I am verifying all perf tests on Ubuntu-16 x86-64 platform using the
>> kernel version 4.9.20.
>> I have installed several others packages including: clang, llvm
>>
>> But, when I run 'perf test' I get some FAILURE.
>> Specially, 'perf test LLVM' is failing.
>>
>> Please check the below error logs:
>>
>> ----------------------------------------------------
>> # perf test LLVM
>> 35: Test LLVM searching and compiling                        :
>> 35.1: Basic BPF llvm compiling test                          : FAILED!
>> 35.2: Test kbuild searching                                  : Skip
>> 35.3: Compile source for BPF prologue generation test        : Skip
>> 35.4: Compile source for BPF relocation test                 : Skip
>> ----------------------------------------------------
>>
>> When I run with -v I get this:
>>
>> -----------------------------------------------------
>> # perf test -v LLVM
>> 35: Test LLVM searching and compiling                        :
>> 35.1: Basic BPF llvm compiling test                          :
>> --- start ---
>> test child forked, pid 3304
>> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'
>> WARNING:        unable to get correct kernel building directory.
>> Hint:   Set correct kbuild directory using 'kbuild-dir' option in [llvm]
>>          section of ~/.perfconfig or set it to "" to suppress kbuild
>>          detection.
>>
>> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64'
>>
>>
>> int _version SEC("version") = LINUX_VERSION_CODE;
>> ' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS
>> -DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS
>> $KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign
>> -working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o
>> -
>> libbpf: 2129190-4a0 doesn't provide kernel version
>> Failed to parse test case 'Basic BPF llvm compiling test'
>> test child finished with -1
>> ---- end ----
>> Test LLVM searching and compiling subtest 0: FAILED!
>> -----------------------------------------------------
>>
>>
>> Basic BPF LLVM compiling test is failing.
>> It reports that bpf could not able to read the kernel version from uname.
>> Is it because of this that 'perf test LLVM' is failing ?
>>
>> My uname says:
>> 4.9-xxxx-amd-x86-64
>
>
> 'perf test LLVM' requires a well formed uname string (%d.%d.%d). Please see
> tools/perf/fetch_kernel_version . If your distro uses another method to
> report
> kernel version number (from your uname string, sublevel can't be
> determined),
> please help us improve that function like what we have done for ubuntu
> (checking /proc/version_signature).
>
>
>
>> My kernel version is: 4.9.20 (from Makefile)
>>
>> So, I dont think there is any problem with kernel version.
>>
>> If any body have come across this problem please let me know how to
>> resolve this issue.
>>
>>
>>
>> Thank You!
>>
>> Regards,
>> Pintu
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-24 14:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 12:37 [tools/perf] perf test LLVM failure on 4.9 Pintu Kumar
2018-01-23 13:17 ` Arnaldo Carvalho de Melo
2018-01-23 18:55 ` valdis.kletnieks
2018-01-24  1:09 ` Wangnan (F)
2018-01-24 14:53   ` Pintu Kumar

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).