blob: 671701397da0e69fbcc751d60c7fdc0ad0cc1db7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>oscl_scheduler_tuneables.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>oscl_scheduler_tuneables.h</h1><a href="oscl__scheduler__tuneables_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
00013 <span class="preprocessor">#ifndef OSCL_SCHEDULER_TUNEABLES_H_INCLUDED</span>
00014 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SCHEDULER_TUNEABLES_H_INCLUDED</span>
00015 <span class="preprocessor"></span>
00016 <span class="preprocessor">#include "<a class="code" href="osclconfig__proc_8h.html">osclconfig_proc.h</a>"</span>
00017
00018 <span class="comment">//Enable/disable scheduler stats gathering for Run times.</span>
00019 <span class="comment">//This data gathering is fairly expensive so should only be used</span>
00020 <span class="comment">//for debug and profiling.</span>
00021 <span class="preprocessor">#ifndef PV_SCHED_ENABLE_AO_STATS</span>
00022 <span class="preprocessor"></span><span class="comment">//defaults for cases where the flag is not defined in the osclconfig_proc.h</span>
00023 <span class="preprocessor">#if defined( NDEBUG)||(OSCL_RELEASE_BUILD)</span>
00024 <span class="preprocessor"></span><span class="comment">//for release builds</span>
00025 <span class="preprocessor">#define PV_SCHED_ENABLE_AO_STATS 0</span>
00026 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00027 <span class="preprocessor"></span><span class="comment">//for debug builds</span>
<a name="l00028"></a><a class="code" href="group__osclproc.html#a12">00028</a> <span class="preprocessor">#define PV_SCHED_ENABLE_AO_STATS 1</span>
00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00031 <span class="preprocessor"></span>
00032 <span class="comment">//Enable this to track time spent in scheduling loop in addition to Run times.</span>
00033 <span class="comment">//This data gathering is fairly expensive so should only be used</span>
00034 <span class="comment">//for debug and profiling.</span>
00035 <span class="preprocessor">#ifndef PV_SCHED_ENABLE_LOOP_STATS</span>
00036 <span class="preprocessor"></span><span class="comment">//defaults for cases where the flag is not defined in the osclconfig_proc.h</span>
00037 <span class="preprocessor">#if defined( NDEBUG)||(OSCL_RELEASE_BUILD)</span>
00038 <span class="preprocessor"></span><span class="comment">//for release builds</span>
00039 <span class="preprocessor">#define PV_SCHED_ENABLE_LOOP_STATS 0</span>
00040 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00041 <span class="preprocessor"></span><span class="comment">//for debug builds</span>
<a name="l00042"></a><a class="code" href="group__osclproc.html#a13">00042</a> <span class="preprocessor">#define PV_SCHED_ENABLE_LOOP_STATS 0</span>
00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00045 <span class="preprocessor"></span>
00046 <span class="comment">//Note: loop stats requires PV_SCHED_ENABLE_AO_STATS</span>
00047 <span class="preprocessor">#if(PV_SCHED_ENABLE_LOOP_STATS) &amp;&amp; !(PV_SCHED_ENABLE_AO_STATS)</span>
00048 <span class="preprocessor"></span><span class="preprocessor">#error Invalid Config!</span>
00049 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00050 <span class="preprocessor"></span>
00051 <span class="comment">//Enable this to do detailed logging for all Run calls.</span>
00052 <span class="comment">//This logging is very expensive so should only be used</span>
00053 <span class="comment">//for debug and profiling.</span>
00054 <span class="preprocessor">#ifndef PV_SCHED_ENABLE_PERF_LOGGING</span>
00055 <span class="preprocessor"></span><span class="comment">//defaults for cases where the flag is not defined in the osclconfig_proc.h</span>
00056 <span class="preprocessor">#if defined( NDEBUG)||(OSCL_RELEASE_BUILD)</span>
00057 <span class="preprocessor"></span><span class="comment">//for release builds</span>
00058 <span class="preprocessor">#define PV_SCHED_ENABLE_PERF_LOGGING 0</span>
00059 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00060 <span class="preprocessor"></span><span class="comment">//for debug builds</span>
<a name="l00061"></a><a class="code" href="group__osclproc.html#a14">00061</a> <span class="preprocessor">#define PV_SCHED_ENABLE_PERF_LOGGING 1</span>
00062 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00063 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00064 <span class="preprocessor"></span>
00065 <span class="comment">//Note: Perf logging requires PV_SCHED_ENABLE_AO_STATS</span>
00066 <span class="preprocessor">#if(PV_SCHED_ENABLE_PERF_LOGGING) &amp;&amp; !(PV_SCHED_ENABLE_AO_STATS)</span>
00067 <span class="preprocessor"></span><span class="preprocessor">#error Invalid Config!</span>
00068 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00069 <span class="preprocessor"></span>
00070 <span class="comment">//Enable/disable thread context checking here. Context checks are important during</span>
00071 <span class="comment">//development but may be costly depending on the OS thread ID retrieval efficiency.</span>
00072 <span class="preprocessor">#if defined( NDEBUG)||(OSCL_RELEASE_BUILD)</span>
00073 <span class="preprocessor"></span><span class="comment">//for release builds</span>
00074 <span class="preprocessor">#define PV_SCHED_ENABLE_THREAD_CONTEXT_CHECKS 0</span>
00075 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00076 <span class="preprocessor"></span><span class="comment">//for debug builds</span>
<a name="l00077"></a><a class="code" href="group__osclproc.html#a15">00077</a> <span class="preprocessor">#define PV_SCHED_ENABLE_THREAD_CONTEXT_CHECKS 1</span>
00078 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00079 <span class="preprocessor"></span>
00080 <span class="comment">//Set LOG_Q to 1 to enable extensive Queue logging for non-symbian scheduler.</span>
00081 <span class="comment">//the code will log the entire queue every time any AO is added or removed,</span>
00082 <span class="comment">//for both timer queue and ready queue. It is expensive so should be off in</span>
00083 <span class="comment">//production code.</span>
<a name="l00084"></a><a class="code" href="group__osclproc.html#a16">00084</a> <span class="preprocessor">#define PV_SCHED_LOG_Q 0</span>
00085 <span class="preprocessor"></span>
00086 <span class="comment">//Set CHECK_Q to enable Q integrity checks. Should be off in production code.</span>
<a name="l00087"></a><a class="code" href="group__osclproc.html#a17">00087</a> <span class="preprocessor">#define PV_SCHED_CHECK_Q 0</span>
00088 <span class="preprocessor"></span>
00089 <span class="comment">//This allows switching between "fair scheduling" and Symbian native scheduler</span>
00090 <span class="comment">//behavior in the non-symbian scheduler implementation.</span>
00091 <span class="comment">//We always use fair scheduling, but for testing it can be helpful to</span>
00092 <span class="comment">//swap in the symbian native behavior.</span>
<a name="l00093"></a><a class="code" href="group__osclproc.html#a18">00093</a> <span class="preprocessor">#define PV_SCHED_FAIR_SCHEDULING 1</span>
00094 <span class="preprocessor"></span>
00095 <span class="comment">//OSCL_PERF_SUMMARY_LOGGING is a master switch to configure scheduler</span>
00096 <span class="comment">//for full performance data gathering with minimal summary logging at</span>
00097 <span class="comment">//the end. The data gathering is fairly expensive so should only be</span>
00098 <span class="comment">//used for profiling tests. The logging itself is fairly nonintrusive</span>
00099 <span class="comment">//since it only happens at scheduler exit.</span>
00100 <span class="comment">//------------------------------------</span>
00101 <span class="comment">// logger node: "OsclSchedulerPerfStats"</span>
00102 <span class="comment">// instrumentation level: PVLOGMSG_INST_PROF</span>
00103 <span class="comment">// logger level: PVLOGMSG_INFO</span>
00104 <span class="comment">//------------------------------------</span>
00105 <span class="preprocessor">#ifndef OSCL_PERF_SUMMARY_LOGGING</span>
00106 <span class="preprocessor"></span><span class="comment">//defaults for cases where the flag is not defined in the osclconfig_proc.h</span>
00107 <span class="preprocessor">#if defined( NDEBUG)||(OSCL_RELEASE_BUILD)</span>
00108 <span class="preprocessor"></span><span class="comment">//release builds</span>
00109 <span class="preprocessor">#define OSCL_PERF_SUMMARY_LOGGING 0</span>
00110 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00111 <span class="preprocessor"></span><span class="comment">//other debug builds</span>
<a name="l00112"></a><a class="code" href="group__osclproc.html#a19">00112</a> <span class="preprocessor">#define OSCL_PERF_SUMMARY_LOGGING 0</span>
00113 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00114 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00115 <span class="preprocessor"></span>
00116 <span class="comment">//Settings for minimal stats logging</span>
00117 <span class="preprocessor">#if(OSCL_PERF_SUMMARY_LOGGING)</span>
00118 <span class="preprocessor"></span><span class="comment">//enable AO stats</span>
00119 <span class="preprocessor">#undef PV_SCHED_ENABLE_AO_STATS</span>
00120 <span class="preprocessor"></span><span class="preprocessor">#define PV_SCHED_ENABLE_AO_STATS 1</span>
00121 <span class="preprocessor"></span><span class="comment">//enable loop stats</span>
00122 <span class="preprocessor">#undef PV_SCHED_ENABLE_LOOP_STATS</span>
00123 <span class="preprocessor"></span><span class="preprocessor">#define PV_SCHED_ENABLE_LOOP_STATS 1</span>
00124 <span class="preprocessor"></span><span class="comment">//disable perf logging because it skews the results</span>
00125 <span class="preprocessor">#undef PV_SCHED_ENABLE_PERF_LOGGING</span>
00126 <span class="preprocessor"></span><span class="preprocessor">#define PV_SCHED_ENABLE_PERF_LOGGING 0</span>
00127 <span class="preprocessor"></span><span class="preprocessor">#endif //OSCL_PERF_SUMMARY_LOGGING</span>
00128 <span class="preprocessor"></span>
00129 <span class="preprocessor">#endif</span>
00130 <span class="preprocessor"></span>
00131
</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>