Git Product home page Git Product logo

Comments (13)

maksfb avatar maksfb commented on June 21, 2024

It could be the new format of perf output. What is the perf version that your are running and on what hardware? Ideally I'd like to see the output of perf script -F pid,brstack ..., or at least at a part of it that was causing the trouble.

Also, our diagnostics was broken. Could you please pull the latest changes and re-run the command?

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

./perf --version
perf version 3.10.0-693.5.2.el7.x86_64.debug
The hardware is Intel Xeon Phi 7250. The hardware i am running perf2bolt, though is Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz, same kernel and OS version, Centos 7.

Will respond your other questions later.
Thanks.

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

With the fixed diagnostics it looks like this:

Error reading bolt data input file: line 1, column 43: expected single char for mispred bit
Found: -
PERF2BOLT: Failed to parse samples

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

sudo perf script -f -F pid,brstack
First few lines of output:

 7466  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0 
 7466  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0 
 7466  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0 
 7466  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0  0xffffffff816ac32c/0x7f2c9cf100fe/-/-/-/0

from bolt.

maksfb avatar maksfb commented on June 21, 2024

For the perf issue it's an easy fix, assuming that otherwise the output format is the same. If you can upgrade to perf version 4.5 or later it might be easier to guarantee that. The more serious issue I see is with __intel_avx_rep_memcpy and __intel_new_memcpy functions referenced in the log. We'll need to add a support for jump tables / data in code, otherwise we cannot process them in relocation mode. The workaround is to use -relocs=0, and it is not good for performance.

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

Grabbed perf from kernel 4.5:
by git checkout v4.5 and compiled it.
$ perf --version
perf version 4.5.gb562e4

Collected traces :
./perf record -e cycles:u -j any,u -o perf.data -- (...)

Then on a different machine after copying the perf.data:
sudo perf script -F pid,brstack -f

172359  0xffffffff816ac32c/0x7fc9b763c0fe/-/-/-/0 
172359  0xffffffff816ac32c/0x7fc9b763c0fe/-/-/-/0  0xffffffff816ac32c/0x7fc9b763c0fe/-/-/-/0 
172359  0xffffffff816ac32c/0x7fc9b763c0fe/-/-/-/0  0xffffffff816ac32c/0x7fc9b763c0fe/-/-/-/0  0xffffffff816ac32c/0x7fc9b763c0fe/-/-/-/0 

I have also tried perf version 4.14.rc5.g7c584a with the same results.

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

I guess the problem here is not in perf version but possibly perf on KNL not supporting the correct hw event.
From:
https://gitlab.imag.fr/kaunetem/linux-kaunetem/commit/dc323ce8e72d6d1beb9af9bbd29c4d55ce3d7fb0
M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported

I will have a look how perf gets it.

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

Yep this one is a KNL issue. On other CPU i got:
0xffffffff816ac32c/0x7f7b322365a0/P/-/-/0

from bolt.

maksfb avatar maksfb commented on June 21, 2024

Interesting. We only use misprediction bit for ICP optimization, so it should be safe to ignore it. I'll add a patch. Thank you for the investigation.

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

Great, thanks! So how about the intel memcpy (and others) replacements?
Is there anything i can do to help? Should a new issue be raised?

from bolt.

maksfb avatar maksfb commented on June 21, 2024

Is there any way to force intel compiler to use libc functions? It justifies the new issue in any case.

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

Looks good, closing:

PERF2BOLT: Waiting for perf tasks collection to finish...
PERF2BOLT: Parsing perf-script tasks output
PERF2BOLT: Input binary is associated with 1 PID(s)
PERF2BOLT: Waiting for perf events collection to finish...
PERF2BOLT: Aggregating branch events...
PERF2BOLT-WARNING: misprediction bit is missing in profile

from bolt.

J-cztery avatar J-cztery commented on June 21, 2024

Is there any way to force intel compiler to use libc functions?

-ffreestanding seems to cut it.
https://software.intel.com/en-us/forums/intel-c-compiler/topic/306063

from bolt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.