mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 01:44:33 +03:00
acpiexec: add option to disable memory tracking mechanism.
-dt option will disable the tracking mechanism, which improves performance considerably. Also restructured the options into -d (disable) and -e (enable) options.
This commit is contained in:
parent
b2bad68e4c
commit
d90488f435
@ -960,6 +960,7 @@ AcpiUtInitGlobals (
|
|||||||
|
|
||||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||||
AcpiGbl_DisplayFinalMemStats = FALSE;
|
AcpiGbl_DisplayFinalMemStats = FALSE;
|
||||||
|
AcpiGbl_DisableMemTracking = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_OK);
|
return_ACPI_STATUS (AE_OK);
|
||||||
|
@ -436,6 +436,11 @@ AcpiUtTrackAllocation (
|
|||||||
ACPI_FUNCTION_TRACE_PTR (UtTrackAllocation, Allocation);
|
ACPI_FUNCTION_TRACE_PTR (UtTrackAllocation, Allocation);
|
||||||
|
|
||||||
|
|
||||||
|
if (AcpiGbl_DisableMemTracking)
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
MemList = AcpiGbl_GlobalList;
|
MemList = AcpiGbl_GlobalList;
|
||||||
Status = AcpiUtAcquireMutex (ACPI_MTX_MEMORY);
|
Status = AcpiUtAcquireMutex (ACPI_MTX_MEMORY);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
@ -518,6 +523,11 @@ AcpiUtRemoveAllocation (
|
|||||||
ACPI_FUNCTION_TRACE (UtRemoveAllocation);
|
ACPI_FUNCTION_TRACE (UtRemoveAllocation);
|
||||||
|
|
||||||
|
|
||||||
|
if (AcpiGbl_DisableMemTracking)
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
MemList = AcpiGbl_GlobalList;
|
MemList = AcpiGbl_GlobalList;
|
||||||
if (NULL == MemList->ListHead)
|
if (NULL == MemList->ListHead)
|
||||||
{
|
{
|
||||||
@ -650,6 +660,11 @@ AcpiUtDumpAllocations (
|
|||||||
ACPI_FUNCTION_TRACE (UtDumpAllocations);
|
ACPI_FUNCTION_TRACE (UtDumpAllocations);
|
||||||
|
|
||||||
|
|
||||||
|
if (AcpiGbl_DisableMemTracking)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Walk the allocation list.
|
* Walk the allocation list.
|
||||||
*/
|
*/
|
||||||
|
@ -355,6 +355,7 @@ extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_
|
|||||||
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_GlobalList;
|
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_GlobalList;
|
||||||
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_NsNodeList;
|
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_NsNodeList;
|
||||||
ACPI_EXTERN BOOLEAN AcpiGbl_DisplayFinalMemStats;
|
ACPI_EXTERN BOOLEAN AcpiGbl_DisplayFinalMemStats;
|
||||||
|
ACPI_EXTERN BOOLEAN AcpiGbl_DisableMemTracking;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ char *FileList[ASL_MAX_FILES];
|
|||||||
int FileCount;
|
int FileCount;
|
||||||
|
|
||||||
|
|
||||||
#define AE_SUPPORTED_OPTIONS "?ab:de^f:ghimo:rstvx:z"
|
#define AE_SUPPORTED_OPTIONS "?b:d:e:f:gm^ovx:"
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
@ -157,19 +157,25 @@ usage (void)
|
|||||||
|
|
||||||
printf ("Where:\n");
|
printf ("Where:\n");
|
||||||
printf (" -? Display this message\n");
|
printf (" -? Display this message\n");
|
||||||
printf (" -a Do not abort methods on error\n");
|
|
||||||
printf (" -b <CommandLine> Batch mode command execution\n");
|
printf (" -b <CommandLine> Batch mode command execution\n");
|
||||||
printf (" -e [Method] Batch mode method execution\n");
|
printf (" -m [Method] Batch mode method execution. Default=MAIN\n");
|
||||||
printf (" -f <Value> Specify OpRegion initialization fill value\n");
|
printf ("\n");
|
||||||
printf (" -i Do not run STA/INI methods during init\n");
|
|
||||||
printf (" -m Display final memory use statistics\n");
|
printf (" -da Disable method abort on error\n");
|
||||||
printf (" -o <OutputFile> Send output to this file\n");
|
printf (" -di Disable execution of STA/INI methods during init\n");
|
||||||
printf (" -r Disable OpRegion address simulation\n");
|
printf (" -do Disable Operation Region address simulation\n");
|
||||||
printf (" -s Enable Interpreter Slack Mode\n");
|
printf (" -dt Disable allocation tracking (performance)\n");
|
||||||
printf (" -t Enable Interpreter Serialized Mode\n");
|
printf ("\n");
|
||||||
printf (" -v Verbose init output\n");
|
|
||||||
printf (" -x <DebugLevel> Specify debug output level\n");
|
printf (" -ef Enable display of final memory statistics\n");
|
||||||
printf (" -z Enable debug semaphore timeout\n");
|
printf (" -em Enable Interpreter Serialized Mode\n");
|
||||||
|
printf (" -es Enable Interpreter Slack Mode\n");
|
||||||
|
printf (" -et Enable debug semaphore timeout\n");
|
||||||
|
printf ("\n");
|
||||||
|
|
||||||
|
printf (" -f <Value> Operation Region initialization fill value\n");
|
||||||
|
printf (" -v Verbose initialization output\n");
|
||||||
|
printf (" -x <DebugLevel> Debug output level\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -471,10 +477,6 @@ main (
|
|||||||
|
|
||||||
while ((j = AcpiGetopt (argc, argv, AE_SUPPORTED_OPTIONS)) != EOF) switch(j)
|
while ((j = AcpiGetopt (argc, argv, AE_SUPPORTED_OPTIONS)) != EOF) switch(j)
|
||||||
{
|
{
|
||||||
case 'a':
|
|
||||||
AcpiGbl_IgnoreErrors = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'b':
|
case 'b':
|
||||||
if (strlen (AcpiGbl_Optarg) > 127)
|
if (strlen (AcpiGbl_Optarg) > 127)
|
||||||
{
|
{
|
||||||
@ -487,20 +489,58 @@ main (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
AcpiGbl_DbOpt_disasm = TRUE;
|
switch (AcpiGbl_Optarg[0])
|
||||||
AcpiGbl_DbOpt_stats = TRUE;
|
{
|
||||||
|
case 'a':
|
||||||
|
AcpiGbl_IgnoreErrors = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'i':
|
||||||
|
AcpiGbl_DbOpt_ini_methods = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'o':
|
||||||
|
AcpiGbl_DbOpt_NoRegionSupport = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||||
|
AcpiGbl_DisableMemTracking = TRUE;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e':
|
case 'e':
|
||||||
AcpiGbl_BatchMode = 2;
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
switch (AcpiGbl_Optarg[0])
|
||||||
{
|
{
|
||||||
case '^':
|
case 'f':
|
||||||
strcpy (BatchBuffer, "MAIN");
|
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||||
|
AcpiGbl_DisplayFinalMemStats = TRUE;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'm':
|
||||||
|
AcpiGbl_AllMethodsSerialized = TRUE;
|
||||||
|
printf ("Enabling AML Interpreter serialized mode\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's':
|
||||||
|
AcpiGbl_EnableInterpreterSlack = TRUE;
|
||||||
|
printf ("Enabling AML Interpreter slack mode\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
AcpiGbl_DebugTimeout = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
strcpy (BatchBuffer, AcpiGbl_Optarg);
|
printf ("Unknown option: -e%s\n", AcpiGbl_Optarg);
|
||||||
break;
|
return (-1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -513,32 +553,23 @@ main (
|
|||||||
AcpiGbl_DbFilename = NULL;
|
AcpiGbl_DbFilename = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'i':
|
|
||||||
AcpiGbl_DbOpt_ini_methods = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
AcpiGbl_BatchMode = 2;
|
||||||
AcpiGbl_DisplayFinalMemStats = TRUE;
|
switch (AcpiGbl_Optarg[0])
|
||||||
#endif
|
{
|
||||||
|
case '^':
|
||||||
|
strcpy (BatchBuffer, "MAIN");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
strcpy (BatchBuffer, AcpiGbl_Optarg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'o':
|
case 'o':
|
||||||
printf ("O option is not implemented\n");
|
AcpiGbl_DbOpt_disasm = TRUE;
|
||||||
break;
|
AcpiGbl_DbOpt_stats = TRUE;
|
||||||
|
|
||||||
case 'r':
|
|
||||||
AcpiGbl_DbOpt_NoRegionSupport = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 's':
|
|
||||||
AcpiGbl_EnableInterpreterSlack = TRUE;
|
|
||||||
printf ("Enabling AML Interpreter slack mode\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 't':
|
|
||||||
AcpiGbl_AllMethodsSerialized = TRUE;
|
|
||||||
printf ("Enabling AML Interpreter serialized mode\n");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
@ -551,10 +582,6 @@ main (
|
|||||||
printf ("Debug Level: 0x%8.8X\n", AcpiDbgLevel);
|
printf ("Debug Level: 0x%8.8X\n", AcpiDbgLevel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'z':
|
|
||||||
AcpiGbl_DebugTimeout = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user