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.

Linux/AM3352: Not support the perf tool

Part Number: AM3352

Tool/software: Linux

Hi All,

- In my customized board, i am using perf tool, for checking the performance.

- I Checked all commands that  are working file, only one command is Not working i.e,

- If i need only kernel space and user space events only,  the command is below,

1) ./perf   record  -e  cycles:u    ./Dsptest

2) ./perf   record  -e  cycles:k    ./Dsptest


- If i Entered like above command, it showing

Error:

The sys_perf_event_open() sys call returned with 95 (Operation not supported) for event  cycles:k

/bin/dmesg may provide additional information.

No CONFIG_PERF_EVENT=y Kernel support configured?

- Checked the Kernel configuration file, CONFIG_PERF_EVENT=y  already configured, again i compiled kernel and  created uImage, and change this uImage to my board, and gain compile the perf tool, get pef executable file.

- Run this new perf file on my board as mentioned command, same problem is getting, currently kernel version using (kernel - 4.4.19).

Question: Kernel support this feature or not?

If support Please tell how to enable this u/k space events.

 

Regards,

Vamsi.

  • Hi vamsi,

    What do you see in dmesg ?

    Run a simpler command like $./perf record /bin/cp

  • Hi Dwarakesh,

    "./perf record /bin/cp" working finemy requirement to use any particular only user space events or kernel space events the command is

    ./perf  record  -e  cycles:u   ./DspTest

    - I already saw this information dmesg not getting any information in it.

    - i checked all commands are working fine,  only kernel space and user space events is no working if i want to see specially.

     Regrds,

    Vamsi.

  • Hi Vamsi,

    1. Have you tried listing $./perf list and check the available events ?
    2. Have you enabled and checked with CONFIG_HAVE_PERF_EVENTS
    3. ried $./perf record -e cpu-clock:u ./DspTest
    4. Where did you get the perf binary from ?
  • Hi Dwarakesh,

    1. I Checked the ./perf list and checking the available events.

    2. I already enable the CONFIG_HAVE_PERF_EVENT=y;

    3. ./perf  record -e cpu-clock:u  ./DspTest,  not working getting above Error (previous post)  if i tried  ./perf record -e cpu-clock ./DspTest it's workin,  i am getting the Output.

    4. Where did you get perf binary?

    Ans:
    -  First i enable(=y)  Kernel perf related information in to kernel configuration file (make menuconfig) , and compile the Kernel.

    - Go the Build Compile kernel path, cd tools
     and cd perf.

    - Cross compile the perf tool with my board cross compiler . and get the perf executable file in same path.

    - Copy the .perf executable into my board though ftp.

    - Run that ./perf executable suitable flags.

     
    I did this process, but i am not getting the specially kernel and user space events, please tell me how to get this?

    SOC: AM3352 Kernel: 4.4.19 using.

    Regards,

    Vamsi.

    www.matrixcomsec.com

  • Hi Vamsi,

    I am not sure, but would suggest you to check by enabling the following kernel options:
    1. CONFIG_KPROBE_EVENT
    2. CONFIG_UPROBE_EVENT
    3. CONFIG_ARCH_SUPPORTS_UPROBES
    4. CONFIG_HAVE_KPROBES
    5. CONFIG_DEBUG_KERNEL
    6. CONFIG_PROBE_EVENTS
    7. CONFIG_PERF_EVENT
  • Hi Dwarakesh,

    1. CONFIG_KPROBE_EVENT
    2. CONFIG_UPROBE_EVENT
    4. CONFIG_HAVE_KPROBES
    5. CONFIG_DEBUG_KERNEL

    - I didn't set this 4 Configurations (my previous configuration file), i think this four configurations is use by dynamic tracing purpose, but not static tracing ( My understanding).

    I have a dought:

    As your experience, please clarify this dought.
    in my New custom board (PBX), only one TI AM3352 processor connected to 6 TI DSP's and nand flash and DDR..

    1. Can you provide commands how i can check the CPU performance ?.
    2. How i can check the performance of the Board with perf tool.?

    Please clarify this doughts based on your experience. how to use perf tool exactly to get the performance of CPU.




    Vamsi.

    http://www.matrixcomsec.com/