Commit d41eb99b authored by Bob Moore's avatar Bob Moore Committed by Len Brown

ACPICA: Added option to display memory statistics upon termination.

Signed-off-by: default avatarAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent afbb9e65
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
*/ */
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acdebug.h>
#define _COMPONENT ACPI_UTILITIES #define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utalloc") ACPI_MODULE_NAME("utalloc")
...@@ -142,6 +143,14 @@ acpi_status acpi_ut_create_caches(void) ...@@ -142,6 +143,14 @@ acpi_status acpi_ut_create_caches(void)
acpi_status acpi_ut_delete_caches(void) acpi_status acpi_ut_delete_caches(void)
{ {
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
char buffer[7];
if (acpi_gbl_display_final_mem_stats) {
ACPI_STRCPY(buffer, "MEMORY");
acpi_db_display_statistics(buffer);
}
#endif
(void)acpi_os_delete_cache(acpi_gbl_namespace_cache); (void)acpi_os_delete_cache(acpi_gbl_namespace_cache);
acpi_gbl_namespace_cache = NULL; acpi_gbl_namespace_cache = NULL;
......
...@@ -727,6 +727,10 @@ void acpi_ut_init_globals(void) ...@@ -727,6 +727,10 @@ void acpi_ut_init_globals(void)
acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX; acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX;
#endif #endif
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
acpi_gbl_display_final_mem_stats = FALSE;
#endif
return_VOID; return_VOID;
} }
......
...@@ -200,6 +200,7 @@ ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE regis ...@@ -200,6 +200,7 @@ ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE regis
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats;
#endif #endif
/* Object caches */ /* Object caches */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment