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.

TDA4AL-Q1: How can I dump memory used from vision app?

Part Number: TDA4AL-Q1

Tool/software:

Hi, TI expert.

We would to check how memory used when running the run_app_single_cam.sh in vision app.

We try to use the commands to get memory information by /proc/meminfo and free -m.

But it seems not the R5F in RTOS part, that seems the A72 in Linux part.

And we try to use the command by p: Print performance statistics in vision app from the function of appPerfStatsDdrStatsPrintAll.

It seems to output the DDR performance not like the memory used.

# DDR performance statistics

DDR BW | AVG | PEAK
----------|--------------|-------
READ BW | 1107 MB/s | 2700 MB/s
WRITE BW | 1007 MB/s | 2058 MB/s
TOTAL BW | 2114 MB/s | 4758 MB/s

Could you help to provide if it is any method to see the memory used?

Thanks a lot.

  • Hi Chen,

    All the openvx objects are allocated in the DDR_SHARED_MEMORY, default size is 512MB for j721s2, see $(PSDKRA)/vision_apps/platform/j721s2/rtos/app_mem_map.h for the mapping.

    A72 running linux/qnx allocates the memory in the shared region and passes the address to the other cores (R5F, C7x,).

    when you press p to print performance stat you can see this output

    Detailed CPU performance/memory statistics,
    ===========================================
    
      2277.364416 s: DDR_SHARED_MEM: Alloc's: 33 alloc's of 97471648 bytes 
      2277.364425 s: DDR_SHARED_MEM: Free's : 0 free's  of 0 bytes 
      2277.364431 s: DDR_SHARED_MEM: Open's : 33 allocs  of 97471648 bytes 
    
    "fyi this is an example output, numbers are not for app_single_cam"

    This will show you memory used by the application.

    Also the local heap memory used by the remote cores (R5F, C7x) also will be printed as below,

    CPU: mcu2_0: HEAP:    DDR_LOCAL_MEM: size =   15728640 B, free =   15703296 B ( 99 % unused)
    CPU: mcu2_0: HEAP:           L3_MEM: size =     262144 B, free =     261888 B ( 99 % unused)
    CPU: mcu2_0: HEAP:  DDR_CACHE_WT_ME: size =    1048576 B, free =     821504 B ( 78 % unused)
    
    .
    .
    .
    
    
    CPU:  c7x_1: HEAP:    DDR_LOCAL_MEM: size =  268435456 B, free =  268435200 B ( 99 % unused)
    CPU:  c7x_1: HEAP:           L3_MEM: size =    8159232 B, free =    8159232 B (100 % unused)
    CPU:  c7x_1: HEAP:           L2_MEM: size =     458752 B, free =     458752 B (100 % unused)
    CPU:  c7x_1: HEAP:           L1_MEM: size =      16384 B, free =      16384 B (100 % unused)
    CPU:  c7x_1: HEAP:  DDR_SCRATCH_MEM: size =  385875968 B, free =  385875968 B (100 % unused)

    Regards,
    Gokul