xref: /freebsd/sys/contrib/dev/acpica/components/debugger/dbstats.c (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1 /*******************************************************************************
2  *
3  * Module Name: dbstats - Generation and display of ACPI table statistics
4  *
5  ******************************************************************************/
6 
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
12  * All rights reserved.
13  *
14  * 2. License
15  *
16  * 2.1. This is your license from Intel Corp. under its intellectual property
17  * rights. You may have additional license terms from the party that provided
18  * you this software, covering your right to use that party's intellectual
19  * property rights.
20  *
21  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22  * copy of the source code appearing in this file ("Covered Code") an
23  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24  * base code distributed originally by Intel ("Original Intel Code") to copy,
25  * make derivatives, distribute, use and display any portion of the Covered
26  * Code in any form, with the right to sublicense such rights; and
27  *
28  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29  * license (with the right to sublicense), under only those claims of Intel
30  * patents that are infringed by the Original Intel Code, to make, use, sell,
31  * offer to sell, and import the Covered Code and derivative works thereof
32  * solely to the minimum extent necessary to exercise the above copyright
33  * license, and in no event shall the patent license extend to any additions
34  * to or modifications of the Original Intel Code. No other license or right
35  * is granted directly or by implication, estoppel or otherwise;
36  *
37  * The above copyright and patent license is granted only if the following
38  * conditions are met:
39  *
40  * 3. Conditions
41  *
42  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43  * Redistribution of source code of any substantial portion of the Covered
44  * Code or modification with rights to further distribute source must include
45  * the above Copyright Notice, the above License, this list of Conditions,
46  * and the following Disclaimer and Export Compliance provision. In addition,
47  * Licensee must cause all Covered Code to which Licensee contributes to
48  * contain a file documenting the changes Licensee made to create that Covered
49  * Code and the date of any change. Licensee must include in that file the
50  * documentation of any changes made by any predecessor Licensee. Licensee
51  * must include a prominent statement that the modification is derived,
52  * directly or indirectly, from Original Intel Code.
53  *
54  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55  * Redistribution of source code of any substantial portion of the Covered
56  * Code or modification without rights to further distribute source must
57  * include the following Disclaimer and Export Compliance provision in the
58  * documentation and/or other materials provided with distribution. In
59  * addition, Licensee may not authorize further sublicense of source of any
60  * portion of the Covered Code, and must include terms to the effect that the
61  * license from Licensee to its licensee is limited to the intellectual
62  * property embodied in the software Licensee provides to its licensee, and
63  * not to intellectual property embodied in modifications its licensee may
64  * make.
65  *
66  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67  * substantial portion of the Covered Code or modification must reproduce the
68  * above Copyright Notice, and the following Disclaimer and Export Compliance
69  * provision in the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3.4. Intel retains all right, title, and interest in and to the Original
73  * Intel Code.
74  *
75  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76  * Intel shall be used in advertising or otherwise to promote the sale, use or
77  * other dealings in products derived from or relating to the Covered Code
78  * without prior written authorization from Intel.
79  *
80  * 4. Disclaimer and Export Compliance
81  *
82  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88  * PARTICULAR PURPOSE.
89  *
90  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97  * LIMITED REMEDY.
98  *
99  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100  * software or system incorporating such software without first obtaining any
101  * required license or other approval from the U. S. Department of Commerce or
102  * any other agency or department of the United States Government. In the
103  * event Licensee exports any such software from the United States or
104  * re-exports any such software from a foreign destination, Licensee shall
105  * ensure that the distribution and export/re-export of the software is in
106  * compliance with all laws, regulations, orders, or other restrictions of the
107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108  * any of its subsidiaries will export/re-export any technical data, process,
109  * software, or service, directly or indirectly, to any country for which the
110  * United States government or any agency thereof requires an export license,
111  * other governmental approval, or letter of assurance, without first obtaining
112  * such license, approval or letter.
113  *
114  *****************************************************************************
115  *
116  * Alternatively, you may choose to be licensed under the terms of the
117  * following license:
118  *
119  * Redistribution and use in source and binary forms, with or without
120  * modification, are permitted provided that the following conditions
121  * are met:
122  * 1. Redistributions of source code must retain the above copyright
123  *    notice, this list of conditions, and the following disclaimer,
124  *    without modification.
125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126  *    substantially similar to the "NO WARRANTY" disclaimer below
127  *    ("Disclaimer") and any redistribution must be conditioned upon
128  *    including a substantially similar Disclaimer requirement for further
129  *    binary redistribution.
130  * 3. Neither the names of the above-listed copyright holders nor the names
131  *    of any contributors may be used to endorse or promote products derived
132  *    from this software without specific prior written permission.
133  *
134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
145  *
146  * Alternatively, you may choose to be licensed under the terms of the
147  * GNU General Public License ("GPL") version 2 as published by the Free
148  * Software Foundation.
149  *
150  *****************************************************************************/
151 
152 #include <contrib/dev/acpica/include/acpi.h>
153 #include <contrib/dev/acpica/include/accommon.h>
154 #include <contrib/dev/acpica/include/acdebug.h>
155 #include <contrib/dev/acpica/include/acnamesp.h>
156 
157 
158 #define _COMPONENT          ACPI_CA_DEBUGGER
159         ACPI_MODULE_NAME    ("dbstats")
160 
161 
162 /* Local prototypes */
163 
164 static void
165 AcpiDbCountNamespaceObjects (
166     void);
167 
168 static void
169 AcpiDbEnumerateObject (
170     ACPI_OPERAND_OBJECT     *ObjDesc);
171 
172 static ACPI_STATUS
173 AcpiDbClassifyOneObject (
174     ACPI_HANDLE             ObjHandle,
175     UINT32                  NestingLevel,
176     void                    *Context,
177     void                    **ReturnValue);
178 
179 #if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
180 static void
181 AcpiDbListInfo (
182     ACPI_MEMORY_LIST        *List);
183 #endif
184 
185 
186 /*
187  * Statistics subcommands
188  */
189 static ACPI_DB_ARGUMENT_INFO    AcpiDbStatTypes [] =
190 {
191     {"ALLOCATIONS"},
192     {"OBJECTS"},
193     {"MEMORY"},
194     {"MISC"},
195     {"TABLES"},
196     {"SIZES"},
197     {"STACK"},
198     {NULL}           /* Must be null terminated */
199 };
200 
201 #define CMD_STAT_ALLOCATIONS     0
202 #define CMD_STAT_OBJECTS         1
203 #define CMD_STAT_MEMORY          2
204 #define CMD_STAT_MISC            3
205 #define CMD_STAT_TABLES          4
206 #define CMD_STAT_SIZES           5
207 #define CMD_STAT_STACK           6
208 
209 
210 #if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
211 /*******************************************************************************
212  *
213  * FUNCTION:    AcpiDbListInfo
214  *
215  * PARAMETERS:  List            - Memory list/cache to be displayed
216  *
217  * RETURN:      None
218  *
219  * DESCRIPTION: Display information about the input memory list or cache.
220  *
221  ******************************************************************************/
222 
223 static void
224 AcpiDbListInfo (
225     ACPI_MEMORY_LIST        *List)
226 {
227 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
228     UINT32                  Outstanding;
229 #endif
230 
231     AcpiOsPrintf ("\n%s\n", List->ListName);
232 
233     /* MaxDepth > 0 indicates a cache object */
234 
235     if (List->MaxDepth > 0)
236     {
237         AcpiOsPrintf (
238             "    Cache: [Depth    MaxD Avail  Size]                "
239             "%8.2X %8.2X %8.2X %8.2X\n",
240             List->CurrentDepth,
241             List->MaxDepth,
242             List->MaxDepth - List->CurrentDepth,
243             (List->CurrentDepth * List->ObjectSize));
244     }
245 
246 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
247     if (List->MaxDepth > 0)
248     {
249         AcpiOsPrintf (
250             "    Cache: [Requests Hits Misses ObjSize]             "
251             "%8.2X %8.2X %8.2X %8.2X\n",
252             List->Requests,
253             List->Hits,
254             List->Requests - List->Hits,
255             List->ObjectSize);
256     }
257 
258     Outstanding = AcpiDbGetCacheInfo (List);
259 
260     if (List->ObjectSize)
261     {
262         AcpiOsPrintf (
263             "    Mem:   [Alloc    Free Max    CurSize Outstanding] "
264             "%8.2X %8.2X %8.2X %8.2X %8.2X\n",
265             List->TotalAllocated,
266             List->TotalFreed,
267             List->MaxOccupied,
268             Outstanding * List->ObjectSize,
269             Outstanding);
270     }
271     else
272     {
273         AcpiOsPrintf (
274             "    Mem:   [Alloc Free Max CurSize Outstanding Total] "
275             "%8.2X %8.2X %8.2X %8.2X %8.2X %8.2X\n",
276             List->TotalAllocated,
277             List->TotalFreed,
278             List->MaxOccupied,
279             List->CurrentTotalSize,
280             Outstanding,
281             List->TotalSize);
282     }
283 #endif
284 }
285 #endif
286 
287 
288 /*******************************************************************************
289  *
290  * FUNCTION:    AcpiDbEnumerateObject
291  *
292  * PARAMETERS:  ObjDesc             - Object to be counted
293  *
294  * RETURN:      None
295  *
296  * DESCRIPTION: Add this object to the global counts, by object type.
297  *              Limited recursion handles subobjects and packages, and this
298  *              is probably acceptable within the AML debugger only.
299  *
300  ******************************************************************************/
301 
302 static void
303 AcpiDbEnumerateObject (
304     ACPI_OPERAND_OBJECT     *ObjDesc)
305 {
306     UINT32                  i;
307 
308 
309     if (!ObjDesc)
310     {
311         return;
312     }
313 
314     /* Enumerate this object first */
315 
316     AcpiGbl_NumObjects++;
317 
318     if (ObjDesc->Common.Type > ACPI_TYPE_NS_NODE_MAX)
319     {
320         AcpiGbl_ObjTypeCountMisc++;
321     }
322     else
323     {
324         AcpiGbl_ObjTypeCount [ObjDesc->Common.Type]++;
325     }
326 
327     /* Count the sub-objects */
328 
329     switch (ObjDesc->Common.Type)
330     {
331     case ACPI_TYPE_PACKAGE:
332 
333         for (i = 0; i < ObjDesc->Package.Count; i++)
334         {
335             AcpiDbEnumerateObject (ObjDesc->Package.Elements[i]);
336         }
337         break;
338 
339     case ACPI_TYPE_DEVICE:
340 
341         AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[0]);
342         AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[1]);
343         AcpiDbEnumerateObject (ObjDesc->Device.Handler);
344         break;
345 
346     case ACPI_TYPE_BUFFER_FIELD:
347 
348         if (AcpiNsGetSecondaryObject (ObjDesc))
349         {
350             AcpiGbl_ObjTypeCount [ACPI_TYPE_BUFFER_FIELD]++;
351         }
352         break;
353 
354     case ACPI_TYPE_REGION:
355 
356         AcpiGbl_ObjTypeCount [ACPI_TYPE_LOCAL_REGION_FIELD ]++;
357         AcpiDbEnumerateObject (ObjDesc->Region.Handler);
358         break;
359 
360     case ACPI_TYPE_POWER:
361 
362         AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[0]);
363         AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[1]);
364         break;
365 
366     case ACPI_TYPE_PROCESSOR:
367 
368         AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[0]);
369         AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[1]);
370         AcpiDbEnumerateObject (ObjDesc->Processor.Handler);
371         break;
372 
373     case ACPI_TYPE_THERMAL:
374 
375         AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[0]);
376         AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[1]);
377         AcpiDbEnumerateObject (ObjDesc->ThermalZone.Handler);
378         break;
379 
380     default:
381 
382         break;
383     }
384 }
385 
386 
387 /*******************************************************************************
388  *
389  * FUNCTION:    AcpiDbClassifyOneObject
390  *
391  * PARAMETERS:  Callback for WalkNamespace
392  *
393  * RETURN:      Status
394  *
395  * DESCRIPTION: Enumerate both the object descriptor (including subobjects) and
396  *              the parent namespace node.
397  *
398  ******************************************************************************/
399 
400 static ACPI_STATUS
401 AcpiDbClassifyOneObject (
402     ACPI_HANDLE             ObjHandle,
403     UINT32                  NestingLevel,
404     void                    *Context,
405     void                    **ReturnValue)
406 {
407     ACPI_NAMESPACE_NODE     *Node;
408     ACPI_OPERAND_OBJECT     *ObjDesc;
409     UINT32                  Type;
410 
411 
412     AcpiGbl_NumNodes++;
413 
414     Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
415     ObjDesc = AcpiNsGetAttachedObject (Node);
416 
417     AcpiDbEnumerateObject (ObjDesc);
418 
419     Type = Node->Type;
420     if (Type > ACPI_TYPE_NS_NODE_MAX)
421     {
422         AcpiGbl_NodeTypeCountMisc++;
423     }
424     else
425     {
426         AcpiGbl_NodeTypeCount [Type]++;
427     }
428 
429     return (AE_OK);
430 
431 
432 #ifdef ACPI_FUTURE_IMPLEMENTATION
433 
434     /* TBD: These need to be counted during the initial parsing phase */
435 
436     if (AcpiPsIsNamedOp (Op->Opcode))
437     {
438         NumNodes++;
439     }
440 
441     if (IsMethod)
442     {
443         NumMethodElements++;
444     }
445 
446     NumGrammarElements++;
447     Op = AcpiPsGetDepthNext (Root, Op);
448 
449     SizeOfParseTree   = (NumGrammarElements - NumMethodElements) *
450         (UINT32) sizeof (ACPI_PARSE_OBJECT);
451     SizeOfMethodTrees = NumMethodElements * (UINT32) sizeof (ACPI_PARSE_OBJECT);
452     SizeOfNodeEntries = NumNodes * (UINT32) sizeof (ACPI_NAMESPACE_NODE);
453     SizeOfAcpiObjects = NumNodes * (UINT32) sizeof (ACPI_OPERAND_OBJECT);
454 #endif
455 }
456 
457 
458 /*******************************************************************************
459  *
460  * FUNCTION:    AcpiDbCountNamespaceObjects
461  *
462  * PARAMETERS:  None
463  *
464  * RETURN:      None
465  *
466  * DESCRIPTION: Count and classify the entire namespace, including all
467  *              namespace nodes and attached objects.
468  *
469  ******************************************************************************/
470 
471 static void
472 AcpiDbCountNamespaceObjects (
473     void)
474 {
475     UINT32                  i;
476 
477 
478     AcpiGbl_NumNodes = 0;
479     AcpiGbl_NumObjects = 0;
480 
481     AcpiGbl_ObjTypeCountMisc = 0;
482     for (i = 0; i < (ACPI_TYPE_NS_NODE_MAX -1); i++)
483     {
484         AcpiGbl_ObjTypeCount [i] = 0;
485         AcpiGbl_NodeTypeCount [i] = 0;
486     }
487 
488     (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
489         ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL);
490 }
491 
492 
493 /*******************************************************************************
494  *
495  * FUNCTION:    AcpiDbDisplayStatistics
496  *
497  * PARAMETERS:  TypeArg         - Subcommand
498  *
499  * RETURN:      Status
500  *
501  * DESCRIPTION: Display various statistics
502  *
503  ******************************************************************************/
504 
505 ACPI_STATUS
506 AcpiDbDisplayStatistics (
507     char                    *TypeArg)
508 {
509     UINT32                  i;
510     UINT32                  Temp;
511 
512 
513     AcpiUtStrupr (TypeArg);
514     Temp = AcpiDbMatchArgument (TypeArg, AcpiDbStatTypes);
515     if (Temp == ACPI_TYPE_NOT_FOUND)
516     {
517         AcpiOsPrintf ("Invalid or unsupported argument\n");
518         return (AE_OK);
519     }
520 
521 
522     switch (Temp)
523     {
524     case CMD_STAT_ALLOCATIONS:
525 
526 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
527         AcpiUtDumpAllocationInfo ();
528 #endif
529         break;
530 
531     case CMD_STAT_TABLES:
532 
533         AcpiOsPrintf ("ACPI Table Information (not implemented):\n\n");
534         break;
535 
536     case CMD_STAT_OBJECTS:
537 
538         AcpiDbCountNamespaceObjects ();
539 
540         AcpiOsPrintf ("\nObjects defined in the current namespace:\n\n");
541 
542         AcpiOsPrintf ("%16.16s %10.10s %10.10s\n",
543             "ACPI_TYPE", "NODES", "OBJECTS");
544 
545         for (i = 0; i < ACPI_TYPE_NS_NODE_MAX; i++)
546         {
547             AcpiOsPrintf ("%16.16s %10u %10u\n", AcpiUtGetTypeName (i),
548                 AcpiGbl_NodeTypeCount [i], AcpiGbl_ObjTypeCount [i]);
549         }
550 
551         AcpiOsPrintf ("%16.16s %10u %10u\n", "Misc/Unknown",
552             AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);
553 
554         AcpiOsPrintf ("%16.16s %10u %10u\n", "TOTALS:",
555             AcpiGbl_NumNodes, AcpiGbl_NumObjects);
556         break;
557 
558     case CMD_STAT_MEMORY:
559 
560 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
561         AcpiOsPrintf ("\n----Object Statistics (all in hex)---------\n");
562 
563         AcpiDbListInfo (AcpiGbl_GlobalList);
564         AcpiDbListInfo (AcpiGbl_NsNodeList);
565 #endif
566 
567 #ifdef ACPI_USE_LOCAL_CACHE
568         AcpiOsPrintf ("\n----Cache Statistics (all in hex)---------\n");
569         AcpiDbListInfo (AcpiGbl_OperandCache);
570         AcpiDbListInfo (AcpiGbl_PsNodeCache);
571         AcpiDbListInfo (AcpiGbl_PsNodeExtCache);
572         AcpiDbListInfo (AcpiGbl_StateCache);
573 #endif
574 
575         break;
576 
577     case CMD_STAT_MISC:
578 
579         AcpiOsPrintf ("\nMiscellaneous Statistics:\n\n");
580         AcpiOsPrintf ("%-28s:       %7u\n", "Calls to AcpiPsFind",
581             AcpiGbl_PsFindCount);
582         AcpiOsPrintf ("%-28s:       %7u\n", "Calls to AcpiNsLookup",
583             AcpiGbl_NsLookupCount);
584 
585         AcpiOsPrintf ("\nMutex usage:\n\n");
586         for (i = 0; i < ACPI_NUM_MUTEX; i++)
587         {
588             AcpiOsPrintf ("%-28s:       %7u\n",
589                 AcpiUtGetMutexName (i), AcpiGbl_MutexInfo[i].UseCount);
590         }
591         break;
592 
593     case CMD_STAT_SIZES:
594 
595         AcpiOsPrintf ("\nInternal object sizes:\n\n");
596 
597         AcpiOsPrintf ("Common           %3d\n", (UINT32) sizeof (ACPI_OBJECT_COMMON));
598         AcpiOsPrintf ("Number           %3d\n", (UINT32) sizeof (ACPI_OBJECT_INTEGER));
599         AcpiOsPrintf ("String           %3d\n", (UINT32) sizeof (ACPI_OBJECT_STRING));
600         AcpiOsPrintf ("Buffer           %3d\n", (UINT32) sizeof (ACPI_OBJECT_BUFFER));
601         AcpiOsPrintf ("Package          %3d\n", (UINT32) sizeof (ACPI_OBJECT_PACKAGE));
602         AcpiOsPrintf ("BufferField      %3d\n", (UINT32) sizeof (ACPI_OBJECT_BUFFER_FIELD));
603         AcpiOsPrintf ("Device           %3d\n", (UINT32) sizeof (ACPI_OBJECT_DEVICE));
604         AcpiOsPrintf ("Event            %3d\n", (UINT32) sizeof (ACPI_OBJECT_EVENT));
605         AcpiOsPrintf ("Method           %3d\n", (UINT32) sizeof (ACPI_OBJECT_METHOD));
606         AcpiOsPrintf ("Mutex            %3d\n", (UINT32) sizeof (ACPI_OBJECT_MUTEX));
607         AcpiOsPrintf ("Region           %3d\n", (UINT32) sizeof (ACPI_OBJECT_REGION));
608         AcpiOsPrintf ("PowerResource    %3d\n", (UINT32) sizeof (ACPI_OBJECT_POWER_RESOURCE));
609         AcpiOsPrintf ("Processor        %3d\n", (UINT32) sizeof (ACPI_OBJECT_PROCESSOR));
610         AcpiOsPrintf ("ThermalZone      %3d\n", (UINT32) sizeof (ACPI_OBJECT_THERMAL_ZONE));
611         AcpiOsPrintf ("RegionField      %3d\n", (UINT32) sizeof (ACPI_OBJECT_REGION_FIELD));
612         AcpiOsPrintf ("BankField        %3d\n", (UINT32) sizeof (ACPI_OBJECT_BANK_FIELD));
613         AcpiOsPrintf ("IndexField       %3d\n", (UINT32) sizeof (ACPI_OBJECT_INDEX_FIELD));
614         AcpiOsPrintf ("Reference        %3d\n", (UINT32) sizeof (ACPI_OBJECT_REFERENCE));
615         AcpiOsPrintf ("Notify           %3d\n", (UINT32) sizeof (ACPI_OBJECT_NOTIFY_HANDLER));
616         AcpiOsPrintf ("AddressSpace     %3d\n", (UINT32) sizeof (ACPI_OBJECT_ADDR_HANDLER));
617         AcpiOsPrintf ("Extra            %3d\n", (UINT32) sizeof (ACPI_OBJECT_EXTRA));
618         AcpiOsPrintf ("Data             %3d\n", (UINT32) sizeof (ACPI_OBJECT_DATA));
619 
620         AcpiOsPrintf ("\n");
621 
622         AcpiOsPrintf ("ParseObject      %3d\n", (UINT32) sizeof (ACPI_PARSE_OBJ_COMMON));
623         AcpiOsPrintf ("ParseObjectNamed %3d\n", (UINT32) sizeof (ACPI_PARSE_OBJ_NAMED));
624         AcpiOsPrintf ("ParseObjectAsl   %3d\n", (UINT32) sizeof (ACPI_PARSE_OBJ_ASL));
625         AcpiOsPrintf ("OperandObject    %3d\n", (UINT32) sizeof (ACPI_OPERAND_OBJECT));
626         AcpiOsPrintf ("NamespaceNode    %3d\n", (UINT32) sizeof (ACPI_NAMESPACE_NODE));
627         AcpiOsPrintf ("AcpiObject       %3d\n", (UINT32) sizeof (ACPI_OBJECT));
628 
629         AcpiOsPrintf ("\n");
630 
631         AcpiOsPrintf ("Generic State    %3d\n", (UINT32) sizeof (ACPI_GENERIC_STATE));
632         AcpiOsPrintf ("Common State     %3d\n", (UINT32) sizeof (ACPI_COMMON_STATE));
633         AcpiOsPrintf ("Control State    %3d\n", (UINT32) sizeof (ACPI_CONTROL_STATE));
634         AcpiOsPrintf ("Update State     %3d\n", (UINT32) sizeof (ACPI_UPDATE_STATE));
635         AcpiOsPrintf ("Scope State      %3d\n", (UINT32) sizeof (ACPI_SCOPE_STATE));
636         AcpiOsPrintf ("Parse Scope      %3d\n", (UINT32) sizeof (ACPI_PSCOPE_STATE));
637         AcpiOsPrintf ("Package State    %3d\n", (UINT32) sizeof (ACPI_PKG_STATE));
638         AcpiOsPrintf ("Thread State     %3d\n", (UINT32) sizeof (ACPI_THREAD_STATE));
639         AcpiOsPrintf ("Result Values    %3d\n", (UINT32) sizeof (ACPI_RESULT_VALUES));
640         AcpiOsPrintf ("Notify Info      %3d\n", (UINT32) sizeof (ACPI_NOTIFY_INFO));
641         break;
642 
643     case CMD_STAT_STACK:
644 #if defined(ACPI_DEBUG_OUTPUT)
645 
646         Temp = (UINT32) ACPI_PTR_DIFF (
647             AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);
648 
649         AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
650         AcpiOsPrintf ("Entry Stack Pointer          %p\n", AcpiGbl_EntryStackPointer);
651         AcpiOsPrintf ("Lowest Stack Pointer         %p\n", AcpiGbl_LowestStackPointer);
652         AcpiOsPrintf ("Stack Use                    %X (%u)\n", Temp, Temp);
653         AcpiOsPrintf ("Deepest Procedure Nesting    %u\n", AcpiGbl_DeepestNesting);
654 #endif
655         break;
656 
657     default:
658 
659         break;
660     }
661 
662     AcpiOsPrintf ("\n");
663     return (AE_OK);
664 }
665