1 /****************************************************************************** 2 * 3 * Module Name: utdebug - Debug print/trace routines 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2016, Intel Corp. 12 * All rights reserved. 13 * 14 * 2. License 15 * 16 * 2.1. This is your license from Intel Corp. under its intellectual property 17 * rights. You may have additional license terms from the party that provided 18 * you this software, covering your right to use that party's intellectual 19 * property rights. 20 * 21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22 * copy of the source code appearing in this file ("Covered Code") an 23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24 * base code distributed originally by Intel ("Original Intel Code") to copy, 25 * make derivatives, distribute, use and display any portion of the Covered 26 * Code in any form, with the right to sublicense such rights; and 27 * 28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29 * license (with the right to sublicense), under only those claims of Intel 30 * patents that are infringed by the Original Intel Code, to make, use, sell, 31 * offer to sell, and import the Covered Code and derivative works thereof 32 * solely to the minimum extent necessary to exercise the above copyright 33 * license, and in no event shall the patent license extend to any additions 34 * to or modifications of the Original Intel Code. No other license or right 35 * is granted directly or by implication, estoppel or otherwise; 36 * 37 * The above copyright and patent license is granted only if the following 38 * conditions are met: 39 * 40 * 3. Conditions 41 * 42 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43 * Redistribution of source code of any substantial portion of the Covered 44 * Code or modification with rights to further distribute source must include 45 * the above Copyright Notice, the above License, this list of Conditions, 46 * and the following Disclaimer and Export Compliance provision. In addition, 47 * Licensee must cause all Covered Code to which Licensee contributes to 48 * contain a file documenting the changes Licensee made to create that Covered 49 * Code and the date of any change. Licensee must include in that file the 50 * documentation of any changes made by any predecessor Licensee. Licensee 51 * must include a prominent statement that the modification is derived, 52 * directly or indirectly, from Original Intel Code. 53 * 54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55 * Redistribution of source code of any substantial portion of the Covered 56 * Code or modification without rights to further distribute source must 57 * include the following Disclaimer and Export Compliance provision in the 58 * documentation and/or other materials provided with distribution. In 59 * addition, Licensee may not authorize further sublicense of source of any 60 * portion of the Covered Code, and must include terms to the effect that the 61 * license from Licensee to its licensee is limited to the intellectual 62 * property embodied in the software Licensee provides to its licensee, and 63 * not to intellectual property embodied in modifications its licensee may 64 * make. 65 * 66 * 3.3. Redistribution of Executable. Redistribution in executable form of any 67 * substantial portion of the Covered Code or modification must reproduce the 68 * above Copyright Notice, and the following Disclaimer and Export Compliance 69 * provision in the documentation and/or other materials provided with the 70 * distribution. 71 * 72 * 3.4. Intel retains all right, title, and interest in and to the Original 73 * Intel Code. 74 * 75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76 * Intel shall be used in advertising or otherwise to promote the sale, use or 77 * other dealings in products derived from or relating to the Covered Code 78 * without prior written authorization from Intel. 79 * 80 * 4. Disclaimer and Export Compliance 81 * 82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88 * PARTICULAR PURPOSE. 89 * 90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97 * LIMITED REMEDY. 98 * 99 * 4.3. Licensee shall not export, either directly or indirectly, any of this 100 * software or system incorporating such software without first obtaining any 101 * required license or other approval from the U. S. Department of Commerce or 102 * any other agency or department of the United States Government. In the 103 * event Licensee exports any such software from the United States or 104 * re-exports any such software from a foreign destination, Licensee shall 105 * ensure that the distribution and export/re-export of the software is in 106 * compliance with all laws, regulations, orders, or other restrictions of the 107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108 * any of its subsidiaries will export/re-export any technical data, process, 109 * software, or service, directly or indirectly, to any country for which the 110 * United States government or any agency thereof requires an export license, 111 * other governmental approval, or letter of assurance, without first obtaining 112 * such license, approval or letter. 113 * 114 *****************************************************************************/ 115 116 #define EXPORT_ACPI_INTERFACES 117 118 #include "acpi.h" 119 #include "accommon.h" 120 #include "acinterp.h" 121 122 #define _COMPONENT ACPI_UTILITIES 123 ACPI_MODULE_NAME ("utdebug") 124 125 126 #ifdef ACPI_DEBUG_OUTPUT 127 128 static ACPI_THREAD_ID AcpiGbl_PreviousThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF; 129 static const char *AcpiGbl_FunctionEntryPrefix = "----Entry"; 130 static const char *AcpiGbl_FunctionExitPrefix = "----Exit-"; 131 132 133 /******************************************************************************* 134 * 135 * FUNCTION: AcpiUtInitStackPtrTrace 136 * 137 * PARAMETERS: None 138 * 139 * RETURN: None 140 * 141 * DESCRIPTION: Save the current CPU stack pointer at subsystem startup 142 * 143 ******************************************************************************/ 144 145 void 146 AcpiUtInitStackPtrTrace ( 147 void) 148 { 149 ACPI_SIZE CurrentSp; 150 151 152 AcpiGbl_EntryStackPointer = &CurrentSp; 153 } 154 155 156 /******************************************************************************* 157 * 158 * FUNCTION: AcpiUtTrackStackPtr 159 * 160 * PARAMETERS: None 161 * 162 * RETURN: None 163 * 164 * DESCRIPTION: Save the current CPU stack pointer 165 * 166 ******************************************************************************/ 167 168 void 169 AcpiUtTrackStackPtr ( 170 void) 171 { 172 ACPI_SIZE CurrentSp; 173 174 175 if (&CurrentSp < AcpiGbl_LowestStackPointer) 176 { 177 AcpiGbl_LowestStackPointer = &CurrentSp; 178 } 179 180 if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting) 181 { 182 AcpiGbl_DeepestNesting = AcpiGbl_NestingLevel; 183 } 184 } 185 186 187 /******************************************************************************* 188 * 189 * FUNCTION: AcpiUtTrimFunctionName 190 * 191 * PARAMETERS: FunctionName - Ascii string containing a procedure name 192 * 193 * RETURN: Updated pointer to the function name 194 * 195 * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. 196 * This allows compiler macros such as __FUNCTION__ to be used 197 * with no change to the debug output. 198 * 199 ******************************************************************************/ 200 201 static const char * 202 AcpiUtTrimFunctionName ( 203 const char *FunctionName) 204 { 205 206 /* All Function names are longer than 4 chars, check is safe */ 207 208 if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_MIXED) 209 { 210 /* This is the case where the original source has not been modified */ 211 212 return (FunctionName + 4); 213 } 214 215 if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_LOWER) 216 { 217 /* This is the case where the source has been 'linuxized' */ 218 219 return (FunctionName + 5); 220 } 221 222 return (FunctionName); 223 } 224 225 226 /******************************************************************************* 227 * 228 * FUNCTION: AcpiDebugPrint 229 * 230 * PARAMETERS: RequestedDebugLevel - Requested debug print level 231 * LineNumber - Caller's line number (for error output) 232 * FunctionName - Caller's procedure name 233 * ModuleName - Caller's module name 234 * ComponentId - Caller's component ID 235 * Format - Printf format field 236 * ... - Optional printf arguments 237 * 238 * RETURN: None 239 * 240 * DESCRIPTION: Print error message with prefix consisting of the module name, 241 * line number, and component ID. 242 * 243 ******************************************************************************/ 244 245 void ACPI_INTERNAL_VAR_XFACE 246 AcpiDebugPrint ( 247 UINT32 RequestedDebugLevel, 248 UINT32 LineNumber, 249 const char *FunctionName, 250 const char *ModuleName, 251 UINT32 ComponentId, 252 const char *Format, 253 ...) 254 { 255 ACPI_THREAD_ID ThreadId; 256 va_list args; 257 258 259 /* Check if debug output enabled */ 260 261 if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId)) 262 { 263 return; 264 } 265 266 /* 267 * Thread tracking and context switch notification 268 */ 269 ThreadId = AcpiOsGetThreadId (); 270 if (ThreadId != AcpiGbl_PreviousThreadId) 271 { 272 if (ACPI_LV_THREADS & AcpiDbgLevel) 273 { 274 AcpiOsPrintf ( 275 "\n**** Context Switch from TID %u to TID %u ****\n\n", 276 (UINT32) AcpiGbl_PreviousThreadId, (UINT32) ThreadId); 277 } 278 279 AcpiGbl_PreviousThreadId = ThreadId; 280 AcpiGbl_NestingLevel = 0; 281 } 282 283 /* 284 * Display the module name, current line number, thread ID (if requested), 285 * current procedure nesting level, and the current procedure name 286 */ 287 AcpiOsPrintf ("%9s-%04ld ", ModuleName, LineNumber); 288 289 #ifdef ACPI_APPLICATION 290 /* 291 * For AcpiExec/iASL only, emit the thread ID and nesting level. 292 * Note: nesting level is really only useful during a single-thread 293 * execution. Otherwise, multiple threads will keep resetting the 294 * level. 295 */ 296 if (ACPI_LV_THREADS & AcpiDbgLevel) 297 { 298 AcpiOsPrintf ("[%u] ", (UINT32) ThreadId); 299 } 300 301 AcpiOsPrintf ("[%02ld] ", AcpiGbl_NestingLevel); 302 #endif 303 304 AcpiOsPrintf ("%-22.22s: ", AcpiUtTrimFunctionName (FunctionName)); 305 306 va_start (args, Format); 307 AcpiOsVprintf (Format, args); 308 va_end (args); 309 } 310 311 ACPI_EXPORT_SYMBOL (AcpiDebugPrint) 312 313 314 /******************************************************************************* 315 * 316 * FUNCTION: AcpiDebugPrintRaw 317 * 318 * PARAMETERS: RequestedDebugLevel - Requested debug print level 319 * LineNumber - Caller's line number 320 * FunctionName - Caller's procedure name 321 * ModuleName - Caller's module name 322 * ComponentId - Caller's component ID 323 * Format - Printf format field 324 * ... - Optional printf arguments 325 * 326 * RETURN: None 327 * 328 * DESCRIPTION: Print message with no headers. Has same interface as 329 * DebugPrint so that the same macros can be used. 330 * 331 ******************************************************************************/ 332 333 void ACPI_INTERNAL_VAR_XFACE 334 AcpiDebugPrintRaw ( 335 UINT32 RequestedDebugLevel, 336 UINT32 LineNumber, 337 const char *FunctionName, 338 const char *ModuleName, 339 UINT32 ComponentId, 340 const char *Format, 341 ...) 342 { 343 va_list args; 344 345 346 /* Check if debug output enabled */ 347 348 if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId)) 349 { 350 return; 351 } 352 353 va_start (args, Format); 354 AcpiOsVprintf (Format, args); 355 va_end (args); 356 } 357 358 ACPI_EXPORT_SYMBOL (AcpiDebugPrintRaw) 359 360 361 /******************************************************************************* 362 * 363 * FUNCTION: AcpiUtTrace 364 * 365 * PARAMETERS: LineNumber - Caller's line number 366 * FunctionName - Caller's procedure name 367 * ModuleName - Caller's module name 368 * ComponentId - Caller's component ID 369 * 370 * RETURN: None 371 * 372 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 373 * set in DebugLevel 374 * 375 ******************************************************************************/ 376 377 void 378 AcpiUtTrace ( 379 UINT32 LineNumber, 380 const char *FunctionName, 381 const char *ModuleName, 382 UINT32 ComponentId) 383 { 384 385 AcpiGbl_NestingLevel++; 386 AcpiUtTrackStackPtr (); 387 388 /* Check if enabled up-front for performance */ 389 390 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 391 { 392 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 393 LineNumber, FunctionName, ModuleName, ComponentId, 394 "%s\n", AcpiGbl_FunctionEntryPrefix); 395 } 396 } 397 398 ACPI_EXPORT_SYMBOL (AcpiUtTrace) 399 400 401 /******************************************************************************* 402 * 403 * FUNCTION: AcpiUtTracePtr 404 * 405 * PARAMETERS: LineNumber - Caller's line number 406 * FunctionName - Caller's procedure name 407 * ModuleName - Caller's module name 408 * ComponentId - Caller's component ID 409 * Pointer - Pointer to display 410 * 411 * RETURN: None 412 * 413 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 414 * set in DebugLevel 415 * 416 ******************************************************************************/ 417 418 void 419 AcpiUtTracePtr ( 420 UINT32 LineNumber, 421 const char *FunctionName, 422 const char *ModuleName, 423 UINT32 ComponentId, 424 const void *Pointer) 425 { 426 427 AcpiGbl_NestingLevel++; 428 AcpiUtTrackStackPtr (); 429 430 /* Check if enabled up-front for performance */ 431 432 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 433 { 434 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 435 LineNumber, FunctionName, ModuleName, ComponentId, 436 "%s %p\n", AcpiGbl_FunctionEntryPrefix, Pointer); 437 } 438 } 439 440 441 /******************************************************************************* 442 * 443 * FUNCTION: AcpiUtTraceStr 444 * 445 * PARAMETERS: LineNumber - Caller's line number 446 * FunctionName - Caller's procedure name 447 * ModuleName - Caller's module name 448 * ComponentId - Caller's component ID 449 * String - Additional string to display 450 * 451 * RETURN: None 452 * 453 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 454 * set in DebugLevel 455 * 456 ******************************************************************************/ 457 458 void 459 AcpiUtTraceStr ( 460 UINT32 LineNumber, 461 const char *FunctionName, 462 const char *ModuleName, 463 UINT32 ComponentId, 464 const char *String) 465 { 466 467 AcpiGbl_NestingLevel++; 468 AcpiUtTrackStackPtr (); 469 470 /* Check if enabled up-front for performance */ 471 472 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 473 { 474 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 475 LineNumber, FunctionName, ModuleName, ComponentId, 476 "%s %s\n", AcpiGbl_FunctionEntryPrefix, String); 477 } 478 } 479 480 481 /******************************************************************************* 482 * 483 * FUNCTION: AcpiUtTraceU32 484 * 485 * PARAMETERS: LineNumber - Caller's line number 486 * FunctionName - Caller's procedure name 487 * ModuleName - Caller's module name 488 * ComponentId - Caller's component ID 489 * Integer - Integer to display 490 * 491 * RETURN: None 492 * 493 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 494 * set in DebugLevel 495 * 496 ******************************************************************************/ 497 498 void 499 AcpiUtTraceU32 ( 500 UINT32 LineNumber, 501 const char *FunctionName, 502 const char *ModuleName, 503 UINT32 ComponentId, 504 UINT32 Integer) 505 { 506 507 AcpiGbl_NestingLevel++; 508 AcpiUtTrackStackPtr (); 509 510 /* Check if enabled up-front for performance */ 511 512 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 513 { 514 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 515 LineNumber, FunctionName, ModuleName, ComponentId, 516 "%s %08X\n", AcpiGbl_FunctionEntryPrefix, Integer); 517 } 518 } 519 520 521 /******************************************************************************* 522 * 523 * FUNCTION: AcpiUtExit 524 * 525 * PARAMETERS: LineNumber - Caller's line number 526 * FunctionName - Caller's procedure name 527 * ModuleName - Caller's module name 528 * ComponentId - Caller's component ID 529 * 530 * RETURN: None 531 * 532 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 533 * set in DebugLevel 534 * 535 ******************************************************************************/ 536 537 void 538 AcpiUtExit ( 539 UINT32 LineNumber, 540 const char *FunctionName, 541 const char *ModuleName, 542 UINT32 ComponentId) 543 { 544 545 /* Check if enabled up-front for performance */ 546 547 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 548 { 549 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 550 LineNumber, FunctionName, ModuleName, ComponentId, 551 "%s\n", AcpiGbl_FunctionExitPrefix); 552 } 553 554 if (AcpiGbl_NestingLevel) 555 { 556 AcpiGbl_NestingLevel--; 557 } 558 } 559 560 ACPI_EXPORT_SYMBOL (AcpiUtExit) 561 562 563 /******************************************************************************* 564 * 565 * FUNCTION: AcpiUtStatusExit 566 * 567 * PARAMETERS: LineNumber - Caller's line number 568 * FunctionName - Caller's procedure name 569 * ModuleName - Caller's module name 570 * ComponentId - Caller's component ID 571 * Status - Exit status code 572 * 573 * RETURN: None 574 * 575 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 576 * set in DebugLevel. Prints exit status also. 577 * 578 ******************************************************************************/ 579 580 void 581 AcpiUtStatusExit ( 582 UINT32 LineNumber, 583 const char *FunctionName, 584 const char *ModuleName, 585 UINT32 ComponentId, 586 ACPI_STATUS Status) 587 { 588 589 /* Check if enabled up-front for performance */ 590 591 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 592 { 593 if (ACPI_SUCCESS (Status)) 594 { 595 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 596 LineNumber, FunctionName, ModuleName, ComponentId, 597 "%s %s\n", AcpiGbl_FunctionExitPrefix, 598 AcpiFormatException (Status)); 599 } 600 else 601 { 602 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 603 LineNumber, FunctionName, ModuleName, ComponentId, 604 "%s ****Exception****: %s\n", AcpiGbl_FunctionExitPrefix, 605 AcpiFormatException (Status)); 606 } 607 } 608 609 if (AcpiGbl_NestingLevel) 610 { 611 AcpiGbl_NestingLevel--; 612 } 613 } 614 615 ACPI_EXPORT_SYMBOL (AcpiUtStatusExit) 616 617 618 /******************************************************************************* 619 * 620 * FUNCTION: AcpiUtValueExit 621 * 622 * PARAMETERS: LineNumber - Caller's line number 623 * FunctionName - Caller's procedure name 624 * ModuleName - Caller's module name 625 * ComponentId - Caller's component ID 626 * Value - Value to be printed with exit msg 627 * 628 * RETURN: None 629 * 630 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 631 * set in DebugLevel. Prints exit value also. 632 * 633 ******************************************************************************/ 634 635 void 636 AcpiUtValueExit ( 637 UINT32 LineNumber, 638 const char *FunctionName, 639 const char *ModuleName, 640 UINT32 ComponentId, 641 UINT64 Value) 642 { 643 644 /* Check if enabled up-front for performance */ 645 646 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 647 { 648 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 649 LineNumber, FunctionName, ModuleName, ComponentId, 650 "%s %8.8X%8.8X\n", AcpiGbl_FunctionExitPrefix, 651 ACPI_FORMAT_UINT64 (Value)); 652 } 653 654 if (AcpiGbl_NestingLevel) 655 { 656 AcpiGbl_NestingLevel--; 657 } 658 } 659 660 ACPI_EXPORT_SYMBOL (AcpiUtValueExit) 661 662 663 /******************************************************************************* 664 * 665 * FUNCTION: AcpiUtPtrExit 666 * 667 * PARAMETERS: LineNumber - Caller's line number 668 * FunctionName - Caller's procedure name 669 * ModuleName - Caller's module name 670 * ComponentId - Caller's component ID 671 * Ptr - Pointer to display 672 * 673 * RETURN: None 674 * 675 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 676 * set in DebugLevel. Prints exit value also. 677 * 678 ******************************************************************************/ 679 680 void 681 AcpiUtPtrExit ( 682 UINT32 LineNumber, 683 const char *FunctionName, 684 const char *ModuleName, 685 UINT32 ComponentId, 686 UINT8 *Ptr) 687 { 688 689 /* Check if enabled up-front for performance */ 690 691 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 692 { 693 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 694 LineNumber, FunctionName, ModuleName, ComponentId, 695 "%s %p\n", AcpiGbl_FunctionExitPrefix, Ptr); 696 } 697 698 if (AcpiGbl_NestingLevel) 699 { 700 AcpiGbl_NestingLevel--; 701 } 702 } 703 704 705 /******************************************************************************* 706 * 707 * FUNCTION: AcpiUtStrExit 708 * 709 * PARAMETERS: LineNumber - Caller's line number 710 * FunctionName - Caller's procedure name 711 * ModuleName - Caller's module name 712 * ComponentId - Caller's component ID 713 * String - String to display 714 * 715 * RETURN: None 716 * 717 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 718 * set in DebugLevel. Prints exit value also. 719 * 720 ******************************************************************************/ 721 722 void 723 AcpiUtStrExit ( 724 UINT32 LineNumber, 725 const char *FunctionName, 726 const char *ModuleName, 727 UINT32 ComponentId, 728 const char *String) 729 { 730 731 /* Check if enabled up-front for performance */ 732 733 if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId)) 734 { 735 AcpiDebugPrint (ACPI_LV_FUNCTIONS, 736 LineNumber, FunctionName, ModuleName, ComponentId, 737 "%s %s\n", AcpiGbl_FunctionExitPrefix, String); 738 } 739 740 if (AcpiGbl_NestingLevel) 741 { 742 AcpiGbl_NestingLevel--; 743 } 744 } 745 746 747 /******************************************************************************* 748 * 749 * FUNCTION: AcpiTracePoint 750 * 751 * PARAMETERS: Type - Trace event type 752 * Begin - TRUE if before execution 753 * Aml - Executed AML address 754 * Pathname - Object path 755 * Pointer - Pointer to the related object 756 * 757 * RETURN: None 758 * 759 * DESCRIPTION: Interpreter execution trace. 760 * 761 ******************************************************************************/ 762 763 void 764 AcpiTracePoint ( 765 ACPI_TRACE_EVENT_TYPE Type, 766 BOOLEAN Begin, 767 UINT8 *Aml, 768 char *Pathname) 769 { 770 771 ACPI_FUNCTION_ENTRY (); 772 773 AcpiExTracePoint (Type, Begin, Aml, Pathname); 774 775 #ifdef ACPI_USE_SYSTEM_TRACER 776 AcpiOsTracePoint (Type, Begin, Aml, Pathname); 777 #endif 778 } 779 780 ACPI_EXPORT_SYMBOL (AcpiTracePoint) 781 782 #endif 783