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.

TI_start/stop_pprof_collection() early exit problem

Other Parts Discussed in Thread: SYSBIOS

Hi, I am doing some code optimization over C6748 H/W  via run time feedback. I've ticked  the -gen_profile_info option box in CCS5 tabs. But I did not get any *.pdat file generated. Upon close inspection, I found it is due to early exit in TI_start/stop_pprof_collection(). Internal variables  _TI_pprof_out_hndl =  -1  and _TI_prof_data_start = -1 etc.. I can not understand why this happens? Did I missed something here? thanks!  

Regards

ZFYoung

  • zhongfan yang said:
     Internal variables  _TI_pprof_out_hndl =  -1  and _TI_prof_data_start = -1 etc..

    I cannot reproduce this result.  I'd appreciate if you would submit your project so I can try to understand how that happened.

    Thanks and regards,

    -George

  • My apology for not making clear about the context of the project. My project is used with SYSBIOS, and is written in C++. I connect the CCS to target board via emulator, and run under RELEASE mode. 

    When I switch on the - -gen_profile_info, compile and run the test, the program is stuck in  TI_stop_pprof_collect() and never exit (like in a dead cycle). I thought the the compiler warning: "creating output section ".ppdata" without a SECTION" is to blame, so I added the line "Program.sectMap[".ppdata"] = "DDR" into the *.cfg file. Now it gives no warning anymore, but TI_start /stop_pprof_collect() will exit early due to internal error.

    I don't know where I take the wrong step.This is the first time I use feedback optimization and I thought the process should be straightforward. Enclosed is the exported project (Note: the IO file test is OK with my system.) Any advice is appreciated!

    Regards

    ZFYoung

     3568.Test.zip

     

  • I still cannot reproduce the problem.

    I cannot run the code.  I lack the hardware.  But I can build it.  When I look for the pprof variables in the map file, this is what I see ...

    c0813b80   __TI_start_pprof_collection
    c0812d40   __TI_stop_pprof_collection
    c0815d40   ___TI_pprof_out_hndl
    

    Nothing is -1.  So I still cannot tell you why you see -1 for some or all of the symbols.

    Thanks and regards,

    -George

  • Thanks for your timely response! Did you notice the line:"//Program.sectMap[".ppdata"] = "DDR";" that I've commented out in Test.cfg? If that line is in effect, It will cause the early exit problem. If it is not included in compile process as it is now, program will stuck in  TI_stop_pprof_collection() and never return. Neither generates *.pdat file successfully. 

    Regards

    ZFYoung

     

  • zhongfan yang said:
     Did you notice the line:"//Program.sectMap[".ppdata"] = "DDR";" that I've commented out in Test.cfg? If that line is in effect, It will cause the early exit problem.

    When I uncomment that line, I still see all the pprof symbols have sensible addresses, i.e. not -1.  So I still cannot reproduce that part of your problem.

    Thanks and regards,

    -George

  • Well...Seems like a dead end to me. Anyway, I like to know: Normally when generating feedback file *.pdat,  "-gen_profile_info" switch is enough or other changes in the project config is still needed? ie. should I ignore the linker waring: "creating output section ".ppdata" without a SECTION " or not ?

    Regards

    ZFYoung

  • zhongfan yang said:
    Normally when generating feedback file *.pdat,  "-gen_profile_info" switch is enough or other changes in the project config is still needed?

    Normally --gen_profile_info is all you need.  However ...

    zhongfan yang said:
    should I ignore the linker warning: "creating output section ".ppdata" without a SECTION "

    You should never ignore this warning, for any section.  The linker is saying that it allocates .ppdata in whatever memory range it finds that can hold it.  This is almost certainly the wrong one.  You want to place all of your output sections explicitly.

    Thanks and regards,

    -George

  • Hi, George, Since you can not repeat my observation, I've update the project to reflect the problem in my system(Nothing special, just some section reassignment directive in test.cfg file) . Hope you can take a look, Thanks !

    Regards

    ZFYoung 

    1220.Test.zip

  • Thank you, but no luck once again.

    I do have to make a few changes to the project so it will build.  I don't think these changes make a difference, but they might.  So I will describe them.

    The first is that I remove the reference to D:\packages in the list of package repositories used by the RTSC option --xdcpath.  Then I change the RTSC platform from ti.platforms.LCSDK6748 (or something like that) to ti.platforms.evm6748.  Then I add the compiler option --gen_profile_info.  After those changes, I check the values of the pprof related symbols in the map file.  I hope to see one of them set to -1.  But I never do.

    Thanks and regards,

    -George

  • I've found the workaround of this nuisance: mem copying via the memory view tools in CCS GUI. By copying the ".ppdata" section out of the paused system to a separate file and re-using the predefined functions in compiler source code, I can recover the necessary data. Result from post processing tool "pdd6x.exe" proves it works. A key note for guys who have similar problems: ".ppdata" DO have to be placed in a defined section and abide by the alignment rules. And thanks George for your patience. Great to have your input.

    Regards

    ZFYoung