scheduler: Profile RunQueue implementation
This commit is contained in:
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include <util/Bitmap.h>
|
#include <util/Bitmap.h>
|
||||||
|
|
||||||
|
#include "scheduler_profiler.h"
|
||||||
|
|
||||||
|
|
||||||
template<typename Element>
|
template<typename Element>
|
||||||
struct RunQueueLink {
|
struct RunQueueLink {
|
||||||
@@ -245,6 +247,8 @@ RUN_QUEUE_TEMPLATE_LIST
|
|||||||
Element*
|
Element*
|
||||||
RUN_QUEUE_CLASS_NAME::PeekMaximum() const
|
RUN_QUEUE_CLASS_NAME::PeekMaximum() const
|
||||||
{
|
{
|
||||||
|
SCHEDULER_ENTER_FUNCTION();
|
||||||
|
|
||||||
int priority = fBitmap.GetHighestSet();
|
int priority = fBitmap.GetHighestSet();
|
||||||
if (priority < 0)
|
if (priority < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -268,6 +272,8 @@ void
|
|||||||
RUN_QUEUE_CLASS_NAME::PushFront(Element* element,
|
RUN_QUEUE_CLASS_NAME::PushFront(Element* element,
|
||||||
unsigned int priority)
|
unsigned int priority)
|
||||||
{
|
{
|
||||||
|
SCHEDULER_ENTER_FUNCTION();
|
||||||
|
|
||||||
ASSERT(priority <= MaxPriority);
|
ASSERT(priority <= MaxPriority);
|
||||||
|
|
||||||
RunQueueLink<Element>* elementLink = sGetLink(element);
|
RunQueueLink<Element>* elementLink = sGetLink(element);
|
||||||
@@ -295,6 +301,8 @@ void
|
|||||||
RUN_QUEUE_CLASS_NAME::PushBack(Element* element,
|
RUN_QUEUE_CLASS_NAME::PushBack(Element* element,
|
||||||
unsigned int priority)
|
unsigned int priority)
|
||||||
{
|
{
|
||||||
|
SCHEDULER_ENTER_FUNCTION();
|
||||||
|
|
||||||
ASSERT(priority <= MaxPriority);
|
ASSERT(priority <= MaxPriority);
|
||||||
|
|
||||||
RunQueueLink<Element>* elementLink = sGetLink(element);
|
RunQueueLink<Element>* elementLink = sGetLink(element);
|
||||||
@@ -321,6 +329,8 @@ RUN_QUEUE_TEMPLATE_LIST
|
|||||||
void
|
void
|
||||||
RUN_QUEUE_CLASS_NAME::Remove(Element* element)
|
RUN_QUEUE_CLASS_NAME::Remove(Element* element)
|
||||||
{
|
{
|
||||||
|
SCHEDULER_ENTER_FUNCTION();
|
||||||
|
|
||||||
RunQueueLink<Element>* elementLink = sGetLink(element);
|
RunQueueLink<Element>* elementLink = sGetLink(element);
|
||||||
unsigned int priority = elementLink->fPriority;
|
unsigned int priority = elementLink->fPriority;
|
||||||
|
|
||||||
@@ -351,6 +361,8 @@ RUN_QUEUE_TEMPLATE_LIST
|
|||||||
Element*
|
Element*
|
||||||
RUN_QUEUE_CLASS_NAME::GetHead(unsigned int priority) const
|
RUN_QUEUE_CLASS_NAME::GetHead(unsigned int priority) const
|
||||||
{
|
{
|
||||||
|
SCHEDULER_ENTER_FUNCTION();
|
||||||
|
|
||||||
ASSERT(priority <= MaxPriority);
|
ASSERT(priority <= MaxPriority);
|
||||||
return fHeads[priority];
|
return fHeads[priority];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user