Source
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/******************************************************************************
*
* Module Name: extrace - Support for interpreter execution tracing
*
* Copyright (C) 2000 - 2019, Intel Corp.
*
*****************************************************************************/
ACPI_MODULE_NAME("extrace")
static union acpi_operand_object *acpi_gbl_trace_method_object = NULL;
/* Local prototypes */
static const char *acpi_ex_get_trace_event_name(acpi_trace_event_type type);
/*******************************************************************************
*
* FUNCTION: acpi_ex_interpreter_trace_enabled
*
* PARAMETERS: name - Whether method name should be matched,
* this should be checked before starting
* the tracer
*
* RETURN: TRUE if interpreter trace is enabled.
*
* DESCRIPTION: Check whether interpreter trace is enabled
*
******************************************************************************/
static u8 acpi_ex_interpreter_trace_enabled(char *name)
{
/* Check if tracing is enabled */
if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED)) {
return (FALSE);
}
/*
* Check if tracing is filtered:
*
* 1. If the tracer is started, acpi_gbl_trace_method_object should have
* been filled by the trace starter
* 2. If the tracer is not started, acpi_gbl_trace_method_name should be
* matched if it is specified
* 3. If the tracer is oneshot style, acpi_gbl_trace_method_name should
* not be cleared by the trace stopper during the first match
*/
if (acpi_gbl_trace_method_object) {
return (TRUE);
}
if (name &&