--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
Profiling with pprof and my own tools worked for me in the last few
months, with gcc and gold.
Can you provide more details about how 'perf report' is failing?
If it's not finding any symbols, what does nm/objdump have to say
about symbols in the binary in question? Is gdb able to find symbols?
These addresses look like it's *not* ASLR at least.
> GDB tells me that 0x1c1001d and 0x1be2cea map to the functions
> MessageLoop::DoWork() and MessageLoop::Run(), so it looks like the profile
> is being gathered correctly. I also know that symbols exist, since GDB is
> able to tell me what these addresses map to. This makes me wonder if there
> is something unusual about the way I'm compiling that confuses the perf
> report tool.
>
> For completeness, here's a list of errors printed by perf report. I didn't
> see anything in here that looked significant, so I omitted them from the
> previous listings.
Random guess, but perhaps the way Chrome launches itself is confusing
perf in which file (path) to look in for debug info.
I see bug reports in this area like
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/608775 and
https://lkml.org/lkml/2009/10/31/42 .
Are you running perf with a cwd containing your 'chrome' binary?
Perhaps try running 'perf report' via strace to see whether or where
it's looking for the binary (or separate debug info) to analyze.
Another approach might be to try to reduce zygote complexity via
--no-sandbox; like say maybe PID namespaces are confusing things.
I notice someone else had this same problem on the list earlier:
https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/db97f1e8c6dec825
Though I've never tried it myself, I believe pprof should work with
multiple threads. (After all, it's the primary tool used for
profiling Google servers and they use multiple threads.) The docs
claim as much as well (as long as you're on Linux 2.6, heh).
upthread we were talking about profiling *threads*, not processes,
which is what I was confirming is supported.
But to respond to that as well, profilling child processes with pprof
also works (it creates a different profile dump per process and you
pick which dump to analyze). You need to be sure to disable the
sandbox so that pprof can write out its dumps.
In all, it might be better long-term to get perf working, but pprof is
relatively easy to understand and works.
Sorry, I just realized this was sent to chromium-dev not chromium-os-dev, so forget my question about if you're using the chromium-os version of perf.One thing you can do to try to see if you're hitting this bug, is to wait until chromium is started up and running before starting perf. That seems to cover up the problem as well.