Path: blob/main/sys/contrib/dev/acpica/components/debugger/dbstats.c
48406 views
/*******************************************************************************1*2* Module Name: dbstats - Generation and display of ACPI table statistics3*4******************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY85* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY86* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A87* PARTICULAR PURPOSE.88*89* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES90* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR91* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,92* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY93* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL94* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS95* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY96* LIMITED REMEDY.97*98* 4.3. Licensee shall not export, either directly or indirectly, any of this99* software or system incorporating such software without first obtaining any100* required license or other approval from the U. S. Department of Commerce or101* any other agency or department of the United States Government. In the102* event Licensee exports any such software from the United States or103* re-exports any such software from a foreign destination, Licensee shall104* ensure that the distribution and export/re-export of the software is in105* compliance with all laws, regulations, orders, or other restrictions of the106* U.S. Export Administration Regulations. Licensee agrees that neither it nor107* any of its subsidiaries will export/re-export any technical data, process,108* software, or service, directly or indirectly, to any country for which the109* United States government or any agency thereof requires an export license,110* other governmental approval, or letter of assurance, without first obtaining111* such license, approval or letter.112*113*****************************************************************************114*115* Alternatively, you may choose to be licensed under the terms of the116* following license:117*118* Redistribution and use in source and binary forms, with or without119* modification, are permitted provided that the following conditions120* are met:121* 1. Redistributions of source code must retain the above copyright122* notice, this list of conditions, and the following disclaimer,123* without modification.124* 2. Redistributions in binary form must reproduce at minimum a disclaimer125* substantially similar to the "NO WARRANTY" disclaimer below126* ("Disclaimer") and any redistribution must be conditioned upon127* including a substantially similar Disclaimer requirement for further128* binary redistribution.129* 3. Neither the names of the above-listed copyright holders nor the names130* of any contributors may be used to endorse or promote products derived131* from this software without specific prior written permission.132*133* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS134* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT135* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR136* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT137* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,138* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT139* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,140* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY141* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT142* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE143* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.144*145* Alternatively, you may choose to be licensed under the terms of the146* GNU General Public License ("GPL") version 2 as published by the Free147* Software Foundation.148*149*****************************************************************************/150151#include <contrib/dev/acpica/include/acpi.h>152#include <contrib/dev/acpica/include/accommon.h>153#include <contrib/dev/acpica/include/acdebug.h>154#include <contrib/dev/acpica/include/acnamesp.h>155156157#define _COMPONENT ACPI_CA_DEBUGGER158ACPI_MODULE_NAME ("dbstats")159160161/* Local prototypes */162163static void164AcpiDbCountNamespaceObjects (165void);166167static void168AcpiDbEnumerateObject (169ACPI_OPERAND_OBJECT *ObjDesc);170171static ACPI_STATUS172AcpiDbClassifyOneObject (173ACPI_HANDLE ObjHandle,174UINT32 NestingLevel,175void *Context,176void **ReturnValue);177178#if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE179static void180AcpiDbListInfo (181ACPI_MEMORY_LIST *List);182#endif183184185/*186* Statistics subcommands187*/188static ACPI_DB_ARGUMENT_INFO AcpiDbStatTypes [] =189{190{"ALLOCATIONS"},191{"OBJECTS"},192{"MEMORY"},193{"MISC"},194{"TABLES"},195{"SIZES"},196{"STACK"},197{NULL} /* Must be null terminated */198};199200#define CMD_STAT_ALLOCATIONS 0201#define CMD_STAT_OBJECTS 1202#define CMD_STAT_MEMORY 2203#define CMD_STAT_MISC 3204#define CMD_STAT_TABLES 4205#define CMD_STAT_SIZES 5206#define CMD_STAT_STACK 6207208209#if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE210/*******************************************************************************211*212* FUNCTION: AcpiDbListInfo213*214* PARAMETERS: List - Memory list/cache to be displayed215*216* RETURN: None217*218* DESCRIPTION: Display information about the input memory list or cache.219*220******************************************************************************/221222static void223AcpiDbListInfo (224ACPI_MEMORY_LIST *List)225{226#ifdef ACPI_DBG_TRACK_ALLOCATIONS227UINT32 Outstanding;228#endif229230AcpiOsPrintf ("\n%s\n", List->ListName);231232/* MaxDepth > 0 indicates a cache object */233234if (List->MaxDepth > 0)235{236AcpiOsPrintf (237" Cache: [Depth MaxD Avail Size] "238"%8.2X %8.2X %8.2X %8.2X\n",239List->CurrentDepth,240List->MaxDepth,241List->MaxDepth - List->CurrentDepth,242(List->CurrentDepth * List->ObjectSize));243}244245#ifdef ACPI_DBG_TRACK_ALLOCATIONS246if (List->MaxDepth > 0)247{248AcpiOsPrintf (249" Cache: [Requests Hits Misses ObjSize] "250"%8.2X %8.2X %8.2X %8.2X\n",251List->Requests,252List->Hits,253List->Requests - List->Hits,254List->ObjectSize);255}256257Outstanding = AcpiDbGetCacheInfo (List);258259if (List->ObjectSize)260{261AcpiOsPrintf (262" Mem: [Alloc Free Max CurSize Outstanding] "263"%8.2X %8.2X %8.2X %8.2X %8.2X\n",264List->TotalAllocated,265List->TotalFreed,266List->MaxOccupied,267Outstanding * List->ObjectSize,268Outstanding);269}270else271{272AcpiOsPrintf (273" Mem: [Alloc Free Max CurSize Outstanding Total] "274"%8.2X %8.2X %8.2X %8.2X %8.2X %8.2X\n",275List->TotalAllocated,276List->TotalFreed,277List->MaxOccupied,278List->CurrentTotalSize,279Outstanding,280List->TotalSize);281}282#endif283}284#endif285286287/*******************************************************************************288*289* FUNCTION: AcpiDbEnumerateObject290*291* PARAMETERS: ObjDesc - Object to be counted292*293* RETURN: None294*295* DESCRIPTION: Add this object to the global counts, by object type.296* Limited recursion handles subobjects and packages, and this297* is probably acceptable within the AML debugger only.298*299******************************************************************************/300301static void302AcpiDbEnumerateObject (303ACPI_OPERAND_OBJECT *ObjDesc)304{305UINT32 i;306307308if (!ObjDesc)309{310return;311}312313/* Enumerate this object first */314315AcpiGbl_NumObjects++;316317if (ObjDesc->Common.Type > ACPI_TYPE_NS_NODE_MAX)318{319AcpiGbl_ObjTypeCountMisc++;320}321else322{323AcpiGbl_ObjTypeCount [ObjDesc->Common.Type]++;324}325326/* Count the sub-objects */327328switch (ObjDesc->Common.Type)329{330case ACPI_TYPE_PACKAGE:331332for (i = 0; i < ObjDesc->Package.Count; i++)333{334AcpiDbEnumerateObject (ObjDesc->Package.Elements[i]);335}336break;337338case ACPI_TYPE_DEVICE:339340AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[0]);341AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[1]);342AcpiDbEnumerateObject (ObjDesc->Device.Handler);343break;344345case ACPI_TYPE_BUFFER_FIELD:346347if (AcpiNsGetSecondaryObject (ObjDesc))348{349AcpiGbl_ObjTypeCount [ACPI_TYPE_BUFFER_FIELD]++;350}351break;352353case ACPI_TYPE_REGION:354355AcpiGbl_ObjTypeCount [ACPI_TYPE_LOCAL_REGION_FIELD ]++;356AcpiDbEnumerateObject (ObjDesc->Region.Handler);357break;358359case ACPI_TYPE_POWER:360361AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[0]);362AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[1]);363break;364365case ACPI_TYPE_PROCESSOR:366367AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[0]);368AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[1]);369AcpiDbEnumerateObject (ObjDesc->Processor.Handler);370break;371372case ACPI_TYPE_THERMAL:373374AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[0]);375AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[1]);376AcpiDbEnumerateObject (ObjDesc->ThermalZone.Handler);377break;378379default:380381break;382}383}384385386/*******************************************************************************387*388* FUNCTION: AcpiDbClassifyOneObject389*390* PARAMETERS: Callback for WalkNamespace391*392* RETURN: Status393*394* DESCRIPTION: Enumerate both the object descriptor (including subobjects) and395* the parent namespace node.396*397******************************************************************************/398399static ACPI_STATUS400AcpiDbClassifyOneObject (401ACPI_HANDLE ObjHandle,402UINT32 NestingLevel,403void *Context,404void **ReturnValue)405{406ACPI_NAMESPACE_NODE *Node;407ACPI_OPERAND_OBJECT *ObjDesc;408UINT32 Type;409410411AcpiGbl_NumNodes++;412413Node = (ACPI_NAMESPACE_NODE *) ObjHandle;414ObjDesc = AcpiNsGetAttachedObject (Node);415416AcpiDbEnumerateObject (ObjDesc);417418Type = Node->Type;419if (Type > ACPI_TYPE_NS_NODE_MAX)420{421AcpiGbl_NodeTypeCountMisc++;422}423else424{425AcpiGbl_NodeTypeCount [Type]++;426}427428return (AE_OK);429430431#ifdef ACPI_FUTURE_IMPLEMENTATION432433/* TBD: These need to be counted during the initial parsing phase */434435if (AcpiPsIsNamedOp (Op->Opcode))436{437NumNodes++;438}439440if (IsMethod)441{442NumMethodElements++;443}444445NumGrammarElements++;446Op = AcpiPsGetDepthNext (Root, Op);447448SizeOfParseTree = (NumGrammarElements - NumMethodElements) *449(UINT32) sizeof (ACPI_PARSE_OBJECT);450SizeOfMethodTrees = NumMethodElements * (UINT32) sizeof (ACPI_PARSE_OBJECT);451SizeOfNodeEntries = NumNodes * (UINT32) sizeof (ACPI_NAMESPACE_NODE);452SizeOfAcpiObjects = NumNodes * (UINT32) sizeof (ACPI_OPERAND_OBJECT);453#endif454}455456457/*******************************************************************************458*459* FUNCTION: AcpiDbCountNamespaceObjects460*461* PARAMETERS: None462*463* RETURN: None464*465* DESCRIPTION: Count and classify the entire namespace, including all466* namespace nodes and attached objects.467*468******************************************************************************/469470static void471AcpiDbCountNamespaceObjects (472void)473{474UINT32 i;475476477AcpiGbl_NumNodes = 0;478AcpiGbl_NumObjects = 0;479480AcpiGbl_ObjTypeCountMisc = 0;481for (i = 0; i < (ACPI_TYPE_NS_NODE_MAX -1); i++)482{483AcpiGbl_ObjTypeCount [i] = 0;484AcpiGbl_NodeTypeCount [i] = 0;485}486487(void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,488ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL);489}490491492/*******************************************************************************493*494* FUNCTION: AcpiDbDisplayStatistics495*496* PARAMETERS: TypeArg - Subcommand497*498* RETURN: Status499*500* DESCRIPTION: Display various statistics501*502******************************************************************************/503504ACPI_STATUS505AcpiDbDisplayStatistics (506char *TypeArg)507{508UINT32 i;509UINT32 Temp;510511512AcpiUtStrupr (TypeArg);513Temp = AcpiDbMatchArgument (TypeArg, AcpiDbStatTypes);514if (Temp == ACPI_TYPE_NOT_FOUND)515{516AcpiOsPrintf ("Invalid or unsupported argument\n");517return (AE_OK);518}519520521switch (Temp)522{523case CMD_STAT_ALLOCATIONS:524525#ifdef ACPI_DBG_TRACK_ALLOCATIONS526AcpiUtDumpAllocationInfo ();527#endif528break;529530case CMD_STAT_TABLES:531532AcpiOsPrintf ("ACPI Table Information (not implemented):\n\n");533break;534535case CMD_STAT_OBJECTS:536537AcpiDbCountNamespaceObjects ();538539AcpiOsPrintf ("\nObjects defined in the current namespace:\n\n");540541AcpiOsPrintf ("%16.16s %10.10s %10.10s\n",542"ACPI_TYPE", "NODES", "OBJECTS");543544for (i = 0; i < ACPI_TYPE_NS_NODE_MAX; i++)545{546AcpiOsPrintf ("%16.16s %10u %10u\n", AcpiUtGetTypeName (i),547AcpiGbl_NodeTypeCount [i], AcpiGbl_ObjTypeCount [i]);548}549550AcpiOsPrintf ("%16.16s %10u %10u\n", "Misc/Unknown",551AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);552553AcpiOsPrintf ("%16.16s %10u %10u\n", "TOTALS:",554AcpiGbl_NumNodes, AcpiGbl_NumObjects);555break;556557case CMD_STAT_MEMORY:558559#ifdef ACPI_DBG_TRACK_ALLOCATIONS560AcpiOsPrintf ("\n----Object Statistics (all in hex)---------\n");561562AcpiDbListInfo (AcpiGbl_GlobalList);563AcpiDbListInfo (AcpiGbl_NsNodeList);564#endif565566#ifdef ACPI_USE_LOCAL_CACHE567AcpiOsPrintf ("\n----Cache Statistics (all in hex)---------\n");568AcpiDbListInfo (AcpiGbl_OperandCache);569AcpiDbListInfo (AcpiGbl_PsNodeCache);570AcpiDbListInfo (AcpiGbl_PsNodeExtCache);571AcpiDbListInfo (AcpiGbl_StateCache);572#endif573574break;575576case CMD_STAT_MISC:577578AcpiOsPrintf ("\nMiscellaneous Statistics:\n\n");579AcpiOsPrintf ("%-28s: %7u\n", "Calls to AcpiPsFind",580AcpiGbl_PsFindCount);581AcpiOsPrintf ("%-28s: %7u\n", "Calls to AcpiNsLookup",582AcpiGbl_NsLookupCount);583584AcpiOsPrintf ("\nMutex usage:\n\n");585for (i = 0; i < ACPI_NUM_MUTEX; i++)586{587AcpiOsPrintf ("%-28s: %7u\n",588AcpiUtGetMutexName (i), AcpiGbl_MutexInfo[i].UseCount);589}590break;591592case CMD_STAT_SIZES:593594AcpiOsPrintf ("\nInternal object sizes:\n\n");595596AcpiOsPrintf ("Common %3d\n", (UINT32) sizeof (ACPI_OBJECT_COMMON));597AcpiOsPrintf ("Number %3d\n", (UINT32) sizeof (ACPI_OBJECT_INTEGER));598AcpiOsPrintf ("String %3d\n", (UINT32) sizeof (ACPI_OBJECT_STRING));599AcpiOsPrintf ("Buffer %3d\n", (UINT32) sizeof (ACPI_OBJECT_BUFFER));600AcpiOsPrintf ("Package %3d\n", (UINT32) sizeof (ACPI_OBJECT_PACKAGE));601AcpiOsPrintf ("BufferField %3d\n", (UINT32) sizeof (ACPI_OBJECT_BUFFER_FIELD));602AcpiOsPrintf ("Device %3d\n", (UINT32) sizeof (ACPI_OBJECT_DEVICE));603AcpiOsPrintf ("Event %3d\n", (UINT32) sizeof (ACPI_OBJECT_EVENT));604AcpiOsPrintf ("Method %3d\n", (UINT32) sizeof (ACPI_OBJECT_METHOD));605AcpiOsPrintf ("Mutex %3d\n", (UINT32) sizeof (ACPI_OBJECT_MUTEX));606AcpiOsPrintf ("Region %3d\n", (UINT32) sizeof (ACPI_OBJECT_REGION));607AcpiOsPrintf ("PowerResource %3d\n", (UINT32) sizeof (ACPI_OBJECT_POWER_RESOURCE));608AcpiOsPrintf ("Processor %3d\n", (UINT32) sizeof (ACPI_OBJECT_PROCESSOR));609AcpiOsPrintf ("ThermalZone %3d\n", (UINT32) sizeof (ACPI_OBJECT_THERMAL_ZONE));610AcpiOsPrintf ("RegionField %3d\n", (UINT32) sizeof (ACPI_OBJECT_REGION_FIELD));611AcpiOsPrintf ("BankField %3d\n", (UINT32) sizeof (ACPI_OBJECT_BANK_FIELD));612AcpiOsPrintf ("IndexField %3d\n", (UINT32) sizeof (ACPI_OBJECT_INDEX_FIELD));613AcpiOsPrintf ("Reference %3d\n", (UINT32) sizeof (ACPI_OBJECT_REFERENCE));614AcpiOsPrintf ("Notify %3d\n", (UINT32) sizeof (ACPI_OBJECT_NOTIFY_HANDLER));615AcpiOsPrintf ("AddressSpace %3d\n", (UINT32) sizeof (ACPI_OBJECT_ADDR_HANDLER));616AcpiOsPrintf ("Extra %3d\n", (UINT32) sizeof (ACPI_OBJECT_EXTRA));617AcpiOsPrintf ("Data %3d\n", (UINT32) sizeof (ACPI_OBJECT_DATA));618619AcpiOsPrintf ("\n");620621AcpiOsPrintf ("ParseObject %3d\n", (UINT32) sizeof (ACPI_PARSE_OBJ_COMMON));622AcpiOsPrintf ("ParseObjectNamed %3d\n", (UINT32) sizeof (ACPI_PARSE_OBJ_NAMED));623AcpiOsPrintf ("ParseObjectAsl %3d\n", (UINT32) sizeof (ACPI_PARSE_OBJ_ASL));624AcpiOsPrintf ("OperandObject %3d\n", (UINT32) sizeof (ACPI_OPERAND_OBJECT));625AcpiOsPrintf ("NamespaceNode %3d\n", (UINT32) sizeof (ACPI_NAMESPACE_NODE));626AcpiOsPrintf ("AcpiObject %3d\n", (UINT32) sizeof (ACPI_OBJECT));627628AcpiOsPrintf ("\n");629630AcpiOsPrintf ("Generic State %3d\n", (UINT32) sizeof (ACPI_GENERIC_STATE));631AcpiOsPrintf ("Common State %3d\n", (UINT32) sizeof (ACPI_COMMON_STATE));632AcpiOsPrintf ("Control State %3d\n", (UINT32) sizeof (ACPI_CONTROL_STATE));633AcpiOsPrintf ("Update State %3d\n", (UINT32) sizeof (ACPI_UPDATE_STATE));634AcpiOsPrintf ("Scope State %3d\n", (UINT32) sizeof (ACPI_SCOPE_STATE));635AcpiOsPrintf ("Parse Scope %3d\n", (UINT32) sizeof (ACPI_PSCOPE_STATE));636AcpiOsPrintf ("Package State %3d\n", (UINT32) sizeof (ACPI_PKG_STATE));637AcpiOsPrintf ("Thread State %3d\n", (UINT32) sizeof (ACPI_THREAD_STATE));638AcpiOsPrintf ("Result Values %3d\n", (UINT32) sizeof (ACPI_RESULT_VALUES));639AcpiOsPrintf ("Notify Info %3d\n", (UINT32) sizeof (ACPI_NOTIFY_INFO));640break;641642case CMD_STAT_STACK:643#if defined(ACPI_DEBUG_OUTPUT)644645Temp = (UINT32) ACPI_PTR_DIFF (646AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);647648AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");649AcpiOsPrintf ("Entry Stack Pointer %p\n", AcpiGbl_EntryStackPointer);650AcpiOsPrintf ("Lowest Stack Pointer %p\n", AcpiGbl_LowestStackPointer);651AcpiOsPrintf ("Stack Use %X (%u)\n", Temp, Temp);652AcpiOsPrintf ("Deepest Procedure Nesting %u\n", AcpiGbl_DeepestNesting);653#endif654break;655656default:657658break;659}660661AcpiOsPrintf ("\n");662return (AE_OK);663}664665666