Commit graph

88 commits

Author SHA1 Message Date
SalmaxChang
0979e06146 dumpstate: Sync features from P20
- Create thread to collect modem related logs into dumpstate_board.bin.
- Reference verbose logging property

Bug: 176176656
Bug: 190329829

Change-Id: I514ae6d00599239238d0f1a2a2ec0cc2c8c15043
2021-06-24 10:02:11 +00:00
Minchan Kim
48a283b16e dumpstate: dump cma information into bugreport
Dump pixel cma metric into dumpstate_board.txt
It hepls to find cma allocation latency issues.

output example)
..

Change-Id: I697ade197617e3c19be1d83d38f2f93b44905ff8
--- /sys/kernel/pixel_stat/mm/cma/faceauth_tpu/alloc_pages_attempts
0
..
--- /sys/kernel/pixel_stat/mm/cma/faceauth_tpu/latency_low
0
--- /sys/kernel/pixel_stat/mm/cma/faceauth_tpu/latency_low_bound
10
--- /sys/kernel/pixel_stat/mm/cma/faceauth_tpu/latency_mid
0
..
--- /sys/kernel/pixel_stat/mm/cma/reserved/alloc_pages_attempts
1162
--- /sys/kernel/pixel_stat/mm/cma/reserved/alloc_pages_failfast_attempts
0
..

Change-Id: I08e34841617768f53e38f25a1b8035ade886d008
Bug: 191904985
Test: Run "adb bugreport <zip>" and verify it contains the output
      from dumpstate_board.txt
Signed-off-by: Minchan Kim <minchan@google.com>
2021-06-24 01:45:11 +00:00
Roger Wang
b9d3e85359 dumpstate: remove wifi fw symbol table
In b/183180525, vendor mentioned they won't provide
fw symbol table (logstrs.bin) in terms of their internal
concern. Hence, remove wifi fw symbol table from dumpstate.

