OSDN Git Service

klibc基本機能実装. ACPICAの準備
[vaneos/DivergeMirror.git] / drivers / acpi / components / debugger / dbstats.c
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 - 2015, 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 #include "acpi.h"
117 #include "accommon.h"
118 #include "acdebug.h"
119 #include "acnamesp.h"
120
121 #ifdef ACPI_DEBUGGER
122
123 #define _COMPONENT          ACPI_CA_DEBUGGER
124         ACPI_MODULE_NAME    ("dbstats")
125
126 /* Local prototypes */
127
128 static void
129 AcpiDbCountNamespaceObjects (
130     void);
131
132 static void
133 AcpiDbEnumerateObject (
134     ACPI_OPERAND_OBJECT     *ObjDesc);
135
136 static ACPI_STATUS
137 AcpiDbClassifyOneObject (
138     ACPI_HANDLE             ObjHandle,
139     UINT32                  NestingLevel,
140     void                    *Context,
141     void                    **ReturnValue);
142
143 #if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
144 static void
145 AcpiDbListInfo (
146     ACPI_MEMORY_LIST        *List);
147 #endif
148
149
150 /*
151  * Statistics subcommands
152  */
153 static ACPI_DB_ARGUMENT_INFO    AcpiDbStatTypes [] =
154 {
155     {"ALLOCATIONS"},
156     {"OBJECTS"},
157     {"MEMORY"},
158     {"MISC"},
159     {"TABLES"},
160     {"SIZES"},
161     {"STACK"},
162     {NULL}           /* Must be null terminated */
163 };
164
165 #define CMD_STAT_ALLOCATIONS     0
166 #define CMD_STAT_OBJECTS         1
167 #define CMD_STAT_MEMORY          2
168 #define CMD_STAT_MISC            3
169 #define CMD_STAT_TABLES          4
170 #define CMD_STAT_SIZES           5
171 #define CMD_STAT_STACK           6
172
173
174 #if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
175 /*******************************************************************************
176  *
177  * FUNCTION:    AcpiDbListInfo
178  *
179  * PARAMETERS:  List            - Memory list/cache to be displayed
180  *
181  * RETURN:      None
182  *
183  * DESCRIPTION: Display information about the input memory list or cache.
184  *
185  ******************************************************************************/
186
187 static void
188 AcpiDbListInfo (
189     ACPI_MEMORY_LIST        *List)
190 {
191 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
192     UINT32                  Outstanding;
193 #endif
194
195     AcpiOsPrintf ("\n%s\n", List->ListName);
196
197     /* MaxDepth > 0 indicates a cache object */
198
199     if (List->MaxDepth > 0)
200     {
201         AcpiOsPrintf (
202             "    Cache: [Depth    MaxD Avail  Size]                %8.2X %8.2X %8.2X %8.2X\n",
203             List->CurrentDepth,
204             List->MaxDepth,
205             List->MaxDepth - List->CurrentDepth,
206             (List->CurrentDepth * List->ObjectSize));
207     }
208
209 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
210     if (List->MaxDepth > 0)
211     {
212         AcpiOsPrintf (
213             "    Cache: [Requests Hits Misses ObjSize]             %8.2X %8.2X %8.2X %8.2X\n",
214             List->Requests,
215             List->Hits,
216             List->Requests - List->Hits,
217             List->ObjectSize);
218     }
219
220     Outstanding = AcpiDbGetCacheInfo (List);
221
222     if (List->ObjectSize)
223     {
224         AcpiOsPrintf (
225             "    Mem:   [Alloc    Free Max    CurSize Outstanding] %8.2X %8.2X %8.2X %8.2X %8.2X\n",
226             List->TotalAllocated,
227             List->TotalFreed,
228             List->MaxOccupied,
229             Outstanding * List->ObjectSize,
230             Outstanding);
231     }
232     else
233     {
234         AcpiOsPrintf (
235             "    Mem:   [Alloc Free Max CurSize Outstanding Total] %8.2X %8.2X %8.2X %8.2X %8.2X %8.2X\n",
236             List->TotalAllocated,
237             List->TotalFreed,
238             List->MaxOccupied,
239             List->CurrentTotalSize,
240             Outstanding,
241             List->TotalSize);
242     }
243 #endif
244 }
245 #endif
246
247
248 /*******************************************************************************
249  *
250  * FUNCTION:    AcpiDbEnumerateObject
251  *
252  * PARAMETERS:  ObjDesc             - Object to be counted
253  *
254  * RETURN:      None
255  *
256  * DESCRIPTION: Add this object to the global counts, by object type.
257  *              Limited recursion handles subobjects and packages, and this
258  *              is probably acceptable within the AML debugger only.
259  *
260  ******************************************************************************/
261
262 static void
263 AcpiDbEnumerateObject (
264     ACPI_OPERAND_OBJECT     *ObjDesc)
265 {
266     UINT32                  i;
267
268
269     if (!ObjDesc)
270     {
271         return;
272     }
273
274     /* Enumerate this object first */
275
276     AcpiGbl_NumObjects++;
277
278     if (ObjDesc->Common.Type > ACPI_TYPE_NS_NODE_MAX)
279     {
280         AcpiGbl_ObjTypeCountMisc++;
281     }
282     else
283     {
284         AcpiGbl_ObjTypeCount [ObjDesc->Common.Type]++;
285     }
286
287     /* Count the sub-objects */
288
289     switch (ObjDesc->Common.Type)
290     {
291     case ACPI_TYPE_PACKAGE:
292
293         for (i = 0; i < ObjDesc->Package.Count; i++)
294         {
295             AcpiDbEnumerateObject (ObjDesc->Package.Elements[i]);
296         }
297         break;
298
299     case ACPI_TYPE_DEVICE:
300
301         AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[0]);
302         AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[1]);
303         AcpiDbEnumerateObject (ObjDesc->Device.Handler);
304         break;
305
306     case ACPI_TYPE_BUFFER_FIELD:
307
308         if (AcpiNsGetSecondaryObject (ObjDesc))
309         {
310             AcpiGbl_ObjTypeCount [ACPI_TYPE_BUFFER_FIELD]++;
311         }
312         break;
313
314     case ACPI_TYPE_REGION:
315
316         AcpiGbl_ObjTypeCount [ACPI_TYPE_LOCAL_REGION_FIELD ]++;
317         AcpiDbEnumerateObject (ObjDesc->Region.Handler);
318         break;
319
320     case ACPI_TYPE_POWER:
321
322         AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[0]);
323         AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[1]);
324         break;
325
326     case ACPI_TYPE_PROCESSOR:
327
328         AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[0]);
329         AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[1]);
330         AcpiDbEnumerateObject (ObjDesc->Processor.Handler);
331         break;
332
333     case ACPI_TYPE_THERMAL:
334
335         AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[0]);
336         AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[1]);
337         AcpiDbEnumerateObject (ObjDesc->ThermalZone.Handler);
338         break;
339
340     default:
341
342         break;
343     }
344 }
345
346
347 /*******************************************************************************
348  *
349  * FUNCTION:    AcpiDbClassifyOneObject
350  *
351  * PARAMETERS:  Callback for WalkNamespace
352  *
353  * RETURN:      Status
354  *
355  * DESCRIPTION: Enumerate both the object descriptor (including subobjects) and
356  *              the parent namespace node.
357  *
358  ******************************************************************************/
359
360 static ACPI_STATUS
361 AcpiDbClassifyOneObject (
362     ACPI_HANDLE             ObjHandle,
363     UINT32                  NestingLevel,
364     void                    *Context,
365     void                    **ReturnValue)
366 {
367     ACPI_NAMESPACE_NODE     *Node;
368     ACPI_OPERAND_OBJECT     *ObjDesc;
369     UINT32                  Type;
370
371
372     AcpiGbl_NumNodes++;
373
374     Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
375     ObjDesc = AcpiNsGetAttachedObject (Node);
376
377     AcpiDbEnumerateObject (ObjDesc);
378
379     Type = Node->Type;
380     if (Type > ACPI_TYPE_NS_NODE_MAX)
381     {
382         AcpiGbl_NodeTypeCountMisc++;
383     }
384     else
385     {
386         AcpiGbl_NodeTypeCount [Type]++;
387     }
388
389     return (AE_OK);
390
391
392 #ifdef ACPI_FUTURE_IMPLEMENTATION
393
394     /* TBD: These need to be counted during the initial parsing phase */
395
396     if (AcpiPsIsNamedOp (Op->Opcode))
397     {
398         NumNodes++;
399     }
400
401     if (IsMethod)
402     {
403         NumMethodElements++;
404     }
405
406     NumGrammarElements++;
407     Op = AcpiPsGetDepthNext (Root, Op);
408
409     SizeOfParseTree   = (NumGrammarElements - NumMethodElements) *
410                             (UINT32) sizeof (ACPI_PARSE_OBJECT);
411     SizeOfMethodTrees = NumMethodElements * (UINT32) sizeof (ACPI_PARSE_OBJECT);
412     SizeOfNodeEntries = NumNodes * (UINT32) sizeof (ACPI_NAMESPACE_NODE);
413     SizeOfAcpiObjects = NumNodes * (UINT32) sizeof (ACPI_OPERAND_OBJECT);
414 #endif
415 }
416
417
418 /*******************************************************************************
419  *
420  * FUNCTION:    AcpiDbCountNamespaceObjects
421  *
422  * PARAMETERS:  None
423  *
424  * RETURN:      None
425  *
426  * DESCRIPTION: Count and classify the entire namespace, including all
427  *              namespace nodes and attached objects.
428  *
429  ******************************************************************************/
430
431 static void
432 AcpiDbCountNamespaceObjects (
433     void)
434 {
435     UINT32                  i;
436
437
438     AcpiGbl_NumNodes = 0;
439     AcpiGbl_NumObjects = 0;
440
441     AcpiGbl_ObjTypeCountMisc = 0;
442     for (i = 0; i < (ACPI_TYPE_NS_NODE_MAX -1); i++)
443     {
444         AcpiGbl_ObjTypeCount [i] = 0;
445         AcpiGbl_NodeTypeCount [i] = 0;
446     }
447
448     (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
449                 ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL);
450 }
451
452
453 /*******************************************************************************
454  *
455  * FUNCTION:    AcpiDbDisplayStatistics
456  *
457  * PARAMETERS:  TypeArg         - Subcommand
458  *
459  * RETURN:      Status
460  *
461  * DESCRIPTION: Display various statistics
462  *
463  ******************************************************************************/
464
465 ACPI_STATUS
466 AcpiDbDisplayStatistics (
467     char                    *TypeArg)
468 {
469     UINT32                  i;
470     UINT32                  Temp;
471
472
473     AcpiUtStrupr (TypeArg);
474     Temp = AcpiDbMatchArgument (TypeArg, AcpiDbStatTypes);
475     if (Temp == ACPI_TYPE_NOT_FOUND)
476     {
477         AcpiOsPrintf ("Invalid or unsupported argument\n");
478         return (AE_OK);
479     }
480
481
482     switch (Temp)
483     {
484     case CMD_STAT_ALLOCATIONS:
485
486 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
487         AcpiUtDumpAllocationInfo ();
488 #endif
489         break;
490
491     case CMD_STAT_TABLES:
492
493         AcpiOsPrintf ("ACPI Table Information (not implemented):\n\n");
494         break;
495
496     case CMD_STAT_OBJECTS:
497
498         AcpiDbCountNamespaceObjects ();
499
500         AcpiOsPrintf ("\nObjects defined in the current namespace:\n\n");
501
502         AcpiOsPrintf ("%16.16s %10.10s %10.10s\n",
503             "ACPI_TYPE", "NODES", "OBJECTS");
504
505         for (i = 0; i < ACPI_TYPE_NS_NODE_MAX; i++)
506         {
507             AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", AcpiUtGetTypeName (i),
508                 AcpiGbl_NodeTypeCount [i], AcpiGbl_ObjTypeCount [i]);
509         }
510         AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "Misc/Unknown",
511             AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);
512
513         AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "TOTALS:",
514             AcpiGbl_NumNodes, AcpiGbl_NumObjects);
515         break;
516
517     case CMD_STAT_MEMORY:
518
519 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
520         AcpiOsPrintf ("\n----Object Statistics (all in hex)---------\n");
521
522         AcpiDbListInfo (AcpiGbl_GlobalList);
523         AcpiDbListInfo (AcpiGbl_NsNodeList);
524 #endif
525
526 #ifdef ACPI_USE_LOCAL_CACHE
527         AcpiOsPrintf ("\n----Cache Statistics (all in hex)---------\n");
528         AcpiDbListInfo (AcpiGbl_OperandCache);
529         AcpiDbListInfo (AcpiGbl_PsNodeCache);
530         AcpiDbListInfo (AcpiGbl_PsNodeExtCache);
531         AcpiDbListInfo (AcpiGbl_StateCache);
532 #endif
533
534         break;
535
536     case CMD_STAT_MISC:
537
538         AcpiOsPrintf ("\nMiscellaneous Statistics:\n\n");
539         AcpiOsPrintf ("Calls to AcpiPsFind:..  ........% 7ld\n",
540             AcpiGbl_PsFindCount);
541         AcpiOsPrintf ("Calls to AcpiNsLookup:..........% 7ld\n",
542             AcpiGbl_NsLookupCount);
543
544         AcpiOsPrintf ("\n");
545
546         AcpiOsPrintf ("Mutex usage:\n\n");
547         for (i = 0; i < ACPI_NUM_MUTEX; i++)
548         {
549             AcpiOsPrintf ("%-28s:       % 7ld\n",
550                 AcpiUtGetMutexName (i), AcpiGbl_MutexInfo[i].UseCount);
551         }
552         break;
553
554     case CMD_STAT_SIZES:
555
556         AcpiOsPrintf ("\nInternal object sizes:\n\n");
557
558         AcpiOsPrintf ("Common           %3d\n", sizeof (ACPI_OBJECT_COMMON));
559         AcpiOsPrintf ("Number           %3d\n", sizeof (ACPI_OBJECT_INTEGER));
560         AcpiOsPrintf ("String           %3d\n", sizeof (ACPI_OBJECT_STRING));
561         AcpiOsPrintf ("Buffer           %3d\n", sizeof (ACPI_OBJECT_BUFFER));
562         AcpiOsPrintf ("Package          %3d\n", sizeof (ACPI_OBJECT_PACKAGE));
563         AcpiOsPrintf ("BufferField      %3d\n", sizeof (ACPI_OBJECT_BUFFER_FIELD));
564         AcpiOsPrintf ("Device           %3d\n", sizeof (ACPI_OBJECT_DEVICE));
565         AcpiOsPrintf ("Event            %3d\n", sizeof (ACPI_OBJECT_EVENT));
566         AcpiOsPrintf ("Method           %3d\n", sizeof (ACPI_OBJECT_METHOD));
567         AcpiOsPrintf ("Mutex            %3d\n", sizeof (ACPI_OBJECT_MUTEX));
568         AcpiOsPrintf ("Region           %3d\n", sizeof (ACPI_OBJECT_REGION));
569         AcpiOsPrintf ("PowerResource    %3d\n", sizeof (ACPI_OBJECT_POWER_RESOURCE));
570         AcpiOsPrintf ("Processor        %3d\n", sizeof (ACPI_OBJECT_PROCESSOR));
571         AcpiOsPrintf ("ThermalZone      %3d\n", sizeof (ACPI_OBJECT_THERMAL_ZONE));
572         AcpiOsPrintf ("RegionField      %3d\n", sizeof (ACPI_OBJECT_REGION_FIELD));
573         AcpiOsPrintf ("BankField        %3d\n", sizeof (ACPI_OBJECT_BANK_FIELD));
574         AcpiOsPrintf ("IndexField       %3d\n", sizeof (ACPI_OBJECT_INDEX_FIELD));
575         AcpiOsPrintf ("Reference        %3d\n", sizeof (ACPI_OBJECT_REFERENCE));
576         AcpiOsPrintf ("Notify           %3d\n", sizeof (ACPI_OBJECT_NOTIFY_HANDLER));
577         AcpiOsPrintf ("AddressSpace     %3d\n", sizeof (ACPI_OBJECT_ADDR_HANDLER));
578         AcpiOsPrintf ("Extra            %3d\n", sizeof (ACPI_OBJECT_EXTRA));
579         AcpiOsPrintf ("Data             %3d\n", sizeof (ACPI_OBJECT_DATA));
580
581         AcpiOsPrintf ("\n");
582
583         AcpiOsPrintf ("ParseObject      %3d\n", sizeof (ACPI_PARSE_OBJ_COMMON));
584         AcpiOsPrintf ("ParseObjectNamed %3d\n", sizeof (ACPI_PARSE_OBJ_NAMED));
585         AcpiOsPrintf ("ParseObjectAsl   %3d\n", sizeof (ACPI_PARSE_OBJ_ASL));
586         AcpiOsPrintf ("OperandObject    %3d\n", sizeof (ACPI_OPERAND_OBJECT));
587         AcpiOsPrintf ("NamespaceNode    %3d\n", sizeof (ACPI_NAMESPACE_NODE));
588         AcpiOsPrintf ("AcpiObject       %3d\n", sizeof (ACPI_OBJECT));
589
590         AcpiOsPrintf ("\n");
591
592         AcpiOsPrintf ("Generic State    %3d\n", sizeof (ACPI_GENERIC_STATE));
593         AcpiOsPrintf ("Common State     %3d\n", sizeof (ACPI_COMMON_STATE));
594         AcpiOsPrintf ("Control State    %3d\n", sizeof (ACPI_CONTROL_STATE));
595         AcpiOsPrintf ("Update State     %3d\n", sizeof (ACPI_UPDATE_STATE));
596         AcpiOsPrintf ("Scope State      %3d\n", sizeof (ACPI_SCOPE_STATE));
597         AcpiOsPrintf ("Parse Scope      %3d\n", sizeof (ACPI_PSCOPE_STATE));
598         AcpiOsPrintf ("Package State    %3d\n", sizeof (ACPI_PKG_STATE));
599         AcpiOsPrintf ("Thread State     %3d\n", sizeof (ACPI_THREAD_STATE));
600         AcpiOsPrintf ("Result Values    %3d\n", sizeof (ACPI_RESULT_VALUES));
601         AcpiOsPrintf ("Notify Info      %3d\n", sizeof (ACPI_NOTIFY_INFO));
602         break;
603
604     case CMD_STAT_STACK:
605 #if defined(ACPI_DEBUG_OUTPUT)
606
607         Temp = (UINT32) ACPI_PTR_DIFF (AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);
608
609         AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
610         AcpiOsPrintf ("Entry Stack Pointer          %p\n", AcpiGbl_EntryStackPointer);
611         AcpiOsPrintf ("Lowest Stack Pointer         %p\n", AcpiGbl_LowestStackPointer);
612         AcpiOsPrintf ("Stack Use                    %X (%u)\n", Temp, Temp);
613         AcpiOsPrintf ("Deepest Procedure Nesting    %u\n", AcpiGbl_DeepestNesting);
614 #endif
615         break;
616
617     default:
618
619         break;
620     }
621
622     AcpiOsPrintf ("\n");
623     return (AE_OK);
624 }
625
626 #endif /* ACPI_DEBUGGER  */