We are trying to profile code according to spru187S.In section 3.8.4, it says we need to use "TI_start_pprof_collection", "TI_stop_pprof_collection" to get profile data.But we don't know which file to include and which lib to link.Is there a simple sample to demonstrate the profile function?Thanks.
PS. We are using 6616, cgtools version 7.2.3, ccs version 4.2.3
You don't need to include anything. You link with the ordinary compiler RTS library. The presentation on this wiki page includes a slide titled Path Profiling, which gives an overview of the process.
Thanks and regards,
-George
TI C/C++ Compiler Forum ModeratorPlease click Verify Answer on the best reply to your question.The Compiler Wiki answers most common questions.Track an issue with SDOWP. Enter your bug id in the "Find Record ID" box.
Thanks, I'll try that.
I did some search, found _TI_start_pprof_collection and _TI_stop_pprof_collection definition are in Pprof_user.c.
But there is still some problem when compile with --gen_profile_info.
When linking, it complains:
error #10194: symbol "__TI_path_prof_out" used in expression before it has been assigned a value
I also searched for "__TI_path_prof_out", found it is a function in Pprof_cio.c. So why does this happen?
Best Regargs
Samhoo
Are you compiling pprof_cio.c as part of your build? Don't do that. Link the RTS library into your application normally, and the function __TI_path_prof_out will be brought in from that library as needed.
If that doesn't fix your problem, then I need to see how you are getting this error. Because I cannot reproduce it.
I didn't compile pprof_cio.c.
And the information is strange. If I use a function which has no definition, there would be "error #10234-D: unresolved symbols remain"
This info “error #10194: symbol "__TI_path_prof_out" used in expression before it has been assigned a value” seems like compiler treat "__TI_path_prof_out" as a variable.
What information do you need?
Best Regards
Are you referring to the symbol __TI_path_prof_out in your linker command file?
No. And if not comiling with --gen_profile_info, there would be no problem.
To summarize ... Everything builds fine. Then, when you add --gen_profile_info, you get that error message when linking. Is that right?
It is likely I will need your whole project to reproduce this. But let's try one last thing before going to that extreme. Show me exactly how the compiler is invoked, and everything the compiler dumps out to the command shell, when you build. I might be able to figure it out from that, but I doubt it.
Yes, that's right.
Maybe I can't provide the project, I'll see what I can do, thanks.
Best regards
Anyway, we setup another project, and at least we can get pprofout.pdat, generate pprofout.prf. Some codes can generate coverage csv file.
But in the coverage csv file, all the frequency count are zero.( line number and column number seem to be correct)
What can be the problem?
Sorry, but I have very little idea what could be wrong. The data is written out by calling fwrite. It may not be working properly due to one of the issues described in http://processors.wiki.ti.com/index.php/Tips_for_using_printf .
We are now using XDS560 emulator. It seems has no "core trace" or "system trace" ability.
Can it be the reason why we can't get the profile data?
Neither the path profiling capability, nor the implementation of fwrite, depends upon any trace feature in the emulator. So, no, that can't be the reason.
Hi
I have more or less the same problem with profiling option.
I have added the --gen_profile option to the compiler, and I am able to compile and run the code, but I do not get any *.pdat file.
FYI I do not use a CCS project, instead I invoke the compiler from a command line
If I call the functions TI_start_pprof_collection() and TI_stop_pprof_collection() from my source code, i get a Linker error
error LNK2019: unresolved external symbol _TI_start_pprof_collection referenced in function xxx
I connect to the DSP (C6713) using a XDS510 USB emulator
Can You tell me which compiler RTC library I need to use?
Thanks
Jens Biltoft