mirror of
https://github.com/acpica/acpica/
synced 2025-01-12 20:39:19 +03:00
Performance: Remove function tracing from critical allocation functions.
Tracing is no longer needed for many of the low-level function. Removing the trace mechanism from these functions improves performance a small amount, also simplifies the debug trace output.
This commit is contained in:
parent
3860f05120
commit
f8d496aa61
@ -849,18 +849,18 @@ UINT32
|
||||
AcpiNsOpensScope (
|
||||
ACPI_OBJECT_TYPE Type)
|
||||
{
|
||||
ACPI_FUNCTION_TRACE_STR (NsOpensScope, AcpiUtGetTypeName (Type));
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
if (!AcpiUtValidObjectType (Type))
|
||||
if (Type > ACPI_TYPE_LOCAL_MAX)
|
||||
{
|
||||
/* type code out of range */
|
||||
|
||||
ACPI_WARNING ((AE_INFO, "Invalid Object Type 0x%X", Type));
|
||||
return_UINT32 (ACPI_NS_NORMAL);
|
||||
return (ACPI_NS_NORMAL);
|
||||
}
|
||||
|
||||
return_UINT32 (((UINT32) AcpiGbl_NsProperties[Type]) & ACPI_NS_NEWSCOPE);
|
||||
return (((UINT32) AcpiGbl_NsProperties[Type]) & ACPI_NS_NEWSCOPE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -440,7 +440,7 @@ AcpiUtDeleteInternalObjectList (
|
||||
ACPI_OPERAND_OBJECT **InternalObj;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (UtDeleteInternalObjectList);
|
||||
ACPI_FUNCTION_NAME (UtDeleteInternalObjectList);
|
||||
|
||||
|
||||
/* Walk the null-terminated internal list */
|
||||
@ -453,7 +453,7 @@ AcpiUtDeleteInternalObjectList (
|
||||
/* Free the combined parameter pointer list and object array */
|
||||
|
||||
ACPI_FREE (ObjList);
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -600,7 +600,7 @@ AcpiUtUpdateObjectReference (
|
||||
UINT32 i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR (UtUpdateObjectReference, Object);
|
||||
ACPI_FUNCTION_NAME (UtUpdateObjectReference);
|
||||
|
||||
|
||||
while (Object)
|
||||
@ -611,7 +611,7 @@ AcpiUtUpdateObjectReference (
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
|
||||
"Object %p is NS handle\n", Object));
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -761,7 +761,7 @@ AcpiUtUpdateObjectReference (
|
||||
}
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
return (AE_OK);
|
||||
|
||||
|
||||
ErrorExit:
|
||||
@ -777,7 +777,7 @@ ErrorExit:
|
||||
AcpiUtDeleteGenericState (State);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
@ -799,14 +799,14 @@ AcpiUtAddReference (
|
||||
ACPI_OPERAND_OBJECT *Object)
|
||||
{
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR (UtAddReference, Object);
|
||||
ACPI_FUNCTION_NAME (UtAddReference);
|
||||
|
||||
|
||||
/* Ensure that we have a valid object */
|
||||
|
||||
if (!AcpiUtValidInternalObject (Object))
|
||||
{
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
|
||||
@ -816,7 +816,7 @@ AcpiUtAddReference (
|
||||
/* Increment the reference count */
|
||||
|
||||
(void) AcpiUtUpdateObjectReference (Object, REF_INCREMENT);
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -837,7 +837,7 @@ AcpiUtRemoveReference (
|
||||
ACPI_OPERAND_OBJECT *Object)
|
||||
{
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR (UtRemoveReference, Object);
|
||||
ACPI_FUNCTION_NAME (UtRemoveReference);
|
||||
|
||||
|
||||
/*
|
||||
@ -849,14 +849,14 @@ AcpiUtRemoveReference (
|
||||
(ACPI_GET_DESCRIPTOR_TYPE (Object) == ACPI_DESC_TYPE_NAMED))
|
||||
|
||||
{
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Ensure that we have a valid object */
|
||||
|
||||
if (!AcpiUtValidInternalObject (Object))
|
||||
{
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
|
||||
@ -869,5 +869,5 @@ AcpiUtRemoveReference (
|
||||
* of all subobjects!)
|
||||
*/
|
||||
(void) AcpiUtUpdateObjectReference (Object, REF_DECREMENT);
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
@ -179,15 +179,14 @@ AcpiUtPushGenericState (
|
||||
ACPI_GENERIC_STATE **ListHead,
|
||||
ACPI_GENERIC_STATE *State)
|
||||
{
|
||||
ACPI_FUNCTION_TRACE (UtPushGenericState);
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Push the state object onto the front of the list (stack) */
|
||||
|
||||
State->Common.Next = *ListHead;
|
||||
*ListHead = State;
|
||||
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -210,7 +209,7 @@ AcpiUtPopGenericState (
|
||||
ACPI_GENERIC_STATE *State;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (UtPopGenericState);
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Remove the state object at the head of the list (stack) */
|
||||
@ -223,7 +222,7 @@ AcpiUtPopGenericState (
|
||||
*ListHead = State->Common.Next;
|
||||
}
|
||||
|
||||
return_PTR (State);
|
||||
return (State);
|
||||
}
|
||||
|
||||
|
||||
@ -281,7 +280,7 @@ AcpiUtCreateThreadState (
|
||||
ACPI_GENERIC_STATE *State;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (UtCreateThreadState);
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Create the generic state object */
|
||||
@ -289,7 +288,7 @@ AcpiUtCreateThreadState (
|
||||
State = AcpiUtCreateGenericState ();
|
||||
if (!State)
|
||||
{
|
||||
return_PTR (NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Init fields specific to the update struct */
|
||||
@ -305,7 +304,7 @@ AcpiUtCreateThreadState (
|
||||
State->Thread.ThreadId = (ACPI_THREAD_ID) 1;
|
||||
}
|
||||
|
||||
return_PTR ((ACPI_THREAD_STATE *) State);
|
||||
return ((ACPI_THREAD_STATE *) State);
|
||||
}
|
||||
|
||||
|
||||
@ -332,7 +331,7 @@ AcpiUtCreateUpdateState (
|
||||
ACPI_GENERIC_STATE *State;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR (UtCreateUpdateState, Object);
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Create the generic state object */
|
||||
@ -340,7 +339,7 @@ AcpiUtCreateUpdateState (
|
||||
State = AcpiUtCreateGenericState ();
|
||||
if (!State)
|
||||
{
|
||||
return_PTR (NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Init fields specific to the update struct */
|
||||
@ -348,8 +347,7 @@ AcpiUtCreateUpdateState (
|
||||
State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_UPDATE;
|
||||
State->Update.Object = Object;
|
||||
State->Update.Value = Action;
|
||||
|
||||
return_PTR (State);
|
||||
return (State);
|
||||
}
|
||||
|
||||
|
||||
@ -375,7 +373,7 @@ AcpiUtCreatePkgState (
|
||||
ACPI_GENERIC_STATE *State;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR (UtCreatePkgState, InternalObject);
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Create the generic state object */
|
||||
@ -383,7 +381,7 @@ AcpiUtCreatePkgState (
|
||||
State = AcpiUtCreateGenericState ();
|
||||
if (!State)
|
||||
{
|
||||
return_PTR (NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Init fields specific to the update struct */
|
||||
@ -393,8 +391,7 @@ AcpiUtCreatePkgState (
|
||||
State->Pkg.DestObject = ExternalObject;
|
||||
State->Pkg.Index= Index;
|
||||
State->Pkg.NumPackages = 1;
|
||||
|
||||
return_PTR (State);
|
||||
return (State);
|
||||
}
|
||||
|
||||
|
||||
@ -418,7 +415,7 @@ AcpiUtCreateControlState (
|
||||
ACPI_GENERIC_STATE *State;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (UtCreateControlState);
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Create the generic state object */
|
||||
@ -426,15 +423,14 @@ AcpiUtCreateControlState (
|
||||
State = AcpiUtCreateGenericState ();
|
||||
if (!State)
|
||||
{
|
||||
return_PTR (NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Init fields specific to the control struct */
|
||||
|
||||
State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_CONTROL;
|
||||
State->Common.State = ACPI_CONTROL_CONDITIONAL_EXECUTING;
|
||||
|
||||
return_PTR (State);
|
||||
return (State);
|
||||
}
|
||||
|
||||
|
||||
@ -455,7 +451,7 @@ void
|
||||
AcpiUtDeleteGenericState (
|
||||
ACPI_GENERIC_STATE *State)
|
||||
{
|
||||
ACPI_FUNCTION_TRACE (UtDeleteGenericState);
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Ignore null state */
|
||||
@ -464,5 +460,5 @@ AcpiUtDeleteGenericState (
|
||||
{
|
||||
(void) AcpiOsReleaseObject (AcpiGbl_StateCache, State);
|
||||
}
|
||||
return_VOID;
|
||||
return;
|
||||
}
|
||||
|
@ -562,12 +562,12 @@ AcpiUtRemoveAllocation (
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (UtRemoveAllocation);
|
||||
ACPI_FUNCTION_NAME (UtRemoveAllocation);
|
||||
|
||||
|
||||
if (AcpiGbl_DisableMemTracking)
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
MemList = AcpiGbl_GlobalList;
|
||||
@ -578,13 +578,13 @@ AcpiUtRemoveAllocation (
|
||||
ACPI_ERROR ((Module, Line,
|
||||
"Empty allocation list, nothing to free!"));
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_MEMORY);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/* Unlink */
|
||||
@ -603,15 +603,15 @@ AcpiUtRemoveAllocation (
|
||||
(Allocation->Next)->Previous = Allocation->Previous;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Freeing %p, size 0%X\n",
|
||||
&Allocation->UserSpace, Allocation->Size));
|
||||
|
||||
/* Mark the segment as deleted */
|
||||
|
||||
ACPI_MEMSET (&Allocation->UserSpace, 0xEA, Allocation->Size);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Freeing size 0%X\n",
|
||||
Allocation->Size));
|
||||
|
||||
Status = AcpiUtReleaseMutex (ACPI_MTX_MEMORY);
|
||||
return_ACPI_STATUS (Status);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user