[#5234] /proc/maps (/proc/<pid>/maps) does not show SRAM usage
Submitted By: Yi Li
Open Date
2009-06-11 04:12:29 Close Date
2010-06-11 04:15:42
Priority:
Medium Assignee:
Nobody
Status:
Closed Fixed In Release:
N/A
Found In Release:
snaps Release:
Category:
N/A Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
2009R1-RC7
App binary format:
FDPIC
Summary: /proc/maps (/proc/<pid>/maps) does not show SRAM usage
Details:
Can we call it a bug?
Run a program (g729ab_testfdpic_so) in FDPIC format, linked with a shared library (/lib/g729ab.so). The shared library put data and code in L1. When the program running:
root:/> cat /proc/maps
00192000-00194000 rw-p 00000000 00:00 0
001b9000-001ba000 rw-p 00000000 00:00 0
00200000-00220000 rwxp 00000000 00:00 0
00220000-00228000 rw-p 00000000 00:00 0
00228000-0022b000 r-xp 00000000 00:01 115 /lib/libdl.so.0
00230000-0023c000 r-xp 00000000 00:01 110 /lib/libgcc_s.so.1
00240000-00279000 r-xp 00000000 00:01 20 /lib/libc.so.0
00742000-00743000 rw-p 00000000 00:00 0
00802000-00803000 rw-p 00000000 00:00 0
0080e000-00810000 rw-p 00000000 00:00 0
00812000-00814000 rw-p 00000000 00:00 0
00820000-0082a000 r-xp 00000000 00:01 26 /lib/libpthread.so.0
00840000-0085a000 rwxp 00000000 00:00 0
00874000-00875000 rw-p 00000000 00:00 0
00876000-00877000 rw-p 00000000 00:00 0
00877000-00878000 rw-p 00000000 00:00 0
0087b000-0087c000 r--p 00000000 00:01 1850 /lib/libg729ab.so
0091d000-0091e000 r--p 00008000 00:01 1850 /lib/libg729ab.so
02127000-02128000 rw-p 00000000 00:00 0
02651000-02652000 rw-p 00000000 00:00 0
0268f000-02690000 rw-p 00000000 00:00 0
026c6000-026c7000 rw-p 00000000 00:00 0
02752000-02753000 rw-p 00000000 00:00 0
0281b000-0281c000 rw-p 00000000 00:00 0
02844000-02845000 rw-p 00007000 00:01 112 /lib/ld-uClibc.so.0
028d3000-028d4000 rw-p 00000000 00:00 0
028d4000-028d7000 r-xp 00000000 00:0c 1862 /var/g729ab_testfdpic_so
028d8000-028e0000 r-xp 00000000 00:01 112 /lib/ld-uClibc.so.0
028e0000-02900000 rwxp 00000000 00:00 0
02900000-02905000 rw-p 00000000 00:00 0
02908000-0290d000 rw-p 00000000 00:00 0
02914000-02916000 rw-p 00000000 00:00 0
02916000-02918000 rw-p 00000000 00:00 0
02920000-0292c000 rwxp 00000000 00:00 0
02980000-029ea000 rwxp 00000000 00:00 0
02a00000-02a6a000 rwxp 00000000 00:00 0
03220000-03229000 rwxp 00000000 00:00 0
03238000-03240000 rwxp 00000000 00:00 0
03280000-032ea000 rwxp 00000000 00:00 0
03300000-0336a000 rwxp 00000000 00:00 0
03380000-033ea000 rwxp 00000000 00:00 0
034ed000-034ee000 rw-p 00002000 00:0c 1862 /var/g729ab_testfdpic_so
03785000-03786000 rw-p 00000000 00:00 0
0379a000-0379c000 rw-p 00000000 00:00 0
And:
root:/> cat /proc/192/maps
00200000-00220000 rwxp 00000000 00:00 0
00220000-00228000 rw-p 00000000 00:00 0
00228000-0022b000 r-xp 00000000 00:01 115 /lib/libdl.so.0
00230000-0023c000 r-xp 00000000 00:01 110 /lib/libgcc_s.so.1
00240000-00279000 r-xp 00000000 00:01 20 /lib/libc.so.0
00812000-00814000 rw-p 00000000 00:00 0
00820000-0082a000 r-xp 00000000 00:01 26 /lib/libpthread.so.0
0087b000-0087c000 r--p 00000000 00:01 1850 /lib/libg729ab.so
0091d000-0091e000 r--p 00008000 00:01 1850 /lib/libg729ab.so
02127000-02128000 rw-p 00000000 00:00 0
02651000-02652000 rw-p 00000000 00:00 0
026c6000-026c7000 rw-p 00000000 00:00 0
02844000-02845000 rw-p 00007000 00:01 112 /lib/ld-uClibc.so.0
028d4000-028d7000 r-xp 00000000 00:0c 1862 /var/g729ab_testfdpic_so
028d8000-028e0000 r-xp 00000000 00:01 112 /lib/ld-uClibc.so.0
02900000-02905000 rw-p 00000000 00:00 0
02908000-0290d000 rw-p 00000000 00:00 0
034ed000-034ee000 rw-p 00002000 00:0c 1862 /var/g729ab_testfdpic_so
0379a000-0379c000 rw-p 00000000 00:00 0
But we can see the process ( PID = "192") allocated L1 data and L2 instruction mem.
root:/> cat /proc/sram
--- SRAM Scratchpad Size PID State
ffb00008-ffb01000 4088 0 FREE
--- SRAM L1 Data A Size PID State
ff800000-ff803e58 15960 165 ALLOCATED
ff803e58-ff804000 424 0 FREE
--- SRAM L1 Data B Size PID State
ff900320-ff9032e0 12224 192 ALLOCATED
ff900000-ff900320 800 165 ALLOCATED
ff9032e0-ff904000 3360 0 FREE
--- SRAM L1 Instruction Size PID State
ffa01240-ffa094d0 33424 192 ALLOCATED
ffa094d0-ffa0c000 11056 0 FREE
When the program finished:
root:/> cat /proc/sram
--- SRAM Scratchpad Size PID State
ffb00008-ffb01000 4088 0 FREE
--- SRAM L1 Data A Size PID State
ff800000-ff803e58 15960 165 ALLOCATED
ff803e58-ff804000 424 0 FREE
--- SRAM L1 Data B Size PID State
ff900000-ff900320 800 165 ALLOCATED
ff900320-ff904000 15584 0 FREE
--- SRAM L1 Instruction Size PID State
ffa01240-ffa0c000 44480 0 FREE
Follow-ups
--- Mike Frysinger 2009-06-11 04:16:21
this is currently by design -- we cannot safely hook into the vma system. ask
Jie about it as he looked into it last time.
--- Sonic Zhang 2009-06-12 00:06:59
Not a bug
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found