ACPICA: Debug output: Do not emit function nesting level for kernel build.
The nesting level is really only useful during a single-thread execution. Therefore, only enable this output for the AcpiExec utility. Also, only emit the thread ID when executing under AcpiExec. (Context switches are still detected and a message is emitted.) ACPICA BZ 972. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
45c9f78b25
commit
bf9b448ef8
@@ -185,6 +185,7 @@ acpi_debug_print(u32 requested_debug_level,
|
|||||||
}
|
}
|
||||||
|
|
||||||
acpi_gbl_prev_thread_id = thread_id;
|
acpi_gbl_prev_thread_id = thread_id;
|
||||||
|
acpi_gbl_nesting_level = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -193,13 +194,21 @@ acpi_debug_print(u32 requested_debug_level,
|
|||||||
*/
|
*/
|
||||||
acpi_os_printf("%9s-%04ld ", module_name, line_number);
|
acpi_os_printf("%9s-%04ld ", module_name, line_number);
|
||||||
|
|
||||||
|
#ifdef ACPI_EXEC_APP
|
||||||
|
/*
|
||||||
|
* For acpi_exec only, emit the thread ID and nesting level.
|
||||||
|
* Note: nesting level is really only useful during a single-thread
|
||||||
|
* execution. Otherwise, multiple threads will keep resetting the
|
||||||
|
* level.
|
||||||
|
*/
|
||||||
if (ACPI_LV_THREADS & acpi_dbg_level) {
|
if (ACPI_LV_THREADS & acpi_dbg_level) {
|
||||||
acpi_os_printf("[%u] ", (u32)thread_id);
|
acpi_os_printf("[%u] ", (u32)thread_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_os_printf("[%02ld] %-22.22s: ",
|
acpi_os_printf("[%02ld] ", acpi_gbl_nesting_level);
|
||||||
acpi_gbl_nesting_level,
|
#endif
|
||||||
acpi_ut_trim_function_name(function_name));
|
|
||||||
|
acpi_os_printf("%-22.22s: ", acpi_ut_trim_function_name(function_name));
|
||||||
|
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
acpi_os_vprintf(format, args);
|
acpi_os_vprintf(format, args);
|
||||||
@@ -420,7 +429,9 @@ acpi_ut_exit(u32 line_number,
|
|||||||
component_id, "%s\n", acpi_gbl_fn_exit_str);
|
component_id, "%s\n", acpi_gbl_fn_exit_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_gbl_nesting_level--;
|
if (acpi_gbl_nesting_level) {
|
||||||
|
acpi_gbl_nesting_level--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_ut_exit)
|
ACPI_EXPORT_SYMBOL(acpi_ut_exit)
|
||||||
@@ -467,7 +478,9 @@ acpi_ut_status_exit(u32 line_number,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_gbl_nesting_level--;
|
if (acpi_gbl_nesting_level) {
|
||||||
|
acpi_gbl_nesting_level--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_ut_status_exit)
|
ACPI_EXPORT_SYMBOL(acpi_ut_status_exit)
|
||||||
@@ -504,7 +517,9 @@ acpi_ut_value_exit(u32 line_number,
|
|||||||
ACPI_FORMAT_UINT64(value));
|
ACPI_FORMAT_UINT64(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_gbl_nesting_level--;
|
if (acpi_gbl_nesting_level) {
|
||||||
|
acpi_gbl_nesting_level--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_ut_value_exit)
|
ACPI_EXPORT_SYMBOL(acpi_ut_value_exit)
|
||||||
@@ -540,7 +555,9 @@ acpi_ut_ptr_exit(u32 line_number,
|
|||||||
ptr);
|
ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_gbl_nesting_level--;
|
if (acpi_gbl_nesting_level) {
|
||||||
|
acpi_gbl_nesting_level--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user