mirror of
https://github.com/acpica/acpica/
synced 2025-02-24 17:34:43 +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
|
||||
AcpiGbl_DisplayFinalMemStats = FALSE;
|
||||
AcpiGbl_DisableMemTracking = FALSE;
|
||||
#endif
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
|
@ -436,6 +436,11 @@ AcpiUtTrackAllocation (
|
||||
ACPI_FUNCTION_TRACE_PTR (UtTrackAllocation, Allocation);
|
||||
|
||||
|
||||
if (AcpiGbl_DisableMemTracking)
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
MemList = AcpiGbl_GlobalList;
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_MEMORY);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -518,6 +523,11 @@ AcpiUtRemoveAllocation (
|
||||
ACPI_FUNCTION_TRACE (UtRemoveAllocation);
|
||||
|
||||
|
||||
if (AcpiGbl_DisableMemTracking)
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
MemList = AcpiGbl_GlobalList;
|
||||
if (NULL == MemList->ListHead)
|
||||
{
|
||||
@ -650,6 +660,11 @@ AcpiUtDumpAllocations (
|
||||
ACPI_FUNCTION_TRACE (UtDumpAllocations);
|
||||
|
||||
|
||||
if (AcpiGbl_DisableMemTracking)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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_NsNodeList;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DisplayFinalMemStats;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DisableMemTracking;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -135,7 +135,7 @@ char *FileList[ASL_MAX_FILES];
|
||||
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 (" -? Display this message\n");
|
||||
printf (" -a Do not abort methods on error\n");
|
||||
printf (" -b <CommandLine> Batch mode command execution\n");
|
||||
printf (" -e [Method] Batch mode method execution\n");
|
||||
printf (" -f <Value> Specify OpRegion initialization fill value\n");
|
||||
printf (" -i Do not run STA/INI methods during init\n");
|
||||
printf (" -m Display final memory use statistics\n");
|
||||
printf (" -o <OutputFile> Send output to this file\n");
|
||||
printf (" -r Disable OpRegion address simulation\n");
|
||||
printf (" -s Enable Interpreter Slack Mode\n");
|
||||
printf (" -t Enable Interpreter Serialized Mode\n");
|
||||
printf (" -v Verbose init output\n");
|
||||
printf (" -x <DebugLevel> Specify debug output level\n");
|
||||
printf (" -z Enable debug semaphore timeout\n");
|
||||
printf (" -m [Method] Batch mode method execution. Default=MAIN\n");
|
||||
printf ("\n");
|
||||
|
||||
printf (" -da Disable method abort on error\n");
|
||||
printf (" -di Disable execution of STA/INI methods during init\n");
|
||||
printf (" -do Disable Operation Region address simulation\n");
|
||||
printf (" -dt Disable allocation tracking (performance)\n");
|
||||
printf ("\n");
|
||||
|
||||
printf (" -ef Enable display of final memory statistics\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)
|
||||
{
|
||||
case 'a':
|
||||
AcpiGbl_IgnoreErrors = TRUE;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
if (strlen (AcpiGbl_Optarg) > 127)
|
||||
{
|
||||
@ -487,20 +489,58 @@ main (
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
AcpiGbl_DbOpt_disasm = TRUE;
|
||||
AcpiGbl_DbOpt_stats = TRUE;
|
||||
switch (AcpiGbl_Optarg[0])
|
||||
{
|
||||
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;
|
||||
|
||||
case 'e':
|
||||
AcpiGbl_BatchMode = 2;
|
||||
switch (AcpiGbl_Optarg[0])
|
||||
{
|
||||
case '^':
|
||||
strcpy (BatchBuffer, "MAIN");
|
||||
case 'f':
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
AcpiGbl_DisplayFinalMemStats = TRUE;
|
||||
#endif
|
||||
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:
|
||||
strcpy (BatchBuffer, AcpiGbl_Optarg);
|
||||
break;
|
||||
printf ("Unknown option: -e%s\n", AcpiGbl_Optarg);
|
||||
return (-1);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -513,32 +553,23 @@ main (
|
||||
AcpiGbl_DbFilename = NULL;
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
AcpiGbl_DbOpt_ini_methods = FALSE;
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
AcpiGbl_DisplayFinalMemStats = TRUE;
|
||||
#endif
|
||||
AcpiGbl_BatchMode = 2;
|
||||
switch (AcpiGbl_Optarg[0])
|
||||
{
|
||||
case '^':
|
||||
strcpy (BatchBuffer, "MAIN");
|
||||
break;
|
||||
|
||||
default:
|
||||
strcpy (BatchBuffer, AcpiGbl_Optarg);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
printf ("O option is not implemented\n");
|
||||
break;
|
||||
|
||||
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");
|
||||
AcpiGbl_DbOpt_disasm = TRUE;
|
||||
AcpiGbl_DbOpt_stats = TRUE;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
@ -551,10 +582,6 @@ main (
|
||||
printf ("Debug Level: 0x%8.8X\n", AcpiDbgLevel);
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
AcpiGbl_DebugTimeout = TRUE;
|
||||
break;
|
||||
|
||||
case '?':
|
||||
case 'h':
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user