dump pixel trace into dumpstate_board.txt

Dump cma allocation/deallocation traces into dumpstate_board.txt.

E.g.)

 android.hardwar-3427    [004] ....    15.196059: cma_alloc_start: name=faceauth_tpu count=256 align=8
 android.hardwar-3427    [004] ....    15.196189: cma_alloc_info: name=faceauth_tpu pfn=0x9f4200 count=256 align=8 nr_migrated=0 nr_reclaimed=0 nr_mapped=0 err_iso=0 err_mig=0 err_test=0
    binder:578_1-592     [003] ....    15.209400: cma_alloc_start: name=farawimg count=704 align=4
    binder:578_1-592     [003] ....    15.210344: cma_alloc_info: name=farawimg pfn=0x9e83c0 count=704 align=4 nr_migrated=0 nr_reclaimed=0 nr_mapped=0 err_iso=0 err_mig=0 err_test=0
   binder:1114_4-3420    [001] ....    15.259132: cma_release: name=faceauth_tpu pfn=9f4000 page=000000002e4bd17f count=16
   binder:1114_4-3420    [001] ....    15.259143: cma_release: name=faceauth_tpu pfn=9f4010 page=000000008e379085 count=16
   binder:1114_4-3420    [001] ....    15.259148: cma_release: name=faceauth_tpu pfn=9f4020 page=00000000161dc38b count=16
   binder:1114_4-3420    [001] ....    15.259152: cma_release: name=faceauth_tpu pfn=9f4030 page=000000001d3eb567 count=16
   binder:1114_4-3420    [001] ....    15.259157: cma_release: name=faceauth_tpu pfn=9f4040 page=00000000f7f6dc70 count=16

Bug: 276901078
Test: dumpstate_board.txt on adb bugreport includes the info
Change-Id: If64c066eca59d6bba75e0494cd22108d619ad6f8
Signed-off-by: Minchan Kim <minchan@google.com>
This commit is contained in:
Minchan Kim 2023-04-04 08:45:04 -07:00
parent 6c81eeca82
commit 2a651114fe
2 changed files with 5 additions and 0 deletions

View file

@ -28,3 +28,6 @@ do
echo --- used; cat $d/used; echo --- used; cat $d/used;
echo --- bitmap; cat $d/bitmap; echo --- bitmap; cat $d/bitmap;
done done
echo "------ Pixel Trace ------"
cat "/sys/kernel/tracing/instances/pixel/trace"

View file

@ -6,5 +6,7 @@ userdebug_or_eng(`
allow dump_memory vendor_page_pinner_debugfs:file r_file_perms; allow dump_memory vendor_page_pinner_debugfs:file r_file_perms;
allow dump_memory vendor_cma_debugfs:dir r_dir_perms; allow dump_memory vendor_cma_debugfs:dir r_dir_perms;
allow dump_memory vendor_cma_debugfs:file r_file_perms; allow dump_memory vendor_cma_debugfs:file r_file_perms;
allow dump_memory debugfs_tracing_instances:dir search;
allow dump_memory debugfs_tracing_instances:file r_file_perms;
') ')