summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/dsmethod.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-07-23 12:52:53 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-23 23:09:07 +0200
commita616dc2fe50270f1fa5050fb9cd88a08531a3f25 (patch)
tree425ee0df81280c30f004497a10a103d2e857e061 /drivers/acpi/acpica/dsmethod.c
parent0bac4295526c67e87ec24b29762140c38de7c86a (diff)
downloadop-kernel-dev-a616dc2fe50270f1fa5050fb9cd88a08531a3f25.zip
op-kernel-dev-a616dc2fe50270f1fa5050fb9cd88a08531a3f25.tar.gz
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>
Diffstat (limited to 'drivers/acpi/acpica/dsmethod.c')
-rw-r--r--drivers/acpi/acpica/dsmethod.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index e0ae8f4..0fa6f19 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -327,6 +327,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
struct acpi_walk_state *walk_state)
{
acpi_status status = AE_OK;
+ char *pathname = NULL;
ACPI_FUNCTION_TRACE_PTR(ds_begin_method_execution, method_node);
@@ -334,6 +335,18 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
return_ACPI_STATUS(AE_NULL_ENTRY);
}
+ pathname = acpi_ns_get_normalized_pathname(method_node, TRUE);
+ if (pathname) {
+ ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT,
+ "Begin method [0x%p:%s] execution.\n",
+ obj_desc->method.aml_start, pathname));
+ ACPI_FREE(pathname);
+ } else {
+ ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT,
+ "Begin method [0x%p] execution.\n",
+ obj_desc->method.aml_start));
+ }
+
/* Prevent wraparound of thread count */
if (obj_desc->method.thread_count == ACPI_UINT8_MAX) {
@@ -695,6 +708,7 @@ void
acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
struct acpi_walk_state *walk_state)
{
+ char *pathname = NULL;
ACPI_FUNCTION_TRACE_PTR(ds_terminate_control_method, walk_state);
@@ -832,5 +846,22 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
}
}
+ if (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);
+ } else {
+ ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT,
+ "End method [0x%p] execution.\n",
+ method_desc->method.aml_start));
+ }
+
return_VOID;
}
OpenPOWER on IntegriCloud