FreeBSD/sys/contrib/dev/acpica/components/executer/extrace.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiExStartTraceMethod
 *
 * PARAMETERS:  MethodNode          - Node of the method
 *              ObjDesc             - The method object
 *              WalkState           - current state, NULL if not yet executing
 *                                    a method.
 *
 * RETURN:      None
 *
 * DESCRIPTION: Start control method execution trace
 *
 ******************************************************************************/
AcpiExStartTraceMethod
PARAMETERS:  MethodNode          - Node of the method
ObjDesc             - The method object
WalkState           - current state, NULL if not yet executing
a method.

None

Start control method execution trace
AcpiExStartTraceMethod PARAMETERS : MethodNode - Node of the method ObjDesc - The method object WalkState - current state NULL if not yet executing a method . None Start control method execution trace
void
AcpiExStartTraceMethod (
    ACPI_NAMESPACE_NODE     *MethodNode,
    ACPI_OPERAND_OBJECT     *ObjDesc,
    ACPI_WALK_STATE         *WalkState)
{
    ACPI_STATUS             Status;
    char                    *Pathname = NULL;
    BOOLEAN                 Enabled = FALSE;
    ACPI_FUNCTION_NAME (ExStartTraceMethod);
    if (MethodNode)
    {
        Pathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE);
    }
    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
    if (ACPI_FAILURE (Status))
    {
        goto Exit;
    }
    Enabled = AcpiExInterpreterTraceEnabled (Pathname);
    if (Enabled && !AcpiGbl_TraceMethodObject)
    {
        AcpiGbl_TraceMethodObject = ObjDesc;
        AcpiGbl_OriginalDbgLevel = AcpiDbgLevel;
        AcpiGbl_OriginalDbgLayer = AcpiDbgLayer;
        AcpiDbgLevel = ACPI_TRACE_LEVEL_ALL;
        AcpiDbgLayer = ACPI_TRACE_LAYER_ALL;
        if (AcpiGbl_TraceDbgLevel)
        {
            AcpiDbgLevel = AcpiGbl_TraceDbgLevel;
        }
        if (AcpiGbl_TraceDbgLayer)
        {
            AcpiDbgLayer = AcpiGbl_TraceDbgLayer;
        }
    }
    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
Exit:
    if (Enabled)
    {
        ACPI_TRACE_POINT (ACPI_TRACE_AML_METHOD, TRUE,
            ObjDesc ? ObjDesc->Method.AmlStart : NULL, Pathname);
    }
    if (Pathname)
    {
        ACPI_FREE (Pathname);
    }
}
void AcpiExStartTraceMethod ( ACPI_NAMESPACE_NODE * MethodNode , ACPI_OPERAND_OBJECT * ObjDesc , ACPI_WALK_STATE * WalkState ) { ACPI_STATUS Status ; char * Pathname = NULL ; BOOLEAN Enabled = FALSE ; ACPI_FUNCTION_NAME ( ExStartTraceMethod ) ; if ( MethodNode ) { Pathname = AcpiNsGetNormalizedPathname ( MethodNode , TRUE ) ; } Status = AcpiUtAcquireMutex ( ACPI_MTX_NAMESPACE ) ; if ( ACPI_FAILURE ( Status ) ) { goto Exit ; } Enabled = AcpiExInterpreterTraceEnabled ( Pathname ) ; if ( Enabled && ! AcpiGbl_TraceMethodObject ) { AcpiGbl_TraceMethodObject = ObjDesc ; AcpiGbl_OriginalDbgLevel = AcpiDbgLevel ; AcpiGbl_OriginalDbgLayer = AcpiDbgLayer ; AcpiDbgLevel = ACPI_TRACE_LEVEL_ALL ; AcpiDbgLayer = ACPI_TRACE_LAYER_ALL ; if ( AcpiGbl_TraceDbgLevel ) { AcpiDbgLevel = AcpiGbl_TraceDbgLevel ; } if ( AcpiGbl_TraceDbgLayer ) { AcpiDbgLayer = AcpiGbl_TraceDbgLayer ; } } ( void ) AcpiUtReleaseMutex ( ACPI_MTX_NAMESPACE ) ; Exit : if ( Enabled ) { ACPI_TRACE_POINT ( ACPI_TRACE_AML_METHOD , TRUE , ObjDesc ? ObjDesc -> Method . AmlStart : NULL , Pathname ) ; } if ( Pathname ) { ACPI_FREE ( Pathname ) ; } }
FUNCTION:    AcpiExStartTraceMethod
 PARAMETERS:  MethodNode          - Node of the method
              ObjDesc             - The method object
              WalkState           - current state, NULL if not yet executing
                                    a method.
FUNCTION : AcpiExStartTraceMethod PARAMETERS : MethodNode - Node of the method ObjDesc - The method object WalkState - current state NULL if not yet executing a method .