FreeBSD/sys/contrib/dev/acpica/components/debugger/dbstats.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbClassifyOneObject
 *
 * PARAMETERS:  Callback for WalkNamespace
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Enumerate both the object descriptor (including subobjects) and
 *              the parent namespace node.
 *
 ******************************************************************************/


Status

Enumerate both the object descriptor (including subobjects) and
the parent namespace node.
Status Enumerate both the object descriptor ( including subobjects ) and the parent namespace node .
static ACPI_STATUS
AcpiDbClassifyOneObject (
    ACPI_HANDLE             ObjHandle,
    UINT32                  NestingLevel,
    void                    *Context,
    void                    **ReturnValue)
{
    ACPI_NAMESPACE_NODE     *Node;
    ACPI_OPERAND_OBJECT     *ObjDesc;
    UINT32                  Type;
    AcpiGbl_NumNodes++;
    Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
    ObjDesc = AcpiNsGetAttachedObject (Node);
    AcpiDbEnumerateObject (ObjDesc);
    Type = Node->Type;
    if (Type > ACPI_TYPE_NS_NODE_MAX)
    {
        AcpiGbl_NodeTypeCountMisc++;
    }
    else
    {
        AcpiGbl_NodeTypeCount [Type]++;
    }
    return (AE_OK);
#ifdef ACPI_FUTURE_IMPLEMENTATION
    if (AcpiPsIsNamedOp (Op->Opcode))
    {
        NumNodes++;
    }
    if (IsMethod)
    {
        NumMethodElements++;
    }
    NumGrammarElements++;
    Op = AcpiPsGetDepthNext (Root, Op);
    SizeOfParseTree   = (NumGrammarElements - NumMethodElements) *
        (UINT32) sizeof (ACPI_PARSE_OBJECT);
    SizeOfMethodTrees = NumMethodElements * (UINT32) sizeof (ACPI_PARSE_OBJECT);
    SizeOfNodeEntries = NumNodes * (UINT32) sizeof (ACPI_NAMESPACE_NODE);
    SizeOfAcpiObjects = NumNodes * (UINT32) sizeof (ACPI_OPERAND_OBJECT);
#endif
}
static ACPI_STATUS AcpiDbClassifyOneObject ( ACPI_HANDLE ObjHandle , UINT32 NestingLevel , void * Context , void * * ReturnValue ) { ACPI_NAMESPACE_NODE * Node ; ACPI_OPERAND_OBJECT * ObjDesc ; UINT32 Type ; AcpiGbl_NumNodes ++ ; Node = ( ACPI_NAMESPACE_NODE * ) ObjHandle ; ObjDesc = AcpiNsGetAttachedObject ( Node ) ; AcpiDbEnumerateObject ( ObjDesc ) ; Type = Node -> Type ; if ( Type > ACPI_TYPE_NS_NODE_MAX ) { AcpiGbl_NodeTypeCountMisc ++ ; } else { AcpiGbl_NodeTypeCount [ Type ] ++ ; } return ( AE_OK ) ; #ifdef ACPI_FUTURE_IMPLEMENTATION if ( AcpiPsIsNamedOp ( Op -> Opcode ) ) { NumNodes ++ ; } if ( IsMethod ) { NumMethodElements ++ ; } NumGrammarElements ++ ; Op = AcpiPsGetDepthNext ( Root , Op ) ; SizeOfParseTree = ( NumGrammarElements - NumMethodElements ) * ( UINT32 ) sizeof ( ACPI_PARSE_OBJECT ) ; SizeOfMethodTrees = NumMethodElements * ( UINT32 ) sizeof ( ACPI_PARSE_OBJECT ) ; SizeOfNodeEntries = NumNodes * ( UINT32 ) sizeof ( ACPI_NAMESPACE_NODE ) ; SizeOfAcpiObjects = NumNodes * ( UINT32 ) sizeof ( ACPI_OPERAND_OBJECT ) ; #endif }
FUNCTION:    AcpiDbClassifyOneObject
 PARAMETERS:  Callback for WalkNamespace
FUNCTION : AcpiDbClassifyOneObject PARAMETERS : Callback for WalkNamespace
/* TBD: These need to be counted during the initial parsing phase */