libdmabufheap: Adding dmabuf-heap-bench allocation microbenchmark
Simple microbenchmark to measure performance of
dmabuf heap and ION allocations.
to use:
./dmabuf-heap-bench <dmabuf heap name>
To compare with ION heap:
./dmabuf-heap-bench -i <ion heap type> <ion heap flags> <dmabuf heap name>
Example (from hikey960):
Testing dmabuf linux,cma vs ion heaptype 4 (flags: 0x0)
---------------------------------------------
dmabuf heap: alloc 4096 bytes 5000 times in 337090104 ns 67418 ns/call
ion heap: alloc 4096 bytes 5000 times in 325763021 ns 65152 ns/call
dmabuf heap: alloc 1048576 bytes 5000 times in 891038542 ns 178207 ns/call
ion heap: alloc 1048576 bytes 5000 times in 927255208 ns 185451 ns/call
dmabuf heap: alloc 8388608 bytes 5000 times in 7989712499 ns 1597942 ns/call
ion heap: alloc 8388608 bytes 5000 times in 8021189582 ns 1604237 ns/call
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Id445c4c7242d035746e266a9d21e2e80f55d52b1
2 files changed