Adam Shih | ee779b9 | 2022-10-11 15:36:26 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2022 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | #include <stdio.h> |
Adam Shih | 4b68f5f | 2022-10-18 11:45:37 +0800 | [diff] [blame] | 17 | #include <dump/pixel_dump.h> |
Adam Shih | ee779b9 | 2022-10-11 15:36:26 +0800 | [diff] [blame] | 18 | |
| 19 | // Dump Aoc. |
| 20 | int main() { |
| 21 | setbuf(stdout, NULL); |
Ray Hsu | adfda88 | 2023-04-26 10:43:19 +0000 | [diff] [blame] | 22 | runCommand("AoC Service Status", "timeout 0.1 cat /sys/devices/platform/*.aoc/services"); |
| 23 | runCommand("AoC Restarts", "timeout 0.1 cat /sys/devices/platform/*.aoc/restart_count"); |
| 24 | runCommand("AoC Coredumps", "timeout 0.1 cat /sys/devices/platform/*.aoc/coredump_count"); |
| 25 | runCommand("AoC ring buf wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/ring_buffer_wakeup"); |
| 26 | runCommand("AoC host ipc wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/host_ipc_wakeup"); |
| 27 | runCommand("AoC usf wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/usf_wakeup"); |
| 28 | runCommand("AoC audio wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/audio_wakeup"); |
| 29 | runCommand("AoC logging wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/logging_wakeup"); |
| 30 | runCommand("AoC hotword wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/hotword_wakeup"); |
| 31 | runCommand("AoC memory exception wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/memory_exception"); |
JJ Lee | eee8e04 | 2024-03-18 10:56:05 +0000 | [diff] [blame^] | 32 | runCommand("AoC memory votes", "timeout 0.5 cat /sys/devices/platform/*.aoc/control/memory_votes_a32"); |
| 33 | runCommand("AoC memory votes", "timeout 0.5 cat /sys/devices/platform/*.aoc/control/memory_votes_ff1"); |
Adam Shih | 4b68f5f | 2022-10-18 11:45:37 +0800 | [diff] [blame] | 34 | runCommand("clean AoC buffer","echo ' ' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug"); |
JJ Lee | eee8e04 | 2024-03-18 10:56:05 +0000 | [diff] [blame^] | 35 | runCommand("AoC DVFS (A32)", "echo 'dbg info -c 1 DVFSA32' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug"); |
Luigi Zevola | 4130bc5 | 2023-06-22 00:19:21 +0000 | [diff] [blame] | 36 | runCommand("AoC DVFS (FF1)", "echo 'dbg info -c 2 DVFSFF1' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug"); |
Luigi Zevola | 0596161 | 2023-06-23 21:14:48 +0000 | [diff] [blame] | 37 | runCommand("AoC Monitor Mode Status", "echo 'monitor_mode status' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug"); |
Adam Shih | ee779b9 | 2022-10-11 15:36:26 +0800 | [diff] [blame] | 38 | return 0; |
| 39 | } |