• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » TI C/C++ Compiler » TI C/C++ Compiler - Forum » How to profile
Share
TI C/C++ Compiler
  • Forum
Options
  • Subscribe via RSS

How to profile

How to profile

  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Dec 27 2011 19:35 PM
    Prodigy80 points

    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

    profile
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Dec 27 2011 23:08 PM
    Guru51290 points

    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 Moderator
    Please 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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Dec 29 2011 19:15 PM
    Prodigy80 points

    Thanks, I'll try that.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Jan 11 2012 01:57 AM
    Prodigy80 points

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Jan 11 2012 14:50 PM
    Guru51290 points

    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.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please 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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Jan 12 2012 00:45 AM
    Prodigy80 points

    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

    Samhoo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Jan 12 2012 14:41 PM
    Guru51290 points

    Are you referring to the symbol __TI_path_prof_out in your linker command file?

    -George


    TI C/C++ Compiler Forum Moderator
    Please 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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Jan 12 2012 19:27 PM
    Prodigy80 points

    No. And if not comiling with --gen_profile_info, there would be no problem.

    Best Regards

    Samhoo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Jan 13 2012 13:52 PM
    Guru51290 points

    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.

    Thanks and regards,

    -George 


    TI C/C++ Compiler Forum Moderator
    Please 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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Jan 17 2012 00:44 AM
    Prodigy80 points

    Yes, that's right.

    Maybe I can't provide the project, I'll see what I can do, thanks.

    Best regards

    Samhoo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Feb 04 2012 02:47 AM
    Prodigy80 points

    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?

    Best regards

    Samhoo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Feb 06 2012 16:39 PM
    Guru51290 points

    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 .

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please 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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samhoo Xee92378
    Posted by Samhoo Xee92378
    on Feb 24 2012 00:12 AM
    Prodigy80 points

    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?

    Best Regards

    Samhoo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Feb 24 2012 09:46 AM
    Guru51290 points

    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.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please 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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jens Biltoft
    Posted by Jens Biltoft
    on Apr 12 2012 07:58 AM
    Prodigy110 points

    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

    C6000 C I/O optimizer CCS compiler RTS library
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use