From afbb9e659d584bd5bf0604848c91afd5761ed7a1 Mon Sep 17 00:00:00 2001 From: "Valery A. Podrezov" Date: Fri, 2 Feb 2007 19:48:23 +0300 Subject: ACPICA: Enhance debugger statistics/memory command. Debugger: Enhanced the Statistics/Memory command to emit the total (maximum) memory used during execution, as well as the maximum memory consumed by each of the various object types. Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- drivers/acpi/utilities/utcache.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/acpi/utilities') diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c index 1a1f8109159c..d796fcac33af 100644 --- a/drivers/acpi/utilities/utcache.c +++ b/drivers/acpi/utilities/utcache.c @@ -289,6 +289,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) ACPI_MEM_TRACKING(cache->total_allocated++); +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + if ((cache->total_allocated - cache->total_freed) > + cache->max_occupied) { + cache->max_occupied = + cache->total_allocated - cache->total_freed; + } +#endif + /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ status = acpi_ut_release_mutex(ACPI_MTX_CACHES); -- cgit v1.2.3