Performance monitoring for odroid-xu

jsubirat
Posts: 39
Joined: Mon Oct 28, 2013 8:57 pm
languages_spoken: english, catalan, spanish
ODROIDs: ODROID-XU+E
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by jsubirat »

So yes, mine is a 5250 then:

[ 0.000000] Machine: SAMSUNG EXYNOS5 (Flattened Device Tree), model: Insignal Arndale evaluation board based on EXYNOS5250

micrel.odroid
Posts: 15
Joined: Thu Oct 10, 2013 2:33 am
languages_spoken: english italian
ODROIDs: ODROID-XU+E ODROID-XU3
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by micrel.odroid »

hi guys, any of you knows if the PMU issue is fixed on the new ODROID-XU3?
thanks

figual
Posts: 4
Joined: Wed Sep 03, 2014 10:07 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by figual »

Hi,

We are also interested in this topic. Has it been solved on the XU-3?

Thanks,

User avatar
odroid
Site Admin
Posts: 37403
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1797 times
Been thanked: 1143 times
Contact:

Re: Performance monitoring for odroid-xu

Post by odroid »

Nope. :(

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 60 times
Contact:

Re: Performance monitoring for odroid-xu

Post by memeka »

Given all the talk here, I think there are small chances this is kernel issue... looks to me more like u-boot, or bl1/bl2...

jsubirat
Posts: 39
Joined: Mon Oct 28, 2013 8:57 pm
languages_spoken: english, catalan, spanish
ODROIDs: ODROID-XU+E
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by jsubirat »

If it is a u-boot or bl1/bl2 issue, do you think it will be fixed? If it is a kernel issue, will it be fixed? Odroid-XU+E is quite a very interesting board for research, and not having the performance counters available is quite a big problem, from my point of view (but note that the power meter only works in the 3.13 kernel version, not the 3.14, from what I've seen). I checked the pmu.c code to see if I could find anything regarding the PMU initialization, but I lack the skills. If anyone with enough experience could fix this... Well, that would be awesome.

jsubirat
Posts: 39
Joined: Mon Oct 28, 2013 8:57 pm
languages_spoken: english, catalan, spanish
ODROIDs: ODROID-XU+E
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by jsubirat »

Hi mdrjr, has there been any progress in this topic? Do you expect it to be solved in the future? I would personally be very grateful to be able to monitor the performance counters of the Odroid-XU+E. In fact, that's the main reason why I bought it in the first place... Thanks!

User avatar
odroid
Site Admin
Posts: 37403
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1797 times
Been thanked: 1143 times
Contact:

Re: Performance monitoring for odroid-xu

Post by odroid »

Even ARM people don't know why the performance counter doesn't work. :(

baronrajo
Posts: 5
Joined: Tue Feb 25, 2014 1:26 am
languages_spoken: english
ODROIDs: ODROID-XU-E
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by baronrajo »

I assume they are disabled by physically fusing the bits. Having performance counters and power readings, some smart people could do reverse engineering. Bad luck ...

hardik.patel
Posts: 4
Joined: Thu Aug 06, 2015 3:26 am
languages_spoken: english
ODROIDs: Odroid Xu3, Odroid u2, Odroid xu
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by hardik.patel »

Hello All,

I was looking for some perf measurement on Odroid-Xu3 at Samsung and was not able to read perf counters from Odroid -Xu3 device.

I have fixed this issue by adding correct arm-pmu interrupt numbers in dtsi file.

You can get patch from below link
https://github.com/kensoc/kendroid_kern ... b65591b06d

NOTE: Both A15 and A7 hw perf events/counters are not supported at this time.

By default, A15 hw perf events/counters are enabled.
To read/measure A7 hw perf events/counters, refer and uncomment arm-pmu section
of arch/arm/boot/dts/exynos5422_evt0.dtsi file.

Modified files are:


modified: arch/arm/boot/dts/exynos5422_evt0.dtsi
modified: arch/arm/configs/odroidxu3_defconfig

NOTE:

If you are using android OS with this modification, you will observer VOLD service crash and SDCARD won't mount correctly.

Solution:
When we have added ARM-PMU interrupt, kernel has changed platform device tree creations
and due to which "odroid-sysfs.16" was no more available and newly populated name is "odroid-sysfs.17".

This path was not recognized by VOLD service and file open was returning NULL which intern passed in fread operation and vold service was crashing.

Source path is: $ANDROIDSRC/system/vold/main.cpp +161

Old path is: /sys/bus/platform/drivers/odroid-sysfs/odroid_sysfs.16/boot_mode
New path is: /sys/bus/platform/drivers/odroid-sysfs/odroid_sysfs.17/boot_mode

Request to maintainer : pull this changes into mainline kernel and android source

User avatar
odroid
Site Admin
Posts: 37403
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1797 times
Been thanked: 1143 times
Contact:

Re: Performance monitoring for odroid-xu

Post by odroid »

Great! We will apply your patch to our XU3/XU4 Android and Generic Linux Kernel after quick testing.

Can you tell me how to test the performance counter?

hardik.patel
Posts: 4
Joined: Thu Aug 06, 2015 3:26 am
languages_spoken: english
ODROIDs: Odroid Xu3, Odroid u2, Odroid xu
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by hardik.patel »

In device terminal, please do "perf stat ls" that should show hardware counter events.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 60 times
Contact:

Re: Performance monitoring for odroid-xu

Post by memeka »

wow this has been asked for a long time, nice to see the counters enabled!

moon.linux
Posts: 1200
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Performance monitoring for odroid-xu

Post by moon.linux »

Thanks for this effort. I have tried to use this patch and build the perf.
Did you build perf static or dynamic.

Before compiling i have to install following dependency
sudo apt-get install libdw-dev libelf-dev binutils-dev elfutils libiberty-dev asciidoc
I use following command to build static perf. But it failed. it might be some gcc issue.
# make -C tools/perf LDFLAGS=-static

For Dynamic library build perf using
# make -C tools/perf

But I could not install the perf.
# make -C tools/perf install

Note: it fails to install. I have tried to compile on the board itself.


Could you help me out how to cross compile for android.

Code: Select all


root@odroidxu4:/usr/src/odroidxu3-3.10.y-devel/tools/perf# ./perf stat -a sleep 5

 Performance counter stats for 'sleep 5':

      40103.174048 task-clock                #    8.008 CPUs utilized           [100.00%]
               484 context-switches          #    0.012 K/sec                   [100.00%]
                 1 cpu-migrations            #    0.000 K/sec                   [100.00%]
               151 page-faults               #    0.004 K/sec
        69,760,701 cycles                    #    0.002 GHz                     [100.00%]
   <not supported> stalled-cycles-frontend
   <not supported> stalled-cycles-backend
        35,105,745 instructions              #    0.50  insns per cycle         [100.00%]
         3,921,013 branches                  #    0.098 M/sec                   [100.00%]
           590,958 branch-misses             #   15.07% of all branches

       5.007943088 seconds time elapsed

jsubirat
Posts: 39
Joined: Mon Oct 28, 2013 8:57 pm
languages_spoken: english, catalan, spanish
ODROIDs: ODROID-XU+E
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by jsubirat »

Dear hardik.patel,

These are good news, indeed! Many thanks for you efforts, hardik.patel! Could you or the odroid team upgrade the kernel for the odroid-xu/xu+e with this modification? It would be very nice to see the hardware counters finally enabled in the odroid-xu platform, as it was the platform for which this forum thread was originally created...

Best,

jsubirat

hardik.patel
Posts: 4
Joined: Thu Aug 06, 2015 3:26 am
languages_spoken: english
ODROIDs: Odroid Xu3, Odroid u2, Odroid xu
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by hardik.patel »

@ moon.linux,

For Odroid Xu3 board, perf (corss compiled) executable binary is already available in the the release binary from hardkernel team.

If you still want to compile, got to $ANDROIDSRC/external/linux-tools-perf/ and issue mm command( you must build android once to issue mm command)

ggeorgak
Posts: 4
Joined: Fri Jul 04, 2014 4:28 am
languages_spoken: english
ODROIDs: Odroid XU+E
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by ggeorgak »

Hello all,

Is this in the hardkernel git kernel yet? What is missing to support both A15 and A7 counters to be available concurrently?

mdrjr
Site Admin
Posts: 11786
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 39 times
Contact:

Re: Performance monitoring for odroid-xu

Post by mdrjr »


ggeorgak
Posts: 4
Joined: Fri Jul 04, 2014 4:28 am
languages_spoken: english
ODROIDs: Odroid XU+E
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by ggeorgak »

Thanks mdrjr. Forgive my ignorance, but is it possible to enable both A15, A7 in the dtsi and instead of using perf, access the ARM pmu registers directly?

mdrjr
Site Admin
Posts: 11786
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 39 times
Contact:

Re: Performance monitoring for odroid-xu

Post by mdrjr »

Nope, only A15 or A7's .

arkaleks
Posts: 2
Joined: Thu Oct 09, 2014 3:28 am
languages_spoken: english
ODROIDs: XU3
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by arkaleks »

Hello all,

I tried to enable the perf-counters using the instructions from http://odroid.com/dokuwiki/doku.php?id= ... ce_counter as well as the instructions above but the perf-counters don't work as expected. When running perf stat, the hardware events returned are always set to 0 (see below). I tried both A15 and A7, and get the same result.

Code: Select all

# perf stat -a sleep 10 

 Performance counter stats for 'sleep 10':

      80043.762800 task-clock                #    8.002 CPUs utilized           [100.00%]
              1028 context-switches          #    0.013 K/sec                   [100.00%]
                12 cpu-migrations            #    0.000 K/sec                   [100.00%]
               111 page-faults               #    0.001 K/sec                  
         111739564 cycles                    #    0.001 GHz                     [100.00%]
   <not supported> stalled-cycles-frontend 
   <not supported> stalled-cycles-backend  
                 0 instructions              #    0.00  insns per cycle         [100.00%]
                 0 branches                  #    0.000 K/sec                   [100.00%]
                 0 branch-misses             #    0.00% of all branches        

      10.003004376 seconds time elapsed
The PMU driver seems to be initialized during boot up :

Code: Select all

# dmesg | grep PMU
[    0.000000] [c0] EXYNOS5422 PMU Initialize
[    0.457951] [c5] hw perfevents: enabled with ARMv7 Cortex-A15 PMU driver, 7 counters available
I'm using the kernel 3.10.82 from https://github.com/hardkernel/linux/ and perf from the kernel (obivously), the kernel config is odroidxu3_defconfig with perf related stuff enabled (see http://pastebin.com/2xnxDcvf).

Code: Select all

# uname -a
Linux odroidxu3 3.10.82 #1 SMP PREEMPT Thu Oct 29 15:16:01 CET 2015 armv7l GNU/Linux
# perf --version
perf version 3.10.82
Any suggestions or ideas ?

Regards,
Arkaleks

arkaleks
Posts: 2
Joined: Thu Oct 09, 2014 3:28 am
languages_spoken: english
ODROIDs: XU3
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by arkaleks »

Hello,

Just a quick update: using an odroid xu3, the PMU are fully working. The problem only occurs on the odroidxu3-lite.

Best regards,
Arkaleks

Abhijeeth
Posts: 5
Joined: Mon Dec 28, 2020 11:18 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Performance monitoring for odroid-xu

Post by Abhijeeth »

can u please define what is perf static and perf dynamic mean??

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 2 guests