Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/debugger/dbstats.c
          +++ new/usr/src/common/acpica/components/debugger/dbstats.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: dbstats - Generation and display of ACPI table statistics
   4    4   *
   5    5   ******************************************************************************/
   6    6  
   7    7  /*
   8      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2014, Intel Corp.
   9    9   * All rights reserved.
  10   10   *
  11   11   * Redistribution and use in source and binary forms, with or without
  12   12   * modification, are permitted provided that the following conditions
  13   13   * are met:
  14   14   * 1. Redistributions of source code must retain the above copyright
  15   15   *    notice, this list of conditions, and the following disclaimer,
  16   16   *    without modification.
  17   17   * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18   18   *    substantially similar to the "NO WARRANTY" disclaimer below
↓ open down ↓ 53 lines elided ↑ open up ↑
  72   72  #if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
  73   73  static void
  74   74  AcpiDbListInfo (
  75   75      ACPI_MEMORY_LIST        *List);
  76   76  #endif
  77   77  
  78   78  
  79   79  /*
  80   80   * Statistics subcommands
  81   81   */
  82      -static ARGUMENT_INFO        AcpiDbStatTypes [] =
       82 +static ACPI_DB_ARGUMENT_INFO    AcpiDbStatTypes [] =
  83   83  {
  84   84      {"ALLOCATIONS"},
  85   85      {"OBJECTS"},
  86   86      {"MEMORY"},
  87   87      {"MISC"},
  88   88      {"TABLES"},
  89   89      {"SIZES"},
  90   90      {"STACK"},
  91   91      {NULL}           /* Must be null terminated */
  92   92  };
↓ open down ↓ 127 lines elided ↑ open up ↑
 220  220      case ACPI_TYPE_PACKAGE:
 221  221  
 222  222          for (i = 0; i < ObjDesc->Package.Count; i++)
 223  223          {
 224  224              AcpiDbEnumerateObject (ObjDesc->Package.Elements[i]);
 225  225          }
 226  226          break;
 227  227  
 228  228      case ACPI_TYPE_DEVICE:
 229  229  
 230      -        AcpiDbEnumerateObject (ObjDesc->Device.SystemNotify);
 231      -        AcpiDbEnumerateObject (ObjDesc->Device.DeviceNotify);
      230 +        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[0]);
      231 +        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[1]);
 232  232          AcpiDbEnumerateObject (ObjDesc->Device.Handler);
 233  233          break;
 234  234  
 235  235      case ACPI_TYPE_BUFFER_FIELD:
 236  236  
 237  237          if (AcpiNsGetSecondaryObject (ObjDesc))
 238  238          {
 239  239              AcpiGbl_ObjTypeCount [ACPI_TYPE_BUFFER_FIELD]++;
 240  240          }
 241  241          break;
 242  242  
 243  243      case ACPI_TYPE_REGION:
 244  244  
 245  245          AcpiGbl_ObjTypeCount [ACPI_TYPE_LOCAL_REGION_FIELD ]++;
 246  246          AcpiDbEnumerateObject (ObjDesc->Region.Handler);
 247  247          break;
 248  248  
 249  249      case ACPI_TYPE_POWER:
 250  250  
 251      -        AcpiDbEnumerateObject (ObjDesc->PowerResource.SystemNotify);
 252      -        AcpiDbEnumerateObject (ObjDesc->PowerResource.DeviceNotify);
      251 +        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[0]);
      252 +        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[1]);
 253  253          break;
 254  254  
 255  255      case ACPI_TYPE_PROCESSOR:
 256  256  
 257      -        AcpiDbEnumerateObject (ObjDesc->Processor.SystemNotify);
 258      -        AcpiDbEnumerateObject (ObjDesc->Processor.DeviceNotify);
      257 +        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[0]);
      258 +        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[1]);
 259  259          AcpiDbEnumerateObject (ObjDesc->Processor.Handler);
 260  260          break;
 261  261  
 262  262      case ACPI_TYPE_THERMAL:
 263  263  
 264      -        AcpiDbEnumerateObject (ObjDesc->ThermalZone.SystemNotify);
 265      -        AcpiDbEnumerateObject (ObjDesc->ThermalZone.DeviceNotify);
      264 +        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[0]);
      265 +        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[1]);
 266  266          AcpiDbEnumerateObject (ObjDesc->ThermalZone.Handler);
 267  267          break;
 268  268  
 269  269      default:
      270 +
 270  271          break;
 271  272      }
 272  273  }
 273  274  
 274  275  
 275  276  /*******************************************************************************
 276  277   *
 277  278   * FUNCTION:    AcpiDbClassifyOneObject
 278  279   *
 279  280   * PARAMETERS:  Callback for WalkNamespace
↓ open down ↓ 27 lines elided ↑ open up ↑
 307  308      Type = Node->Type;
 308  309      if (Type > ACPI_TYPE_NS_NODE_MAX)
 309  310      {
 310  311          AcpiGbl_NodeTypeCountMisc++;
 311  312      }
 312  313      else
 313  314      {
 314  315          AcpiGbl_NodeTypeCount [Type]++;
 315  316      }
 316  317  
 317      -    return AE_OK;
      318 +    return (AE_OK);
 318  319  
 319  320  
 320  321  #ifdef ACPI_FUTURE_IMPLEMENTATION
 321  322  
 322  323      /* TBD: These need to be counted during the initial parsing phase */
 323  324  
 324  325      if (AcpiPsIsNamedOp (Op->Opcode))
 325  326      {
 326  327          NumNodes++;
 327  328      }
