So i'm trying to optimize a file called
linpack.c. I have to use
gcov to find the 10 most executed lines. I've been given these compiler options:
-fprofile-arcs -ftest-coverage -O2
So i ran this
$ gcc -fprofile-arcs -ftest-coverage -O2 linpack.c
the output was
Now when I try to run
gcov linpack.c in order to generate
linpack.c.gcov I get an error:
linpack.gcda, cannot open data file.
Can someone tell me what I'm doing wrong? This should be straightforward but I have been struggling for more than an hour now.