ACPICA debug interfaces
To turn on ACPICA's debug output, pass the "enable_acpi_debug = true" build argument to GN. When this option is enabled, ACPICA uses two global variables to control debug output.
AcpiDbgLevel is a bitmap of values defined in third_party/lib/acpica/source/include/acpica/acoutput.h with the prefix "ACPI_LV_". For convenience, there are some pre-defined verbosity levels: ACPI_LV_VERBOSITY1, ACPI_LV_VERBOSITY2, ACPI_LV_VERBOSITY3. These control types of tracing events to log. For example, if you want to trace all function calls and mutex operations, you can set AcpiDbgLevel to
"ACPI_LV_FUNCTIONS | ACPI_LV_MUTEX"
AcpiDbgLayer is a bitmap of values defined in third_party/lib/acpica/source/include/acpica/acoutput.h. These do not have a common prefix, but are listed as "Component IDs". These control which submodules of ACPICA are to be traced. For example, to trace through the namespace logic and the executor, you can set AcpiDbgLayer to
"ACPI_NAMESPACE | ACPI_EXECUTOR"
Setting these values
One easy place to set these in the AcpiOsInitialize method that we define in third_party/lib/acpica/source/os_specific/service_layers/osfuchsia.cpp. One technique that may be useful is zeroing both values in AcpiOsInitialize, and setting it to a non-zero value immediate before a call into ACPICA of interest.
There is additionally a method named AcpiDebugTrace in the ACPIA API. It supposedly supports tracing particular ACPI methods by their 4-character namespace names (but with no scoping to particular Nodes). See the ACPICA manual for details.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.