↓ open down ↓ 63 lines elided ↑ open up ↑
 391  392   ******************************************************************************/
 392  393  
 393  394  ACPI_STATUS
 394  395  AcpiDbDisplayStatistics (
 395  396      char                    *TypeArg)
 396  397  {
 397  398      UINT32                  i;
 398  399      UINT32                  Temp;
 399  400  
 400  401  
 401      -    if (!TypeArg)
 402      -    {
 403      -        AcpiOsPrintf ("The following subcommands are available:\n    ALLOCATIONS, OBJECTS, MEMORY, MISC, SIZES, TABLES\n");
 404      -        return (AE_OK);
 405      -    }
 406      -
 407  402      AcpiUtStrupr (TypeArg);
 408  403      Temp = AcpiDbMatchArgument (TypeArg, AcpiDbStatTypes);
 409      -    if (Temp == (UINT32) -1)
      404 +    if (Temp == ACPI_TYPE_NOT_FOUND)
 410  405      {
 411  406          AcpiOsPrintf ("Invalid or unsupported argument\n");
 412  407          return (AE_OK);
 413  408      }
 414  409  
 415  410  
 416  411      switch (Temp)
 417  412      {
 418  413      case CMD_STAT_ALLOCATIONS:
 419  414  
↓ open down ↓ 58 lines elided ↑ open up ↑
 478  473          AcpiOsPrintf ("\n");
 479  474  
 480  475          AcpiOsPrintf ("Mutex usage:\n\n");
 481  476          for (i = 0; i < ACPI_NUM_MUTEX; i++)
 482  477          {
 483  478              AcpiOsPrintf ("%-28s:       % 7ld\n",
 484  479                  AcpiUtGetMutexName (i), AcpiGbl_MutexInfo[i].UseCount);
 485  480          }
 486  481          break;
 487  482  
 488      -
 489  483      case CMD_STAT_SIZES:
 490  484  
 491  485          AcpiOsPrintf ("\nInternal object sizes:\n\n");
 492  486  
 493  487          AcpiOsPrintf ("Common           %3d\n", sizeof (ACPI_OBJECT_COMMON));
 494  488          AcpiOsPrintf ("Number           %3d\n", sizeof (ACPI_OBJECT_INTEGER));
 495  489          AcpiOsPrintf ("String           %3d\n", sizeof (ACPI_OBJECT_STRING));
 496  490          AcpiOsPrintf ("Buffer           %3d\n", sizeof (ACPI_OBJECT_BUFFER));
 497  491          AcpiOsPrintf ("Package          %3d\n", sizeof (ACPI_OBJECT_PACKAGE));
 498  492          AcpiOsPrintf ("BufferField      %3d\n", sizeof (ACPI_OBJECT_BUFFER_FIELD));
↓ open down ↓ 16 lines elided ↑ open up ↑
 515  509  
 516  510          AcpiOsPrintf ("\n");
 517  511  
 518  512          AcpiOsPrintf ("ParseObject      %3d\n", sizeof (ACPI_PARSE_OBJ_COMMON));
 519  513          AcpiOsPrintf ("ParseObjectNamed %3d\n", sizeof (ACPI_PARSE_OBJ_NAMED));
 520  514          AcpiOsPrintf ("ParseObjectAsl   %3d\n", sizeof (ACPI_PARSE_OBJ_ASL));
 521  515          AcpiOsPrintf ("OperandObject    %3d\n", sizeof (ACPI_OPERAND_OBJECT));
 522  516          AcpiOsPrintf ("NamespaceNode    %3d\n", sizeof (ACPI_NAMESPACE_NODE));
 523  517          AcpiOsPrintf ("AcpiObject       %3d\n", sizeof (ACPI_OBJECT));
 524  518  
      519 +        AcpiOsPrintf ("\n");
      520 +
      521 +        AcpiOsPrintf ("Generic State    %3d\n", sizeof (ACPI_GENERIC_STATE));
      522 +        AcpiOsPrintf ("Common State     %3d\n", sizeof (ACPI_COMMON_STATE));
      523 +        AcpiOsPrintf ("Control State    %3d\n", sizeof (ACPI_CONTROL_STATE));
      524 +        AcpiOsPrintf ("Update State     %3d\n", sizeof (ACPI_UPDATE_STATE));
      525 +        AcpiOsPrintf ("Scope State      %3d\n", sizeof (ACPI_SCOPE_STATE));
      526 +        AcpiOsPrintf ("Parse Scope      %3d\n", sizeof (ACPI_PSCOPE_STATE));
      527 +        AcpiOsPrintf ("Package State    %3d\n", sizeof (ACPI_PKG_STATE));
      528 +        AcpiOsPrintf ("Thread State     %3d\n", sizeof (ACPI_THREAD_STATE));
      529 +        AcpiOsPrintf ("Result Values    %3d\n", sizeof (ACPI_RESULT_VALUES));
      530 +        AcpiOsPrintf ("Notify Info      %3d\n", sizeof (ACPI_NOTIFY_INFO));
 525  531          break;
 526  532  
 527      -
 528  533      case CMD_STAT_STACK:
 529  534  #if defined(ACPI_DEBUG_OUTPUT)
 530  535  
 531  536          Temp = (UINT32) ACPI_PTR_DIFF (AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);
 532  537  
 533  538          AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
 534  539          AcpiOsPrintf ("Entry Stack Pointer          %p\n", AcpiGbl_EntryStackPointer);
 535  540          AcpiOsPrintf ("Lowest Stack Pointer         %p\n", AcpiGbl_LowestStackPointer);
 536  541          AcpiOsPrintf ("Stack Use                    %X (%u)\n", Temp, Temp);
 537  542          AcpiOsPrintf ("Deepest Procedure Nesting    %u\n", AcpiGbl_DeepestNesting);
 538  543  #endif
 539  544          break;
 540  545  
 541  546      default:
      547 +
 542  548          break;
 543  549      }
 544  550  
 545  551      AcpiOsPrintf ("\n");
 546  552      return (AE_OK);
 547  553  }
 548  554  
 549  555  #endif /* ACPI_DEBUGGER  */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX