ACPICA: Dispatcher: Add trace support for interpreter

ACPICA commit 71299ec8b49054daace0df50268e8e055654ca37

This patch adds trace point at the following point:
 1. Begin/end of a control method execution;
 2. Begin/end of an opcode execution.

The trace point feature can be enabled by defining ACPI_DEBUG_OUTPUT
and specifying a debug level that includes ACPI_LV_TRACDE_POINT and the
debug layers that include ACPI_PARSER and ACPI_DISPACTCHER.

In order to make aml_op_name of union acpi_parse_object usable for tracer, it is
enabled for ACPI_DEBUG_OUTPUT in this patch. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/71299ec8
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
diff --git a/drivers/acpi/acpica/dsdebug.c b/drivers/acpi/acpica/dsdebug.c
index 21c6cef..7df9b50e 100644
--- a/drivers/acpi/acpica/dsdebug.c
+++ b/drivers/acpi/acpica/dsdebug.c
@@ -127,6 +127,8 @@
 	struct acpi_thread_state *thread;
 	struct acpi_walk_state *next_walk_state;
 	struct acpi_namespace_node *previous_method = NULL;
+	union acpi_operand_object *method_desc;
+	char *pathname = NULL;
 
 	ACPI_FUNCTION_TRACE(ds_dump_method_stack);
 
@@ -170,6 +172,28 @@
 	/* Walk list of linked walk states */
 
 	while (next_walk_state) {
+		method_desc = next_walk_state->method_desc;
+		if (method_desc && method_desc->method.node) {
+			pathname = acpi_ns_get_normalized_pathname((struct
+								    acpi_namespace_node
+								    *)
+								   method_desc->
+								   method.node,
+								   TRUE);
+		}
+		if (pathname) {
+			ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT,
+					  "End method [0x%p:%s] execution.\n",
+					  method_desc->method.aml_start,
+					  pathname));
+			ACPI_FREE(pathname);
+			pathname = NULL;
+		} else {
+			ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT,
+					  "End method [0x%p] execution.\n",
+					  method_desc->method.aml_start));
+		}
+
 		ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
 				  "    Method [%4.4s] executing: ",
 				  acpi_ut_get_node_name(next_walk_state->