From patchwork Mon Jun 5 08:42:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lv Zheng X-Patchwork-Id: 9765869 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99ACE60364 for ; Mon, 5 Jun 2017 08:42:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8846D27E5A for ; Mon, 5 Jun 2017 08:42:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D1A427F86; Mon, 5 Jun 2017 08:42:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 099A227F85 for ; Mon, 5 Jun 2017 08:42:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751485AbdFEImF (ORCPT ); Mon, 5 Jun 2017 04:42:05 -0400 Received: from mga01.intel.com ([192.55.52.88]:37547 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751792AbdFEImE (ORCPT ); Mon, 5 Jun 2017 04:42:04 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2017 01:42:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,300,1493708400"; d="scan'208";a="1156635545" Received: from lvzheng-moblsp3.sh.intel.com ([10.239.159.181]) by fmsmga001.fm.intel.com with ESMTP; 05 Jun 2017 01:42:02 -0700 From: Lv Zheng To: "Rafael J . Wysocki" , "Rafael J . Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , linux-acpi@vger.kernel.org, Bob Moore Subject: [PATCH 48/53] ACPICA: Improvements for debug output only Date: Mon, 5 Jun 2017 16:42:02 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore ACPICA commit c3f798b7b0e4f2403d3ce0cc1107ab0932efe1e3 Changes to debug print and debug function tracing. Link: https://github.com/acpica/acpica/commit/c3f798b7 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/dsargs.c | 5 +++-- drivers/acpi/acpica/dswexec.c | 4 ++-- drivers/acpi/acpica/exdump.c | 30 ++++++++++++++++++++---------- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c index 287b3fd..2873455 100644 --- a/drivers/acpi/acpica/dsargs.c +++ b/drivers/acpi/acpica/dsargs.c @@ -82,7 +82,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node, union acpi_parse_object *op; struct acpi_walk_state *walk_state; - ACPI_FUNCTION_TRACE(ds_execute_arguments); + ACPI_FUNCTION_TRACE_PTR(ds_execute_arguments, aml_start); /* Allocate a new parser op to be the root of the parsed tree */ @@ -338,7 +338,8 @@ acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc) return_ACPI_STATUS(AE_AML_INTERNAL); } - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Package Arg Init\n")); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Package Argument Init, AML Ptr: %p\n", + obj_desc->package.aml_start)); /* Execute the AML code for the term_arg arguments */ diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c index a2ff8ad..20d7744 100644 --- a/drivers/acpi/acpica/dswexec.c +++ b/drivers/acpi/acpica/dswexec.c @@ -576,8 +576,8 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) case AML_TYPE_CREATE_OBJECT: ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Executing CreateObject (Buffer/Package) Op=%p\n", - op)); + "Executing CreateObject (Buffer/Package) Op=%p AMLPtr=%p\n", + op, op->named.data)); switch (op->common.parent->common.aml_opcode) { case AML_NAME_OP: diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c index 970dc6c..44092f7 100644 --- a/drivers/acpi/acpica/exdump.c +++ b/drivers/acpi/acpica/exdump.c @@ -645,10 +645,12 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) /* obj_desc is a valid object */ if (depth > 0) { - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%*s[%u] %p ", - depth, " ", depth, obj_desc)); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%*s[%u] %p Refs=%u ", + depth, " ", depth, obj_desc, + obj_desc->common.reference_count)); } else { - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p ", obj_desc)); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p Refs=%u ", + obj_desc, obj_desc->common.reference_count)); } /* Decode object type */ @@ -690,8 +692,11 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) case ACPI_REFCLASS_NAME: - acpi_os_printf("- [%4.4s]\n", - obj_desc->reference.node->name.ascii); + acpi_ut_repair_name(obj_desc->reference.node->name. + ascii); + acpi_os_printf("- [%4.4s] (Node %p)\n", + obj_desc->reference.node->name.ascii, + obj_desc->reference.node); break; case ACPI_REFCLASS_ARG: @@ -999,9 +1004,15 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) status = acpi_ns_handle_to_pathname(obj_desc->reference.node, &ret_buf, TRUE); if (ACPI_FAILURE(status)) { - acpi_os_printf(" Could not convert name to pathname\n"); + acpi_os_printf + (" Could not convert name to pathname: %s\n", + acpi_format_exception(status)); } else { - acpi_os_printf("%s\n", (char *)ret_buf.pointer); + acpi_os_printf("%s: %s\n", + acpi_ut_get_type_name(obj_desc-> + reference.node-> + type), + (char *)ret_buf.pointer); ACPI_FREE(ret_buf.pointer); } } else if (obj_desc->reference.object) { @@ -1111,9 +1122,8 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, case ACPI_TYPE_LOCAL_REFERENCE: - acpi_os_printf("[Object Reference] Type [%s] %2.2X", - acpi_ut_get_reference_name(obj_desc), - obj_desc->reference.class); + acpi_os_printf("[Object Reference] Class [%s]", + acpi_ut_get_reference_name(obj_desc)); acpi_ex_dump_reference_obj(obj_desc); break;