Open ghost opened 6 years ago
Hi, thanks for using uftrace. There should be nothing special for C++ programs. Could you please show me the output of uftrace info
?
# system information
# ==================
# program version : uftrace v0.6.2
# recorded on : Thu Dec 28 14:15:10 2017
# cmdline : uftrace record ./src/osmo-pcu -c /home/max/.config/osmocom/osmo-pcu.cfg-edge
# cpu info : Intel(R) Core(TM) i5 CPU U 470 @ 1.33GHz
# number of cpus : 4 / 4 (online / possible)
# memory info : 0.1 / 3.5 GB (free / total)
# system load : 0.98 / 0.93 / 0.74 (1 / 5 / 15 min)
# kernel version : Linux 4.13.0-22-lowlatency
# hostname : pbell
# distro : "Ubuntu 17.10"
#
# process information
# ===================
# number of tasks : 1
# task list : 10509
# exe image : /home/max/source/gsm/osmo-pcu/src/osmo-pcu
# build id : bf89626396c53e057b298260e394be6c0e22ad9e
# exit status : unknown exit status: -1
# cpu time : 0.000 / 0.000 sec (sys / user)
# context switch : 0 / 0 (voluntary / involuntary)
# max rss : 0 KB
# page fault : 0 / 0 (major / minor)
# disk iops : 0 / 0 (read / write)
To add support for uftrace I've added -pg
for project's CFLAGS and CPPFLAGS. Should I add some linker options as well?
No, it should be enough. But your uftrace version is old, is it possible for you to build from latest source? You need to install libelf-dev
package.
Is there some ppa available? The repo does not have debian/ so building .deb would require combining ubuntu's packaging with latest master or release.
Hi @osmoc, You better follow the quick install guide from source file. https://github.com/namhyung/uftrace/blob/master/INSTALL.md#quick-guide
@osmoc I uploaded a packaged version to my PPA for Ubuntu Xenial: https://launchpad.net/~csaba-kertesz/+archive/ubuntu/random/
@kecsap cool, thanks. Unfortunately I'm using artful (ubuntu 17.10).
I think you can just download the package and install. I don't think it should be incompatible. I usually download, install packages (C++ tools) from later Ubuntu releases and install on Xenial without any usability problem.
I've been able to record the trace but when I try to graph it I got the error:
uftrace: cannot find graph for 'main'
The report also looks odd:The file names are used instead of functions. For .c project it works as expected. Is there something special required for .cpp?