ACPICA: Debugger: Add option to display namespace summary/counts
authorBob Moore <robert.moore@intel.com>
Tue, 25 Aug 2015 02:29:52 +0000 (10:29 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 25 Aug 2015 21:11:32 +0000 (23:11 +0200)
ACPICA commit bba222c15c2ce79076eb3a5e9d4d5f7120db8a00

If "Objects" command is invoked with no arguments, the counts
for each object type are displayed.

Linux kernel is not affected by this commit as currently debugger is
not enabled in the Linux kernel.

Link: https://github.com/acpica/acpica/commit/bba222c1
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/aclocal.h
include/acpi/actypes.h

index 95ed861e8632c969f34634aec0403a58f62d8eeb..c5971923cba4c29c8cd8274fadfd94f588122821 100644 (file)
@@ -346,8 +346,8 @@ ACPI_GLOBAL(char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]);
 /*
  * Statistic globals
  */
-ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
-ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
+ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TOTAL_TYPES]);
+ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TOTAL_TYPES]);
 ACPI_GLOBAL(u16, acpi_gbl_obj_type_count_misc);
 ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc);
 ACPI_GLOBAL(u32, acpi_gbl_num_nodes);
index acbf68baa04cbc9dba05ce479db0c8740193048d..6f708267ad8cbf0d172704772a8b62d85783c3b1 100644 (file)
@@ -1131,6 +1131,10 @@ struct acpi_integrity_info {
 #define ACPI_DB_CONSOLE_OUTPUT          0x02
 #define ACPI_DB_DUPLICATE_OUTPUT        0x03
 
+struct acpi_object_info {
+       u32 types[ACPI_TOTAL_TYPES];
+};
+
 /*****************************************************************************
  *
  * Debug
index 531eca49edd4316b2879d174724f2ffa30c15632..f914958c4adbcce6ac8af1170811e9c96a5b3f1c 100644 (file)
@@ -662,6 +662,7 @@ typedef u32 acpi_object_type;
 #define ACPI_TYPE_DEBUG_OBJECT          0x10
 
 #define ACPI_TYPE_EXTERNAL_MAX          0x10
+#define ACPI_NUM_TYPES                  (ACPI_TYPE_EXTERNAL_MAX + 1)
 
 /*
  * These are object types that do not map directly to the ACPI
@@ -683,6 +684,7 @@ typedef u32 acpi_object_type;
 #define ACPI_TYPE_LOCAL_SCOPE           0x1B   /* 1 Name, multiple object_list Nodes */
 
 #define ACPI_TYPE_NS_NODE_MAX           0x1B   /* Last typecode used within a NS Node */
+#define ACPI_TOTAL_TYPES                (ACPI_TYPE_NS_NODE_MAX + 1)
 
 /*
  * These are special object types that never appear in