Code profiling using "execution counts" - why it is dead for ARM CPUs ?

Comments

5 comments

  • Avatar
    Michael Johnson

    There isn't a non-intrusive way of sampling the PC on ARM7-S/ARM9-S without stopping the CPU. You could use a timer interrupt and a RAM buffer. We'd just need a way of getting that data into the Execution Counts window.

    0
    Comment actions Permalink
  • Avatar
    Jarosław Karwik

    Well,  ARM9 is quite old architecture ( compared to Cortex - these may have possibility to scan PC - I do not know them that well).

    Even if you have to halt the core, it still should be much faster then my timer interrupt procedure - especially that LPC32xx interrupt controller with Crossworks environment does not support nested interrupts ( and I use FIQ for fast data aquisition ). As far as I can say from reading ARM documentation it requires just few JTAG commands - maybe it can execute it as stream ( have not looked at their API yet - I was tempted to use it and process PC dump myself using LUA scripts and my firmware memory map)

    Anyway - is there some documentation how to feed Execution Counts window ? I would try that from my FIQ if nothing else works.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Which document are you reading? To get at the ARM9 register state from JTAG isn't trivial.

    There currently isn't a way of supplying a memory buffer to the execution counts window - I can look into doing this if you will use it.

    0
    Comment actions Permalink
  • Avatar
    Jarosław Karwik

    Well - just ARM official docs

    http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0205a/index.html

    I spent few years working on CPU chipset embedded controllers (as power on engineer) and I had to learn more about JTAG then I really intended.

    About "Execution counts" -  I will ask Segger if they share their SDK - then I can do it directly without Crossworks ( just using map file), but if you can provide easy way to use it - I will be interested.

     

     

    0
    Comment actions Permalink
  • Avatar
    Jarosław Karwik

    Hi,

    I just got  J-link SDK license. I plan to do profiler ( which uses Jlink to scan PC ). I wanted to do standalone application ( which uses project map generated by the compiler), but if there is a way to put it int Crossworks IDE I would be glad to create plugin or external tool for it

    0
    Comment actions Permalink

Please sign in to leave a comment.