I did a testing on a normal PC and it worked. Thanks.

However, I'm using gcc nios2 port. The executable file is downloaded
to a board, which is attached to my PC. So while the executable file
is running on the board, it doesn't produce any gcda file.

According to Altera nios2 people, I can do some configuration, so that
the executable will be able to output to Host PC through normal fputs
or fwrite.

So is it feasible that I can make executable to output gcda file to my
Host PC via fputs or fwrite?


Regards,
Haibin



On 2/21/06, Paolo Bonzini <[EMAIL PROTECTED]> wrote:
> Liu Haibin wrote:
> > Hi,
> >
> > I wanted to use bb->count, so I expected that -fprofile-arcs and
> > -fbranch-probabilities would help. I added printf just before
> > peephole2 optimization and ran the following.
> >
> > $gcc -O3 -fprofile-arcs test.c -o test
> > $./test (which produced test.gcno only, but no test.gcda)
> > $gcc -O3 -fprofile-arcs -fbranch-probabilities test.c -o test
>
> Easier to use -fprofile-generate and -fprofile-use:
>
> gcc -O3 -fprofile-generate test.c -o test (produces test.gcno)
> ./test (now should have as well test.gcda)
> gcc -O3 -fprofile-use test.c -o test
>
> Paolo
>

Reply via email to