6 Replies Latest reply on Jul 18, 2011 3:51 PM by a.green

    no TBP configuration

    a.green

      dear developers

      I want to use codeanalyst in linux  it to perform a time based profiling (TBP). However I don't why there is no such option in session configuration. I am able to do a EBP only.

      The version of codeanalyst I have is:

      version 2.11.4-public

      Please see the pictures and help.

      main window: myurl

      session window: myurl

        • no TBP configuration

          Hello,

          On Linux, the profiling is currently performed by the oprofile driver, which doesn't use the same timer mechanism as the Windows driver.  To get a timer-based sample profile, you can use the performance counter event 0x076, cpu cycles unhalted.  That will take periodic samples based on the speed of each core.  You can use the approximate mHz of the system to calculate the period of the event you want.

          I hope this helps,

            • no TBP configuration
              a.green

              question: what is the reason that codeanalyst doesn't reply on system timer inlinux?

              I don't know if the "cpu cycles unhalted" counter is exactly the same as TBP. I want to find the hot spot of the code to see which loop is critical.

                • no TBP configuration

                  On Windows, the TBP is driven by the APIC timer.  On Linux, AMD CodeAnalyst uses the oprofile to perform profiling and oprofile doesn't support the APIC timer.

                  The cpu clocks unhalted event will increment for each cpu clock cycle.  You can figure out approximate how many clock cycles per second for your sytem, since 1 MHz = 1000000 cycles/second.

                  For example, if your system is 3 GHz ( 3000000000 cycles/second) and you want one sample every second, then the event count for event 0x76 is 3000000000.  If you want a sample every miliSecond, then the event count is 3000000000 / 1000 = 3000000.

                  It will definitely show you the hot spots in your code.  Another good event to get execution hot spots is event 0x0c0, Retired instructions.

                    • no TBP configuration
                      a.green

                      That counter only shows cpu clocks. However as I read inthe tutorials, with TBP, I can see which loop is critical. With that counter it is not possible. I hope that there is a way to do an exact TBP in linux

                        • no TBP configuration

                          I don't see how it is "not possible" to see what loop is critical with the cpu clock cycles event profiling.  When I did two comparison runs on Windows, one with the TBP and one with the cpu clock cycles event scaled to my system per my previous post.  The samples were approximately equal (11911 TBP vs 11775 event 0x076).  The distribution through the functions and source lines was consistent.

                          Using the cpu clock cycles event should give you the critical loop information and hot spot information that you need.

                            • no TBP configuration
                              a.green

                              I want to do as this guide says developer.amd.com/Assets/Introduction_to_CodeAnalyst.pdf especially fig 9 and 10

                               

                              If it is possible to do such thing in linux, please let me know. If it is not possible, please consider that and I hope it will be possible in next release.