Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# oscl_scheduler_tuneables.h

Go to the documentation of this file.

    00001
    00013 #ifndef OSCL_SCHEDULER_TUNEABLES_H_INCLUDED
    00014 #define OSCL_SCHEDULER_TUNEABLES_H_INCLUDED
    00015
    00016 #include "osclconfig_proc.h"
    00017
    00018 //Enable/disable scheduler stats gathering for Run times.
    00019 //This data gathering is fairly expensive so should only be used
    00020 //for debug and profiling.
    00021 #ifndef PV_SCHED_ENABLE_AO_STATS
    00022 //defaults for cases where the flag is not defined in the osclconfig_proc.h
    00023 #if (OSCL_RELEASE_BUILD)
    00024 //for release builds
    00025 #define PV_SCHED_ENABLE_AO_STATS 0
    00026 #else
    00027 //for debug builds
    00028 #define PV_SCHED_ENABLE_AO_STATS 1
    00029 #endif
    00030 #endif
    00031
    00032 //Enable this to track time spent in scheduling loop in addition to Run times.
    00033 //This data gathering is fairly expensive so should only be used
    00034 //for debug and profiling.
    00035 #ifndef PV_SCHED_ENABLE_LOOP_STATS
    00036 //defaults for cases where the flag is not defined in the osclconfig_proc.h
    00037 #if (OSCL_RELEASE_BUILD)
    00038 //for release builds
    00039 #define PV_SCHED_ENABLE_LOOP_STATS 0
    00040 #else
    00041 //for debug builds
    00042 #define PV_SCHED_ENABLE_LOOP_STATS 0
    00043 #endif
    00044 #endif
    00045
    00046 //Note: loop stats requires PV_SCHED_ENABLE_AO_STATS
    00047 #if(PV_SCHED_ENABLE_LOOP_STATS) && !(PV_SCHED_ENABLE_AO_STATS)
    00048 #error Invalid Config!
    00049 #endif
    00050
    00051 //Enable this to do detailed logging for all Run calls.
    00052 //This logging is very expensive so should only be used
    00053 //for debug and profiling.
    00054 #ifndef PV_SCHED_ENABLE_PERF_LOGGING
    00055 //defaults for cases where the flag is not defined in the osclconfig_proc.h
    00056 #if (OSCL_RELEASE_BUILD)
    00057 //for release builds
    00058 #define PV_SCHED_ENABLE_PERF_LOGGING 0
    00059 #else
    00060 //for debug builds
    00061 #define PV_SCHED_ENABLE_PERF_LOGGING 1
    00062 #endif
    00063 #endif
    00064
    00065 //Note: Perf logging requires PV_SCHED_ENABLE_AO_STATS
    00066 #if(PV_SCHED_ENABLE_PERF_LOGGING) && !(PV_SCHED_ENABLE_AO_STATS)
    00067 #error Invalid Config!
    00068 #endif
    00069
    00070 //Enable/disable thread context checking here. Context checks are important during
    00071 //development but may be costly depending on the OS thread ID retrieval efficiency.
    00072 #if (OSCL_RELEASE_BUILD)
    00073 //for release builds
    00074 #define PV_SCHED_ENABLE_THREAD_CONTEXT_CHECKS 0
    00075 #else
    00076 //for debug builds
    00077 #define PV_SCHED_ENABLE_THREAD_CONTEXT_CHECKS 1
    00078 #endif
    00079
    00080 //Set LOG_Q to 1 to enable extensive Queue logging for non-symbian scheduler.
    00081 //the code will log the entire queue every time any AO is added or removed,
    00082 //for both timer queue and ready queue.  It is expensive so should be off in
    00083 //production code.
    00084 #define PV_SCHED_LOG_Q 0
    00085
    00086 //Set CHECK_Q to enable Q integrity checks.  Should be off in production code.
    00087 #define PV_SCHED_CHECK_Q 0
    00088
    00089 //This allows switching between "fair scheduling" and Symbian native scheduler
    00090 //behavior in the non-symbian scheduler implementation.
    00091 //We always use fair scheduling, but for testing it can be helpful to
    00092 //swap in the symbian native behavior.
    00093 #define PV_SCHED_FAIR_SCHEDULING 1
    00094
    00095 //OSCL_PERF_SUMMARY_LOGGING is a master switch to configure scheduler
    00096 //for full performance data gathering with minimal summary logging at
    00097 //the end.  The data gathering is fairly expensive so should only be
    00098 //used for profiling tests.  The logging itself is fairly nonintrusive
    00099 //since it only happens at scheduler exit.
    00100 //------------------------------------
    00101 // logger node: "OsclSchedulerPerfStats"
    00102 // instrumentation level: PVLOGMSG_INST_PROF
    00103 // logger level: PVLOGMSG_INFO
    00104 //------------------------------------
    00105 #ifndef OSCL_PERF_SUMMARY_LOGGING
    00106 //defaults for cases where the flag is not defined in the osclconfig_proc.h
    00107 #if (OSCL_RELEASE_BUILD)
    00108 //release builds
    00109 #define OSCL_PERF_SUMMARY_LOGGING 0
    00110 #else
    00111 //other debug builds
    00112 #define OSCL_PERF_SUMMARY_LOGGING 0
    00113 #endif
    00114 #endif
    00115
    00116 //Settings for minimal stats logging
    00117 #if(OSCL_PERF_SUMMARY_LOGGING)
    00118 //enable AO stats
    00119 #undef PV_SCHED_ENABLE_AO_STATS
    00120 #define PV_SCHED_ENABLE_AO_STATS 1
    00121 //enable loop stats
    00122 #undef PV_SCHED_ENABLE_LOOP_STATS
    00123 #define PV_SCHED_ENABLE_LOOP_STATS 1
    00124 //disable perf logging because it skews the results
    00125 #undef PV_SCHED_ENABLE_PERF_LOGGING
    00126 #define PV_SCHED_ENABLE_PERF_LOGGING 0
    00127 #endif //OSCL_PERF_SUMMARY_LOGGING
    00128
    00129 #endif
    00130
    00131