Commit 1aae3b97 authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

ACPICA: Debug object: Add current value of Timer() to debug line prefix.

Simplifies timing of things like control method execution.

[zetalog: fixing 64-bit division link error]
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 73bbca04
...@@ -75,6 +75,7 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, ...@@ -75,6 +75,7 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
u32 level, u32 index) u32 level, u32 index)
{ {
u32 i; u32 i;
u32 timer;
ACPI_FUNCTION_TRACE_PTR(ex_do_debug_object, source_desc); ACPI_FUNCTION_TRACE_PTR(ex_do_debug_object, source_desc);
...@@ -85,12 +86,20 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, ...@@ -85,12 +86,20 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
return_VOID; return_VOID;
} }
/*
* We will emit the current timer value (in microseconds) with each
* debug output. Only need the lower 26 bits. This allows for 67
* million microseconds or 67 seconds before rollover.
*/
timer = ((u32)acpi_os_get_timer() / 10); /* (100 nanoseconds to microseconds) */
timer &= 0x03FFFFFF;
/* /*
* Print line header as long as we are not in the middle of an * Print line header as long as we are not in the middle of an
* object display * object display
*/ */
if (!((level > 0) && index == 0)) { if (!((level > 0) && index == 0)) {
acpi_os_printf("[ACPI Debug] %*s", level, " "); acpi_os_printf("[ACPI Debug %.8u] %*s", timer, level, " ");
} }
/* Display the index for package output only */ /* Display the index for package output only */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment