Open Philius opened 1 year ago
I'm not sure why you need to define the functions. If you define those functions in the ffmpeg, it won't call the external functions in uftrace (libmcount.so).
Anyway, there're a lot of reasons it can go wrong. You can limit functionality to avoid the trouble. First, try not to use --nest-libcall
.
I didn't know I could just leave the implementations out completely.
With them removed it still builds and runs on its own - good to know.
I tried not using --nest-libcall. It appears to be the reason for the problem.
I thought I needed it to trace the libraries ffmpeg uses - that's where all the good stuff is.
It still appears to be showing library calls so that's good for me.
I tried uftrace graph --srcline > uftrace.txt
but the file and line number information isn't displayed, even though
I changed -g
to -ggdb
in the configure script call above.
It isn't clear if you need to re-run uftrace record
to get file names and line numbers.
I tried both with and without - no luck.
You could try v4l2loopback to turn your desktop into a simulated camera if you don't have a real camera and mic.
Anything else you need, I'm glad to help.
I'm happy it worked for you.
As far as the srcline is concerned, you need to run uftrace record
with --srcline
option first. Other analysis commands like uftrace replay
or uftrace graph
cannot use the info if it's not recorded.
you need to run uftrace record with --srcline option first.
How about making --srcline
enabled by default just like we did it for python tracing? This might reduce confusion to general users.
Unlike Python, it needs to parse the DWARF info separately which might take some time and it would delay the start of target program.
Maybe we can measure the time for DWARF parsing and think again. It might not be that serious as we concerns.
If I run
then it works as expected, but with
I get
On Debian Bookworm the ffmpeg version is ffmpeg-5.1.2. I compiled it from source to get debugging symbols, lower optimization, frame pointers and -finstrument-functions:
-finstrument-functions requires callback implementations which I did with a header file
#included
in ffmpeg.c called profiler.h: