As an example, a driver may have defined the component it belongs to and the name of the module:
#define _COMPONENT ACPI_BUS_COMPONENT
ACPI_MODULE_NAME ("acpi_example")
The driver may also utilize the debug facility:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Failed to evaluate _STA\n"));
With these options the debug message from the
ACPI_DEBUG_PRINT macro is only visible when
hw.acpi.debug.layer is either
ACPI_BUS_COMPONENT or a compound constant including it, and
hw.acpi.debug.level is
ACPI_LV_INFO or some constant that includes it. Finally, it can be noted that the ACPI implementation uses the prefix
ACPI_DB, whereas the debug level
sysctl(8) variable is always specified with the prefix
ACPI_LV.
Another example can be mentioned for the use of
hw.acpi.debug.object. The following could appear in an ASL code:
Method(_Q19, 0, NotSerialized)
{
Store("_Q19 invoked", Debug)
Notify(ACAD, 0x80)
}
When
hw.acpi.debug.object is set to 1, the message stored to the debug object is printed every time the method is called by the interpreter.