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/namespace/nsalloc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/acpi/namespace') diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index 55b407aae26..1e6a1b02dfd 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c @@ -61,6 +61,9 @@ ACPI_MODULE_NAME("nsalloc") struct acpi_namespace_node *acpi_ns_create_node(u32 name) { struct acpi_namespace_node *node; +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + u32 temp; +#endif ACPI_FUNCTION_TRACE(ns_create_node); @@ -71,6 +74,15 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + temp = + acpi_gbl_ns_node_list->total_allocated - + acpi_gbl_ns_node_list->total_freed; + if (temp > acpi_gbl_ns_node_list->max_occupied) { + acpi_gbl_ns_node_list->max_occupied = temp; + } +#endif + node->name.integer = name; ACPI_SET_DESCRIPTOR_TYPE(node, ACPI_DESC_TYPE_NAMED); return_PTR(node); -- cgit v1.2.3-70-g09d2