Bug: 191429306
Test: build pass, device can connect to AP.
Change-Id: I54a012f619f113a2567a93707731b5c4802b1da8
2021-06-22 17:00:35 +00:00
Badhri Jagan Sridharan
6e44d2ee0c dumpstate: dump logbuffer tcpm logs in bugreport
Bug: 189792358
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I64cf665985226c81ff23b32bda25c303d8031d5f
2021-06-17 16:19:38 -07:00
Ted Lin
9404fbc128 Donot dump debugfs information in user build.
------ TCPM logs (/vendor/bin/sh -c cat /sys/kernel/debug/usb/tcpm*) ------
*** command '/vendor/bin/sh -c cat /sys/kernel/debug/usb/tcpm*' failed: exit code 1
------ gvotables (/vendor/bin/sh -c cat /sys/kernel/debug/gvotables/*/status) ------
*** command '/vendor/bin/sh -c cat /sys/kernel/debug/gvotables/*/status' failed: exit code 1

06-16 10:01:14.700  logd 14845 14845 W sh      : type=1400 audit(0.0:3294): avc: denied { read } for name="debug" dev="sysfs" ino=16052 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

Bug:187030022
Test: check the bugreport
Change-Id: I0c5b946321410dc04026aef0f06be9c2ace457d3
Signed-off-by: Ted Lin <tedlin@google.com>
2021-06-17 01:43:20 +00:00
Armelle Laine
fbbe7e36c7 dumpstate: dump trusty log
Dump trusty log buffer

Bug: 188285071
Test: adb bugreport
Change-Id: Ic44816fe1df21e97ec87ec58cbc2f84abf0e6a98
2021-06-15 14:35:43 +00:00
Tai Kuo
ca8a4cc11d dumpstate: show touch HDM debug info
Bug: 187174041
Test: trigger a bug report.
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: I0bd8329f087391c95447e015be6f576a4ecbb3e2
2021-06-15 10:04:29 +00:00
Super Liu
69c195292b dumpstate: add touch #19 data type
Bug: 174189876
Test: check bugreport for #19 data.
Signed-off-by: Super Liu <supercjliu@google.com>
Change-Id: I288d8079528f99834a1867ab973535d4e7b383b6
2021-06-15 04:55:54 +00:00
Nicole Lee
2148f02c08 dumpstate: stop modem always-on logging only
Dumpstate will only collect always-on modem logs,
should only stop modem logging when it is always-on

Bug: 189441741
Change-Id: Icc4e1940aab774d56e51e966248985dda539890c
2021-06-07 02:14:16 +00:00
Ted Lin
0843fe0b0a gs101: dumpstate: Dump function without debugfs
*** command '/vendor/bin/sh -c cat /d/regmap/*-0057-pca9468-mains/registers' failed: exit code 1

Bug: 187030022
Test: Check bugreport
Change-Id: Iea4225efb87b9793d990c04d950938fe79f71e23
Signed-off-by: Ted Lin <tedlin@google.com>
2021-06-02 03:29:58 +00:00
Shinru Han
d8908905aa gps: Add MCU crash dump in bugreport
Bug: 189288775
Test: on device
Change-Id: I0d3d1fdb6410098779d5ff9ed5d8b9bc7a347764
2021-06-02 03:04:59 +00:00
Rick Yiu
c0f5a7b882 gs101: dumpstate: Dump vendor group value
Dump attributes and tasks for each vendor group.

Bug: 172112042
Test: dump successfully
Change-Id: I538a88391e4917749689b9ee1cfa00a8fe1049e5
2021-05-28 01:18:08 +00:00
Ken Huang
b115af5590 dumpstate: dump panel extra info
Dump panel extra info to show display hw revision.

Bug: 189190103
Test: adb bugreport
Change-Id: I14121ff428d494b65c2a1741880b6fe7424d2d69
2021-05-25 10:12:37 +00:00
George Lee
9cf36fcccb bcl: Updated BCL metrics per sysfs change.
Update BCL triggered stats reporting.

Bug: 180620276
Test: adb bugreport
dumpstate_board.txt shows:
------ Mitigation Stats (/vendor/bin/sh -c echo "Source\t\tCount\tSOC\tTime\tVoltage"; for f in `ls /sys/devices/virtual/pmic/mitigation/last_triggered_count/*` ; do count=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/last_triggered_count\//}; b=${f/last_triggered_count/last_triggered_capacity}; c=${f/last_triggered_count/last_triggered_timestamp/}; d=${f/last_triggered_count/last_triggered_voltage/}; cnt=`cat $f`; cap=`cat ${b/count/cap}`; ti=`cat ${c/count/time}`; volt=`cat ${d/count/volt}`; echo "${a/_count/} \t$cnt\t$cap\t$ti\t$volt" ; done) ------
Source		Count	SOC	Time	Voltage
batoilo 	0	0	0	0
ocp_cpu1 	0	0	0	0
ocp_cpu2 	0	0	0	0
ocp_gpu 	0	0	0	0
ocp_tpu 	0	0	0	0
smpl_warn 	0	0	0	0
soft_ocp_cpu1 	0	0	0	0
soft_ocp_cpu2 	0	0	0	0
soft_ocp_gpu 	0	0	0	0
soft_ocp_tpu 	0	0	0	0
vdroop1 	0	0	0	0
vdroop2 	0	0	0	0
------ Clock Divider Ratio (/vendor/bin/sh -c echo "Source\t\tRatio"; for f in `ls /sys/devices/virtual/pmic/mitigation/clock_ratio/*` ; do ratio=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/clock_ratio\//}; echo "${a/_ratio/} \t$ratio" ; done) ------
Source		Ratio
cpu0_clk 	0xf041c3
cpu1_heavy_clk 	0xf041c3
cpu1_light_clk 	0xf041c5
cpu2_heavy_clk 	0xf041c3
cpu2_light_clk 	0xf041c5
gpu_heavy_clk 	off
gpu_light_clk 	off
tpu_heavy_clk 	off
tpu_light_clk 	off
------ Clock Stats (/vendor/bin/sh -c echo "Source\t\tStats"; for f in `ls /sys/devices/virtual/pmic/mitigation/clock_stats/*` ; do stats=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/clock_stats\//}; echo "${a/_stats/} \t$stats" ; done) ------
Source		Stats
cpu0_clk 	0x101
cpu1_clk 	0x101
cpu2_clk 	0x101
gpu_clk 	off
tpu_clk 	off
------ Triggered Level (/vendor/bin/sh -c echo "Source\t\tLevel"; for f in `ls /sys/devices/virtual/pmic/mitigation/triggered_lvl/*` ; do lvl=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/triggered_lvl\//}; echo "${a/_lvl/} \t$lvl" ; done) ------
Source		Level
ocp_cpu1 	7000mA
ocp_cpu2 	12000mA
ocp_gpu 	12000mA
ocp_tpu 	10500mA
smpl 	2900mV
soft_ocp_cpu1 	7000mA
soft_ocp_cpu2 	12000mA
soft_ocp_gpu 	12000mA
soft_ocp_tpu 	10500mA

Signed-off-by: George Lee <geolee@google.com>
Change-Id: I4ea25ebc86eb772c69e8047b2d5466ca52ec2d2c
2021-05-20 15:12:44 +00:00
Jack Wu
50437f63d5 dumpstate: dump wireless fw version
Bug: 188021156
Test: can show in dumpstate
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: I51cb5dded02e0cbb1e9d16334472bab4d9a82150
2021-05-20 10:31:30 +00:00
Ted Lin
122923fc74 Dump tcpm for the new path
Bug:188213293
Test: check bugreport
Change-Id: Ib6f2e374d80da88a39440a3de9d0e2d732b2f95e
Signed-off-by: Ted Lin <tedlin@google.com>
2021-05-18 15:05:05 +00:00
Zhijun He
8a52881a41 dumpstate: add camera hal graph state dump
Only dump the latest dump files so that bugreport
size won't be increased by too much.

Test: build and capture bugreport
Bug: 178737594
Change-Id: I699ee76997c9107dad13419688f3c6c04551313b
2021-05-18 00:42:11 +00:00
Minchan Kim
637041f47e init.gs101.rc: dump page_pinner information into bugreport
Dump page_pinner information into dumpstate_board.txt.
It helps to find vulnerable place of CMA failure.

Page pinned ts 13 us count 0
PFN 10292273 Block 10051 type CMA Flags 0x8000000000080024(uptodate|active|swapbacked)
 try_grab_page+0x168/0x17c
 follow_page_pte+0x2e4/0x4c8
 follow_pmd_mask+0x180/0x498
 __get_user_pages+0x1a0/0x42c
 __get_user_pages_remote+0xa4/0x28c
 get_user_pages_remote+0x20/0x48
 copy_strings+0x188/0x2ac
 do_execveat_common+0x278/0x300
 __arm64_sys_execve+0x44/0x5c
 el0_svc_common+0xa4/0x180
 do_el0_svc+0x28/0x88
 el0_svc+0x14/0x24
 el0_sync_handler+0x88/0xec
 el0_sync+0x19c/0x1c0

Page pinned ts 2 us count 0
PFN 10436170 Block 10191 type CMA Flags 0x8000000000080026(referenced|uptodate|active|swapbacked)
 try_grab_page+0x168/0x17c
 follow_page_pte+0x2e4/0x4c8
 follow_pmd_mask+0x180/0x498
 __get_user_pages+0x1a0/0x42c
 __get_user_pages_remote+0xa4/0x28c
 get_user_pages_remote+0x20/0x48
 copy_strings+0x188/0x2ac
 do_execveat_common+0x290/0x300
 __arm64_sys_execve+0x44/0x5c
 el0_svc_common+0xa4/0x180
 do_el0_svc+0x28/0x88
 el0_svc+0x14/0x24
 el0_sync_handler+0x88/0xec
 el0_sync+0x19c/0x1c0

Bug: 187552095
Test: adb bugreport <zip> and confirmed it contains page_pinner
      information.

Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I59bd41ad9e06cab0348ce85059f73d0796632868
2021-05-17 18:22:16 +00:00
davidycchen
2b65d2e31c dumpstate: modify the method for dump touch information
Use bugreport flag to keep waking up the touch driver instead of
force active flag to prevent the kernel driver from blocking CPU
enter the suspend mode.

Bug: 183466375
Test: touch driver won't block system suspend.

Signed-off-by: davidycchen <davidycchen@google.com>
Change-Id: I586173485bd41deac891b7edb366b51a99977434
2021-05-14 05:47:39 +00:00
Craig Dooley
be26bc083e Add AoC specific logs to dumpstate
Bug: 187961753
Change-Id: I871912c8b5e49618935f347476ca5cce9ad233aa
2021-05-12 22:01:06 +00:00
Qinchen Gu
7aafb36f77 Dump GSC info
Bug: 185939493
Test: adb bugreport. Look for GSC-related info.

Change-Id: I17fd4d7ef4c16661312d594c99818233cd0ee76a
2021-05-12 10:02:28 +00:00
Woody Lin
e9f27f4a68 gs101: dumpstate: Dump s2d.lst to dumpstate_board.txt
Gzip s2d.lst and base64 it for dumping to dumpstate_board.txt.

Bug: 187228956
Change-Id: I911145ed6ecc345177cd979262126b7c49194528
2021-05-05 20:37:42 +00:00
Alex Hong
ad5196c2c2 Update dumpstate HAL to V1.1
This is a manual porting from ag/10344396.
Replace the usage of "persist.vendor.verbose_logging_enabled" since we are not using
this property for Whitechapel.
Use the default property "persist.dumpstate.verbose_logging.enabled" instead.

Test: atest VtsHalDumpstateV1_1TargetTest pass
Bug: 186539439
Change-Id: I3f0d35647c0748d360b12d3be078d514f99d23d5
2021-05-05 06:09:11 +00:00
Jenny Ho
c20a7c9603 dumpstate: dump TRICKLE/TEMP/DWELL setting into bugreport
Need setting information for debugging

Bug: 186872139
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: Iaf7345a4f38a67c4134f5cb23050b5f5e6ba7fdd
2021-05-05 02:55:28 +00:00
Chris Kuiper
24b9d29d6d dumpstate: Add USF registry dump.
This collects the output of "usf_reg_edit save -" and adds it to the
bugreport. It is only done on userbuilds for PROTO* and EVT* devices.

Bug: 187081112
Test: Run "adb bugreport <zip>" and verify it contains the output
      from "usf_reg_edit save -".
Change-Id: Ie68b56a3bb211840f33bdb5afbc31b0759641c8e
2021-05-04 15:30:26 -07:00
lucaslin
725f060835 Dump tcpdump into bugreport
Bug: 183467815
Test: 1. Enable tcpdump_logger always-on function
      2. Dump bugreport
      3. Pull dumpstate_board.bin and chagne it to zip
      4. Unzip dumpstate_board.zip and check if tcpdump files
         are there.
Change-Id: If5fc2fe8ff4bfc0beb91ff973cc3d8137fd7cc47
2021-05-04 03:48:04 +00:00
Benjamin Schwartz
d4cff50b12 dumpstate: Fix path to acpm_stats
Bug: 185819857
Test: adb shell dumpstate
Change-Id: I4b2ec4d89d7566cc8a3a86a0c8532937c8c5b9df
2021-04-19 13:40:29 -07:00
Ted Lin
41a0f99d0c ueventd.rc: set system ownership for direct charging
Bug:185041587
Test: ls -al /dev/log*
Change-Id: I02c635c424b37e9e9767d508397fc9c5673925e2
Signed-off-by: Ted Lin <tedlin@google.com>
2021-04-15 10:26:57 +00:00
Jenny Ho
3d46be281d dumpstate: update dump eeprom path
avoid using * for sysfs permission

Bug: 182531832
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I8346bc09e82811a9006aae6d1b2d83d31a7e0a62
2021-04-14 07:45:01 +00:00
Jaegeuk Kim
a245dd7d5c Dumpstate: f2fs: remove verbose segment_info
Let's remove segment_info which seems not useful.

Bug: 184964835
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ib9826f536681d9f36f9d55dab3801a05c47f27a4
2021-04-13 16:33:47 +00:00
Jenny Ho
0ecbb8aa26 dumpstate: add P7 dual battery fuel gauge path
also add lugbuffer_rtx/wireless

Bug: 184780667
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I91370b3cbb1c2d57bcfa37032b39e22d43bfc69c
2021-04-12 04:05:09 +00:00
Tai Kuo
4c46bf699f dumpstate: check the correct bus force active command path
Bug: 183557468
Bug: 181833046
Bug: 182976988
Test: adb shell "lshal debug \
 android.hardware.dumpstate@1.0::IDumpstateDevice/default touch"
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: I447a267451f80ff0e5cdca321e08a2f8119e51ca
2021-03-31 02:20:54 +00:00
Jenny Ho
e8ecf4ded7 Merge "dumpstate: Update eeprom dump path" into sc-dev 2021-03-17 08:07:45 +00:00
George Lee
d65255508c Merge "bcl: aggregated event count" into sc-dev 2021-03-12 23:13:11 +00:00
George Lee
834dca4c53 bcl: aggregated event count
Enable BCL metrics in bugreport.

Bug: 180620276
Test: Local test
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Iab9ef7aac7c112e4a6938e7f34745b338df6a3f8
2021-03-12 21:31:54 +00:00
Jenny Ho
361d28d604 dumpstate: Update eeprom dump path
Bug: 182531832
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: Ib7f628f226d901e79be9c3c958a5514cce09fbd9
2021-03-12 13:53:31 +08:00
davidycchen
175299a568 dumpstate: dump more touch information
Dump more touch information for P21 projects.

Bug: 174191180
Test: trigger bugreport and check dumpstate.

Signed-off-by: davidycchen <davidycchen@google.com>
Change-Id: Ibdae06b29d8781bcc7973cb8a0ecfd0078ecde96
2021-03-08 16:24:00 +08:00
Robin Peng
c2b5ca99e3 Move slider into gs101 and <device>
from: 026342771c6642980cb4653b1ec4d857a5d8be54

Bug: 167996145
Change-Id: I2ebf7f019afed1cbe9b60dcd82581bd3a52fe109
2021-03-06 16:31:12 +08:00