Path: blob/main/sys/contrib/dev/acpica/components/utilities/utdebug.c
48406 views
/******************************************************************************1*2* Module Name: utdebug - Debug print/trace routines3*4*****************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY85* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY86* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A87* PARTICULAR PURPOSE.88*89* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES90* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR91* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,92* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY93* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL94* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS95* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY96* LIMITED REMEDY.97*98* 4.3. Licensee shall not export, either directly or indirectly, any of this99* software or system incorporating such software without first obtaining any100* required license or other approval from the U. S. Department of Commerce or101* any other agency or department of the United States Government. In the102* event Licensee exports any such software from the United States or103* re-exports any such software from a foreign destination, Licensee shall104* ensure that the distribution and export/re-export of the software is in105* compliance with all laws, regulations, orders, or other restrictions of the106* U.S. Export Administration Regulations. Licensee agrees that neither it nor107* any of its subsidiaries will export/re-export any technical data, process,108* software, or service, directly or indirectly, to any country for which the109* United States government or any agency thereof requires an export license,110* other governmental approval, or letter of assurance, without first obtaining111* such license, approval or letter.112*113*****************************************************************************114*115* Alternatively, you may choose to be licensed under the terms of the116* following license:117*118* Redistribution and use in source and binary forms, with or without119* modification, are permitted provided that the following conditions120* are met:121* 1. Redistributions of source code must retain the above copyright122* notice, this list of conditions, and the following disclaimer,123* without modification.124* 2. Redistributions in binary form must reproduce at minimum a disclaimer125* substantially similar to the "NO WARRANTY" disclaimer below126* ("Disclaimer") and any redistribution must be conditioned upon127* including a substantially similar Disclaimer requirement for further128* binary redistribution.129* 3. Neither the names of the above-listed copyright holders nor the names130* of any contributors may be used to endorse or promote products derived131* from this software without specific prior written permission.132*133* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS134* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT135* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR136* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT137* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,138* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT139* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,140* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY141* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT142* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE143* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.144*145* Alternatively, you may choose to be licensed under the terms of the146* GNU General Public License ("GPL") version 2 as published by the Free147* Software Foundation.148*149*****************************************************************************/150151#define EXPORT_ACPI_INTERFACES152153#include <contrib/dev/acpica/include/acpi.h>154#include <contrib/dev/acpica/include/accommon.h>155#include <contrib/dev/acpica/include/acinterp.h>156157#define _COMPONENT ACPI_UTILITIES158ACPI_MODULE_NAME ("utdebug")159160161#ifdef ACPI_DEBUG_OUTPUT162163static ACPI_THREAD_ID AcpiGbl_PreviousThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;164static const char *AcpiGbl_FunctionEntryPrefix = "----Entry";165static const char *AcpiGbl_FunctionExitPrefix = "----Exit-";166167168/*******************************************************************************169*170* FUNCTION: AcpiUtInitStackPtrTrace171*172* PARAMETERS: None173*174* RETURN: None175*176* DESCRIPTION: Save the current CPU stack pointer at subsystem startup177*178******************************************************************************/179180void181AcpiUtInitStackPtrTrace (182void)183{184ACPI_SIZE CurrentSp;185186187#pragma GCC diagnostic push188#if defined(__GNUC__) && __GNUC__ >= 12189#pragma GCC diagnostic ignored "-Wdangling-pointer="190#endif191AcpiGbl_EntryStackPointer = &CurrentSp;192#pragma GCC diagnostic pop193}194195196/*******************************************************************************197*198* FUNCTION: AcpiUtTrackStackPtr199*200* PARAMETERS: None201*202* RETURN: None203*204* DESCRIPTION: Save the current CPU stack pointer205*206******************************************************************************/207208void209AcpiUtTrackStackPtr (210void)211{212ACPI_SIZE CurrentSp;213214215if (&CurrentSp < AcpiGbl_LowestStackPointer)216{217#pragma GCC diagnostic push218#if defined(__GNUC__) && __GNUC__ >= 12219#pragma GCC diagnostic ignored "-Wdangling-pointer="220#endif221AcpiGbl_LowestStackPointer = &CurrentSp;222#pragma GCC diagnostic pop223}224225if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting)226{227AcpiGbl_DeepestNesting = AcpiGbl_NestingLevel;228}229}230231232/*******************************************************************************233*234* FUNCTION: AcpiUtTrimFunctionName235*236* PARAMETERS: FunctionName - Ascii string containing a procedure name237*238* RETURN: Updated pointer to the function name239*240* DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.241* This allows compiler macros such as __FUNCTION__ to be used242* with no change to the debug output.243*244******************************************************************************/245246static const char *247AcpiUtTrimFunctionName (248const char *FunctionName)249{250251/* All Function names are longer than 4 chars, check is safe */252253if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_MIXED)254{255/* This is the case where the original source has not been modified */256257return (FunctionName + 4);258}259260if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_LOWER)261{262/* This is the case where the source has been 'linuxized' */263264return (FunctionName + 5);265}266267return (FunctionName);268}269270271/*******************************************************************************272*273* FUNCTION: AcpiDebugPrint274*275* PARAMETERS: RequestedDebugLevel - Requested debug print level276* LineNumber - Caller's line number (for error output)277* FunctionName - Caller's procedure name278* ModuleName - Caller's module name279* ComponentId - Caller's component ID280* Format - Printf format field281* ... - Optional printf arguments282*283* RETURN: None284*285* DESCRIPTION: Print error message with prefix consisting of the module name,286* line number, and component ID.287*288******************************************************************************/289290void ACPI_INTERNAL_VAR_XFACE291AcpiDebugPrint (292UINT32 RequestedDebugLevel,293UINT32 LineNumber,294const char *FunctionName,295const char *ModuleName,296UINT32 ComponentId,297const char *Format,298...)299{300ACPI_THREAD_ID ThreadId;301va_list args;302#ifdef ACPI_APPLICATION303int FillCount;304#endif305306/* Check if debug output enabled */307308if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId))309{310return;311}312313/*314* Thread tracking and context switch notification315*/316ThreadId = AcpiOsGetThreadId ();317if (ThreadId != AcpiGbl_PreviousThreadId)318{319if (ACPI_LV_THREADS & AcpiDbgLevel)320{321AcpiOsPrintf (322"\n**** Context Switch from TID %u to TID %u ****\n\n",323(UINT32) AcpiGbl_PreviousThreadId, (UINT32) ThreadId);324}325326AcpiGbl_PreviousThreadId = ThreadId;327AcpiGbl_NestingLevel = 0;328}329330/*331* Display the module name, current line number, thread ID (if requested),332* current procedure nesting level, and the current procedure name333*/334AcpiOsPrintf ("%9s-%04d ", ModuleName, LineNumber);335336#ifdef ACPI_APPLICATION337/*338* For AcpiExec/iASL only, emit the thread ID and nesting level.339* Note: nesting level is really only useful during a single-thread340* execution. Otherwise, multiple threads will keep resetting the341* level.342*/343if (ACPI_LV_THREADS & AcpiDbgLevel)344{345AcpiOsPrintf ("[%u] ", (UINT32) ThreadId);346}347348FillCount = 48 - AcpiGbl_NestingLevel -349strlen (AcpiUtTrimFunctionName (FunctionName));350if (FillCount < 0)351{352FillCount = 0;353}354355AcpiOsPrintf ("[%02d] %*s",356AcpiGbl_NestingLevel, AcpiGbl_NestingLevel + 1, " ");357AcpiOsPrintf ("%s%*s: ",358AcpiUtTrimFunctionName (FunctionName), FillCount, " ");359360#else361AcpiOsPrintf ("%-22.22s: ", AcpiUtTrimFunctionName (FunctionName));362#endif363364va_start (args, Format);365AcpiOsVprintf (Format, args);366va_end (args);367}368369ACPI_EXPORT_SYMBOL (AcpiDebugPrint)370371372/*******************************************************************************373*374* FUNCTION: AcpiDebugPrintRaw375*376* PARAMETERS: RequestedDebugLevel - Requested debug print level377* LineNumber - Caller's line number378* FunctionName - Caller's procedure name379* ModuleName - Caller's module name380* ComponentId - Caller's component ID381* Format - Printf format field382* ... - Optional printf arguments383*384* RETURN: None385*386* DESCRIPTION: Print message with no headers. Has same interface as387* DebugPrint so that the same macros can be used.388*389******************************************************************************/390391void ACPI_INTERNAL_VAR_XFACE392AcpiDebugPrintRaw (393UINT32 RequestedDebugLevel,394UINT32 LineNumber,395const char *FunctionName,396const char *ModuleName,397UINT32 ComponentId,398const char *Format,399...)400{401va_list args;402403404/* Check if debug output enabled */405406if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId))407{408return;409}410411va_start (args, Format);412AcpiOsVprintf (Format, args);413va_end (args);414}415416ACPI_EXPORT_SYMBOL (AcpiDebugPrintRaw)417418419/*******************************************************************************420*421* FUNCTION: AcpiUtTrace422*423* PARAMETERS: LineNumber - Caller's line number424* FunctionName - Caller's procedure name425* ModuleName - Caller's module name426* ComponentId - Caller's component ID427*428* RETURN: None429*430* DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is431* set in DebugLevel432*433******************************************************************************/434435void436AcpiUtTrace (437UINT32 LineNumber,438const char *FunctionName,439const char *ModuleName,440UINT32 ComponentId)441{442443AcpiGbl_NestingLevel++;444AcpiUtTrackStackPtr ();445446/* Check if enabled up-front for performance */447448if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))449{450AcpiDebugPrint (ACPI_LV_FUNCTIONS,451LineNumber, FunctionName, ModuleName, ComponentId,452"%s\n", AcpiGbl_FunctionEntryPrefix);453}454}455456ACPI_EXPORT_SYMBOL (AcpiUtTrace)457458459/*******************************************************************************460*461* FUNCTION: AcpiUtTracePtr462*463* PARAMETERS: LineNumber - Caller's line number464* FunctionName - Caller's procedure name465* ModuleName - Caller's module name466* ComponentId - Caller's component ID467* Pointer - Pointer to display468*469* RETURN: None470*471* DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is472* set in DebugLevel473*474******************************************************************************/475476void477AcpiUtTracePtr (478UINT32 LineNumber,479const char *FunctionName,480const char *ModuleName,481UINT32 ComponentId,482const void *Pointer)483{484485AcpiGbl_NestingLevel++;486AcpiUtTrackStackPtr ();487488/* Check if enabled up-front for performance */489490if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))491{492AcpiDebugPrint (ACPI_LV_FUNCTIONS,493LineNumber, FunctionName, ModuleName, ComponentId,494"%s %p\n", AcpiGbl_FunctionEntryPrefix, Pointer);495}496}497498499/*******************************************************************************500*501* FUNCTION: AcpiUtTraceStr502*503* PARAMETERS: LineNumber - Caller's line number504* FunctionName - Caller's procedure name505* ModuleName - Caller's module name506* ComponentId - Caller's component ID507* String - Additional string to display508*509* RETURN: None510*511* DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is512* set in DebugLevel513*514******************************************************************************/515516void517AcpiUtTraceStr (518UINT32 LineNumber,519const char *FunctionName,520const char *ModuleName,521UINT32 ComponentId,522const char *String)523{524525AcpiGbl_NestingLevel++;526AcpiUtTrackStackPtr ();527528/* Check if enabled up-front for performance */529530if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))531{532AcpiDebugPrint (ACPI_LV_FUNCTIONS,533LineNumber, FunctionName, ModuleName, ComponentId,534"%s %s\n", AcpiGbl_FunctionEntryPrefix, String);535}536}537538539/*******************************************************************************540*541* FUNCTION: AcpiUtTraceU32542*543* PARAMETERS: LineNumber - Caller's line number544* FunctionName - Caller's procedure name545* ModuleName - Caller's module name546* ComponentId - Caller's component ID547* Integer - Integer to display548*549* RETURN: None550*551* DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is552* set in DebugLevel553*554******************************************************************************/555556void557AcpiUtTraceU32 (558UINT32 LineNumber,559const char *FunctionName,560const char *ModuleName,561UINT32 ComponentId,562UINT32 Integer)563{564565AcpiGbl_NestingLevel++;566AcpiUtTrackStackPtr ();567568/* Check if enabled up-front for performance */569570if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))571{572AcpiDebugPrint (ACPI_LV_FUNCTIONS,573LineNumber, FunctionName, ModuleName, ComponentId,574"%s %08X\n", AcpiGbl_FunctionEntryPrefix, Integer);575}576}577578579/*******************************************************************************580*581* FUNCTION: AcpiUtExit582*583* PARAMETERS: LineNumber - Caller's line number584* FunctionName - Caller's procedure name585* ModuleName - Caller's module name586* ComponentId - Caller's component ID587*588* RETURN: None589*590* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is591* set in DebugLevel592*593******************************************************************************/594595void596AcpiUtExit (597UINT32 LineNumber,598const char *FunctionName,599const char *ModuleName,600UINT32 ComponentId)601{602603/* Check if enabled up-front for performance */604605if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))606{607AcpiDebugPrint (ACPI_LV_FUNCTIONS,608LineNumber, FunctionName, ModuleName, ComponentId,609"%s\n", AcpiGbl_FunctionExitPrefix);610}611612if (AcpiGbl_NestingLevel)613{614AcpiGbl_NestingLevel--;615}616}617618ACPI_EXPORT_SYMBOL (AcpiUtExit)619620621/*******************************************************************************622*623* FUNCTION: AcpiUtStatusExit624*625* PARAMETERS: LineNumber - Caller's line number626* FunctionName - Caller's procedure name627* ModuleName - Caller's module name628* ComponentId - Caller's component ID629* Status - Exit status code630*631* RETURN: None632*633* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is634* set in DebugLevel. Prints exit status also.635*636******************************************************************************/637638void639AcpiUtStatusExit (640UINT32 LineNumber,641const char *FunctionName,642const char *ModuleName,643UINT32 ComponentId,644ACPI_STATUS Status)645{646647/* Check if enabled up-front for performance */648649if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))650{651if (ACPI_SUCCESS (Status))652{653AcpiDebugPrint (ACPI_LV_FUNCTIONS,654LineNumber, FunctionName, ModuleName, ComponentId,655"%s %s\n", AcpiGbl_FunctionExitPrefix,656AcpiFormatException (Status));657}658else659{660AcpiDebugPrint (ACPI_LV_FUNCTIONS,661LineNumber, FunctionName, ModuleName, ComponentId,662"%s ****Exception****: %s\n", AcpiGbl_FunctionExitPrefix,663AcpiFormatException (Status));664}665}666667if (AcpiGbl_NestingLevel)668{669AcpiGbl_NestingLevel--;670}671}672673ACPI_EXPORT_SYMBOL (AcpiUtStatusExit)674675676/*******************************************************************************677*678* FUNCTION: AcpiUtValueExit679*680* PARAMETERS: LineNumber - Caller's line number681* FunctionName - Caller's procedure name682* ModuleName - Caller's module name683* ComponentId - Caller's component ID684* Value - Value to be printed with exit msg685*686* RETURN: None687*688* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is689* set in DebugLevel. Prints exit value also.690*691******************************************************************************/692693void694AcpiUtValueExit (695UINT32 LineNumber,696const char *FunctionName,697const char *ModuleName,698UINT32 ComponentId,699UINT64 Value)700{701702/* Check if enabled up-front for performance */703704if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))705{706AcpiDebugPrint (ACPI_LV_FUNCTIONS,707LineNumber, FunctionName, ModuleName, ComponentId,708"%s %8.8X%8.8X\n", AcpiGbl_FunctionExitPrefix,709ACPI_FORMAT_UINT64 (Value));710}711712if (AcpiGbl_NestingLevel)713{714AcpiGbl_NestingLevel--;715}716}717718ACPI_EXPORT_SYMBOL (AcpiUtValueExit)719720721/*******************************************************************************722*723* FUNCTION: AcpiUtPtrExit724*725* PARAMETERS: LineNumber - Caller's line number726* FunctionName - Caller's procedure name727* ModuleName - Caller's module name728* ComponentId - Caller's component ID729* Ptr - Pointer to display730*731* RETURN: None732*733* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is734* set in DebugLevel. Prints exit value also.735*736******************************************************************************/737738void739AcpiUtPtrExit (740UINT32 LineNumber,741const char *FunctionName,742const char *ModuleName,743UINT32 ComponentId,744UINT8 *Ptr)745{746747/* Check if enabled up-front for performance */748749if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))750{751AcpiDebugPrint (ACPI_LV_FUNCTIONS,752LineNumber, FunctionName, ModuleName, ComponentId,753"%s %p\n", AcpiGbl_FunctionExitPrefix, Ptr);754}755756if (AcpiGbl_NestingLevel)757{758AcpiGbl_NestingLevel--;759}760}761762763/*******************************************************************************764*765* FUNCTION: AcpiUtStrExit766*767* PARAMETERS: LineNumber - Caller's line number768* FunctionName - Caller's procedure name769* ModuleName - Caller's module name770* ComponentId - Caller's component ID771* String - String to display772*773* RETURN: None774*775* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is776* set in DebugLevel. Prints exit value also.777*778******************************************************************************/779780void781AcpiUtStrExit (782UINT32 LineNumber,783const char *FunctionName,784const char *ModuleName,785UINT32 ComponentId,786const char *String)787{788789/* Check if enabled up-front for performance */790791if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))792{793AcpiDebugPrint (ACPI_LV_FUNCTIONS,794LineNumber, FunctionName, ModuleName, ComponentId,795"%s %s\n", AcpiGbl_FunctionExitPrefix, String);796}797798if (AcpiGbl_NestingLevel)799{800AcpiGbl_NestingLevel--;801}802}803804805/*******************************************************************************806*807* FUNCTION: AcpiTracePoint808*809* PARAMETERS: Type - Trace event type810* Begin - TRUE if before execution811* Aml - Executed AML address812* Pathname - Object path813* Pointer - Pointer to the related object814*815* RETURN: None816*817* DESCRIPTION: Interpreter execution trace.818*819******************************************************************************/820821void822AcpiTracePoint (823ACPI_TRACE_EVENT_TYPE Type,824BOOLEAN Begin,825UINT8 *Aml,826char *Pathname)827{828829ACPI_FUNCTION_ENTRY ();830831AcpiExTracePoint (Type, Begin, Aml, Pathname);832833#ifdef ACPI_USE_SYSTEM_TRACER834AcpiOsTracePoint (Type, Begin, Aml, Pathname);835#endif836}837838ACPI_EXPORT_SYMBOL (AcpiTracePoint)839840841#endif842843844