Deleted Added
full compact
dbstats.c (99679) dbstats.c (102550)
1/*******************************************************************************
2 *
3 * Module Name: dbstats - Generation and display of ACPI table statistics
1/*******************************************************************************
2 *
3 * Module Name: dbstats - Generation and display of ACPI table statistics
4 * $Revision: 60 $
4 * $Revision: 61 $
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.

--- 101 unchanged lines hidden (view full) ---

114 *
115 *****************************************************************************/
116
117
118#include <acpi.h>
119#include <acdebug.h>
120#include <acnamesp.h>
121
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.

--- 101 unchanged lines hidden (view full) ---

114 *
115 *****************************************************************************/
116
117
118#include <acpi.h>
119#include <acdebug.h>
120#include <acnamesp.h>
121
122#ifdef ENABLE_DEBUGGER
122#ifdef ACPI_DEBUGGER
123
123
124#define _COMPONENT ACPI_DEBUGGER
124#define _COMPONENT ACPI_CA_DEBUGGER
125 ACPI_MODULE_NAME ("dbstats")
126
127/*
128 * Statistics subcommands
129 */
130static ARGUMENT_INFO AcpiDbStatTypes [] =
131{
132 {"ALLOCATIONS"},

--- 102 unchanged lines hidden (view full) ---

235 break;
236
237 default:
238 break;
239 }
240}
241
242
125 ACPI_MODULE_NAME ("dbstats")
126
127/*
128 * Statistics subcommands
129 */
130static ARGUMENT_INFO AcpiDbStatTypes [] =
131{
132 {"ALLOCATIONS"},

--- 102 unchanged lines hidden (view full) ---

235 break;
236
237 default:
238 break;
239 }
240}
241
242
243#ifndef PARSER_ONLY
244
245/*******************************************************************************
246 *
247 * FUNCTION: AcpiDbClassifyOneObject
248 *
249 * PARAMETERS: Callback for WalkNamespace
250 *
251 * RETURN: Status
252 *

--- 88 unchanged lines hidden (view full) ---

341 AcpiGbl_ObjTypeCount [i] = 0;
342 AcpiGbl_NodeTypeCount [i] = 0;
343 }
344
345 (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
346 FALSE, AcpiDbClassifyOneObject, NULL, NULL);
347}
348
243/*******************************************************************************
244 *
245 * FUNCTION: AcpiDbClassifyOneObject
246 *
247 * PARAMETERS: Callback for WalkNamespace
248 *
249 * RETURN: Status
250 *

--- 88 unchanged lines hidden (view full) ---

339 AcpiGbl_ObjTypeCount [i] = 0;
340 AcpiGbl_NodeTypeCount [i] = 0;
341 }
342
343 (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
344 FALSE, AcpiDbClassifyOneObject, NULL, NULL);
345}
346
349#endif
350
347
351
352/*******************************************************************************
353 *
354 * FUNCTION: AcpiDbDisplayStatistics
355 *
356 * PARAMETERS: TypeArg - Subcommand
357 *
358 * RETURN: Status
359 *

--- 30 unchanged lines hidden (view full) ---

390 {
391 AcpiOsPrintf ("Invalid or unsupported argument\n");
392 return (AE_OK);
393 }
394
395
396 switch (Type)
397 {
348/*******************************************************************************
349 *
350 * FUNCTION: AcpiDbDisplayStatistics
351 *
352 * PARAMETERS: TypeArg - Subcommand
353 *
354 * RETURN: Status
355 *

--- 30 unchanged lines hidden (view full) ---

386 {
387 AcpiOsPrintf ("Invalid or unsupported argument\n");
388 return (AE_OK);
389 }
390
391
392 switch (Type)
393 {
398#ifndef PARSER_ONLY
399 case CMD_STAT_ALLOCATIONS:
400#ifdef ACPI_DBG_TRACK_ALLOCATIONS
401 AcpiUtDumpAllocationInfo ();
402#endif
403 break;
394 case CMD_STAT_ALLOCATIONS:
395#ifdef ACPI_DBG_TRACK_ALLOCATIONS
396 AcpiUtDumpAllocationInfo ();
397#endif
398 break;
404#endif
405
406 case CMD_STAT_TABLES:
407
408 AcpiOsPrintf ("ACPI Table Information:\n\n");
409 if (AcpiGbl_DSDT)
410 {
411 AcpiOsPrintf ("DSDT Length:................% 7ld (%X)\n", AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length);
412 }
413 break;
414
415 case CMD_STAT_OBJECTS:
416
399
400 case CMD_STAT_TABLES:
401
402 AcpiOsPrintf ("ACPI Table Information:\n\n");
403 if (AcpiGbl_DSDT)
404 {
405 AcpiOsPrintf ("DSDT Length:................% 7ld (%X)\n", AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length);
406 }
407 break;
408
409 case CMD_STAT_OBJECTS:
410
417#ifndef PARSER_ONLY
418
419 AcpiDbCountNamespaceObjects ();
420
421 AcpiOsPrintf ("\nObjects defined in the current namespace:\n\n");
422
423 AcpiOsPrintf ("%16.16s % 10.10s % 10.10s\n", "ACPI_TYPE", "NODES", "OBJECTS");
424
425 for (i = 0; i < INTERNAL_TYPE_NODE_MAX; i++)
426 {
427 AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", AcpiUtGetTypeName (i),
428 AcpiGbl_NodeTypeCount [i], AcpiGbl_ObjTypeCount [i]);
429 }
430 AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "Misc/Unknown",
431 AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);
432
433 AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "TOTALS:",
434 AcpiGbl_NumNodes, AcpiGbl_NumObjects);
411 AcpiDbCountNamespaceObjects ();
412
413 AcpiOsPrintf ("\nObjects defined in the current namespace:\n\n");
414
415 AcpiOsPrintf ("%16.16s % 10.10s % 10.10s\n", "ACPI_TYPE", "NODES", "OBJECTS");
416
417 for (i = 0; i < INTERNAL_TYPE_NODE_MAX; i++)
418 {
419 AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", AcpiUtGetTypeName (i),
420 AcpiGbl_NodeTypeCount [i], AcpiGbl_ObjTypeCount [i]);
421 }
422 AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "Misc/Unknown",
423 AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);
424
425 AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "TOTALS:",
426 AcpiGbl_NumNodes, AcpiGbl_NumObjects);
435
436#endif
437 break;
438
439 case CMD_STAT_MEMORY:
440
441#ifdef ACPI_DBG_TRACK_ALLOCATIONS
442 AcpiOsPrintf ("\n----Object and Cache Statistics---------------------------------------------\n");
443
444 for (i = 0; i < ACPI_NUM_MEM_LISTS; i++)

--- 87 unchanged lines hidden (view full) ---

532 AcpiOsPrintf ("ParseObjectAsl %3d\n", sizeof (ACPI_PARSE_OBJ_ASL));
533 AcpiOsPrintf ("OperandObject %3d\n", sizeof (ACPI_OPERAND_OBJECT));
534 AcpiOsPrintf ("NamespaceNode %3d\n", sizeof (ACPI_NAMESPACE_NODE));
535
536 break;
537
538
539 case CMD_STAT_STACK:
427 break;
428
429 case CMD_STAT_MEMORY:
430
431#ifdef ACPI_DBG_TRACK_ALLOCATIONS
432 AcpiOsPrintf ("\n----Object and Cache Statistics---------------------------------------------\n");
433
434 for (i = 0; i < ACPI_NUM_MEM_LISTS; i++)

--- 87 unchanged lines hidden (view full) ---

522 AcpiOsPrintf ("ParseObjectAsl %3d\n", sizeof (ACPI_PARSE_OBJ_ASL));
523 AcpiOsPrintf ("OperandObject %3d\n", sizeof (ACPI_OPERAND_OBJECT));
524 AcpiOsPrintf ("NamespaceNode %3d\n", sizeof (ACPI_NAMESPACE_NODE));
525
526 break;
527
528
529 case CMD_STAT_STACK:
540#if defined(ACPI_DEBUG)
530#if defined(ACPI_DEBUG_OUTPUT)
541
542 Size = (UINT32) (AcpiGbl_EntryStackPointer - AcpiGbl_LowestStackPointer);
543
544 AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
545 AcpiOsPrintf ("Entry Stack Pointer %X\n", AcpiGbl_EntryStackPointer);
546 AcpiOsPrintf ("Lowest Stack Pointer %X\n", AcpiGbl_LowestStackPointer);
547 AcpiOsPrintf ("Stack Use %X (%d)\n", Size, Size);
548 AcpiOsPrintf ("Deepest Procedure Nesting %d\n", AcpiGbl_DeepestNesting);

--- 4 unchanged lines hidden (view full) ---

553 break;
554 }
555
556 AcpiOsPrintf ("\n");
557 return (AE_OK);
558}
559
560
531
532 Size = (UINT32) (AcpiGbl_EntryStackPointer - AcpiGbl_LowestStackPointer);
533
534 AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
535 AcpiOsPrintf ("Entry Stack Pointer %X\n", AcpiGbl_EntryStackPointer);
536 AcpiOsPrintf ("Lowest Stack Pointer %X\n", AcpiGbl_LowestStackPointer);
537 AcpiOsPrintf ("Stack Use %X (%d)\n", Size, Size);
538 AcpiOsPrintf ("Deepest Procedure Nesting %d\n", AcpiGbl_DeepestNesting);

--- 4 unchanged lines hidden (view full) ---

543 break;
544 }
545
546 AcpiOsPrintf ("\n");
547 return (AE_OK);
548}
549
550
561#endif /* ENABLE_DEBUGGER */
551#endif /* ACPI_DEBUGGER */