blob: 97da3b5a2599b479a43265f07b48dae986b17312 [file] [log] [blame]
Adam Shihee779b92022-10-11 15:36:26 +08001/*
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 Shih4b68f5f2022-10-18 11:45:37 +080017#include <dump/pixel_dump.h>
Adam Shihee779b92022-10-11 15:36:26 +080018
19// Dump Aoc.
20int main() {
21 setbuf(stdout, NULL);
22 dumpFileContent("AoC Service Status", "/sys/devices/platform/19000000.aoc/services");
23 dumpFileContent("AoC Restarts", "/sys/devices/platform/19000000.aoc/restart_count");
24 dumpFileContent("AoC Coredumps", "/sys/devices/platform/19000000.aoc/coredump_count");
25 dumpFileContent("AoC ring buf wake", "/sys/devices/platform/19000000.aoc/control/ring_buffer_wakeup");
26 dumpFileContent("AoC host ipc wake", "/sys/devices/platform/19000000.aoc/control/host_ipc_wakeup");
27 dumpFileContent("AoC usf wake", "/sys/devices/platform/19000000.aoc/control/usf_wakeup");
28 dumpFileContent("AoC audio wake", "/sys/devices/platform/19000000.aoc/control/audio_wakeup");
29 dumpFileContent("AoC logging wake", "/sys/devices/platform/19000000.aoc/control/logging_wakeup");
30 dumpFileContent("AoC hotword wake", "/sys/devices/platform/19000000.aoc/control/hotword_wakeup");
31 dumpFileContent("AoC memory exception wake", "/sys/devices/platform/19000000.aoc/control/memory_exception");
32 dumpFileContent("AoC memory votes", "/sys/devices/platform/19000000.aoc/control/memory_votes_a32");
33 dumpFileContent("AoC memory votes", "/sys/devices/platform/19000000.aoc/control/memory_votes_ff1");
Adam Shih4b68f5f2022-10-18 11:45:37 +080034 runCommand("clean AoC buffer","echo ' ' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
35 runCommand("AoC Heap Stats (A32)", "echo 'dbg heap -c 1' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
36 runCommand("AoC Heap Stats (F1)", "echo 'dbg heap -c 2' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
37 runCommand("AoC Heap Stats (HF0)", "echo 'dbg heap -c 3' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
38 runCommand("AoC Heap Stats (HF1)", "echo 'dbg heap -c 4' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
Adam Shihee779b92022-10-11 15:36:26 +080039 return 0;
40}