Git Product home page Git Product logo

Comments (4)

MichaelLogutov avatar MichaelLogutov commented on July 29, 2024

Got the same trying to use perfcollect to profile running container.
My scenario was like this:

  1. find container (docker ps | grep ...)
  2. find it's pid (docker top)
  3. profile it (./perfcollect collect test -pid 12345)

And after Ctrl+C I've got a warning libcoreclr.so not found in perf data. Please verify that your .NET Core process is running and consuming CPU.

And empty trace file.

from corefx-tools.

sywhang avatar sywhang commented on July 29, 2024

Hi @codeSonic,

Could you please provide us with a bit more information? Specifically:

  • Which version of lttng are you using? (you can get this via the command lttng --version)
  • Would it be possible for you to share that trace with us? If not, a minimal repro app that we can trace on our machines would be helpful for us to take actions on this issue faster.

@MichaelLogutov What you are seeing seems to be a different issue... Just to clarify, are you trying to run the perfcollect script inside your Docker container, or are you running it from the host machine? If you're running it from the host machine that's expected because perfcollect won't be able to see that PID inside its own process map. You'd want to run perfcollect from Docker itself. You can check out an example of how to do that in https://github.com/dotnet/corefx-tools/blob/master/src/performance/perfcollect/docker-demo/Dockerfile. If that doesn't solve your issue, could you file a different issue and we can take it there so that we don't have two separate issues going on in the same thread?

Thanks!

from corefx-tools.

paraspatidar avatar paraspatidar commented on July 29, 2024

Hi ,
Similer issue here.
I have collected trace form Kubernetes container.
when viewing in to container itself by unziping trace and using perf report , it shows all call stack.

however , when i copy same trace zip on windows , it shows events and eventstats but CPU stacks are empty (same as shown by @codeSonic .

here are sample traces :
https://drive.google.com/uc?id=1ZM35Cf4WfkckUMigSo0qhwbbdhSEXPBm&export=download

and

https://drive.google.com/file/d/1cg0TnD6VjKcgm89upmZ8Pvn8QW8vIksN/view?usp=sharing

lttng version : lttng (LTTng Trace Control) 2.9.3 - Joannès
container OS :
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

perf version : perf version 5.0.rc7.g8a61716
perview version : 2.0.26

PS : for dotnet core container , perfcollect install is unable to install perf , thus i manually build perf executable using :

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

cd linux/tools/perf

make

cp perf /usr/bin

from corefx-tools.

sywhang avatar sywhang commented on July 29, 2024

Thanks @paraspatidar!

I took a quick look and it seems like this issue may be a duplicate of #84. In perfcollect.log, I can see:

Running /usr/bin/perf script -i perf.data.merged -F comm,pid,tid,cpu,time,period,event,ip,sym,dso,trace > perf.data.txt
'trace' not valid for hardware events. Ignoring.
'trace' not valid for software events. Ignoring.
'trace' not valid for hardware-cache events. Ignoring.
'trace' not valid for unknown events. Ignoring.
'trace' not valid for unknown events. Ignoring.
'trace' not valid for unknown events. Ignoring.
Samples for 'cpu-clock' event do not have CPU attribute set. Cannot print 'cpu' field.

Running /usr/bin/perf script -i perf.data.merged -f comm,pid,tid,cpu,time,event,ip,sym,dso,trace > perf.data.txt
  Error: Couldn't find script `comm,pid,tid,cpu,time,event,ip,sym,dso,trace'

 See perf script -l for available scripts.

So in the end perf.data.txt file is not created due to this error and that file is what PerfView reads when it tries to print the stack so you're seeing the empty cpu stacks.

I'll investigate further and get back with a fix soon but just wanted to share this so that your concerns aren't left unanswered :-)

from corefx-tools.

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.