This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler: AM335X TI Compiler 18.1.0LTS

Tool/software: TI C/C++ Compiler

I need to profile my project. I read Compiler User's Guide (v18.1.0LTS) chapter 3 clause 3.6.

Clause 3.6.1.1 tells my compile my project with --gen_profile_info and I've done it. And now, for phase 2 where and how I could get the *.pdat file?

  • Sergei Petrov said:
    I need to profile my project.

    The article Counting Cycles discusses the basics of profiling your code.  I suspect that is all you want to do. 

    This ...

     

    Sergei Petrov said:
    Compiler User's Guide (v18.1.0LTS) chapter 3 clause 3.6.

    ... talks about profile based optimization.  That is about collecting profile information in a particular format, then feeding that information back into the compiler so it can make even better optimization decisions.  It is not really about understanding the performance of your code.

    Please let me know if profile based optimization is what you really intend to do.

    Thanks and regards,

    -George

  • George Mock said:

    ... talks about profile based optimization.  That is about collecting profile information in a particular format, then feeding that information back into the compiler so it can make even better optimization decisions.  It is not really about understanding the performance of your code.

    Please let me know if profile based optimization is what you really intend to do.

    Thanks and regards,

    -George

    So, I thought this is about understanding the performance. But this way interesting bay the way. And my question does not disappear: where and how can I get the *.pdat file?

  • Sergei Petrov said:
    where and how can I get the *.pdat file?

    Build with the option --gen_profile_info to create an instrumented executable.  Then run this instrumented executable.  While it runs, data is collected.  When the program exits, or the function _TI_stop_pprof_collection is called, the data is written out to the .pdat file.

    Thanks and regards,

    -George

  • So, I've found my *.pdat file. I feed it armpdd and got *.prf file with zero size. What can be cause its size is zero? May be I've fogotten turn on DWARF?

  • It is likely that your .pdat file contains no data.  And that is probably because there is some problem in writing out the file.  

    To check on that possibility, please follow the suggestions in the article Tips for using printf.  Focus on getting a simple hello world program to work.

    Please let me know if this resolves the problem.

    Thanks and regards,

    -George

  • So, I've read it, but didn't understand, how C I/O must help me. I played my app a lot of time and in a *.pdat file only nulls. do i have to increase size of heap?

  • Just for now, set aside your main project.  Start a new one that is much smaller.  All it does is print out hello world.  It probably won't work for the same reason that the main project does not write out the profile data.  Use the suggestions in the printf article to get this small project to work.  Then apply those fixes to your main project.

    Thanks and regards,

    -George