c-collect2.html
来自「vxworks相关论文」· HTML 代码 · 共 166 行
HTML
166 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title> Configuring Data Collection </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-collect.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-collect.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-collect1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-collect3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="84188">3.2 Selecting a Logging Level</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84224"> </a>The level of logging you specify determines how much data is collected and how much impact WindView has on your application. The three options are: </p></dl><dl class="margin"><ul class="DashSingle" type="circle"><li><a name="84225"> </a>Context Switch Event-Logging Level (<i class="term">CSE Level</i>) </li></ul><ul class="DashSingle" type="circle"><li><a name="84226"> </a>Task State Transition Event-Logging Level (<i class="term">TST Level</i>) </li></ul><ul class="DashSingle" type="circle"><li><a name="84227"> </a>Additional Instrumentation Event-Logging Level (<i class="term">AIL Level</i>) </li></ul></dl><dl class="margin"><dd><p class="Body"><a name="87582"> </a>The relationship between these levels is shown in <a href="c-collect2.html#87606">Figure 3-1</a>. CSE level collects the smallest amount of data and is the least intrusive. TST level collects all the data collected at CSE level plus additional data about task state transitions. AIL level collects all the data collected at TST level plus additional data about selected objects. At AIL level, you can choose to collect data about only some or all of the possible objects, depending on your needs. <div class="frame"><h4 class="EntityTitle"><a name="87606"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 3-1: WindView Logging Levels </font></a></h4><dl class="margin"><div class="Anchor"><a name="87663"> </a><img class="figure" border="0" src="images/c-collect0.gif"></div></dl></div></p><dd><p class="Body"><a name="87693"> </a>To select a logging level, open the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Collection Configuration</font></b> dialog box by clicking the <img class="figure" border="0" src="images/c-collecta1.gif"> button on the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Control</font></b> window toolbar. The <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Collection Configuration</font></b> dialog box is shown in <a href="c-collect2.html#87700">Figure 3-2</a>. Select the desired level from the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Base Events</font></b> drop-down combo box. <div class="frame"><h4 class="EntityTitle"><a name="87700"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 3-2: Collection Configuration Dialog Box</font></a></h4><dl class="margin"><div class="Anchor"><a name="87708"> </a><img class="figure" border="0" src="images/c-collecta2.gif"></div></dl></div></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="87710">Context Switch Logging Level (CSE Level) </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89155"> </a>In real-time systems, the term <i class="term">current</i> <i class="term">context </i>usually refers to the current task and the information needed to restore the task's state, such as the state of the processor registers, operating system control information, and the stack. For WindView, the meaning of <i class="term">current context</i> is extended to include any thread of execution: a task, an ISR, or the kernel's idle loop. A <i class="term">context switch</i>, then, refers to a change in the current context, which can occur when one task preempts another, a task delays itself or pends on a resource, or a task is interrupted by an ISR. To view a sample event log collected with CSE level logging, select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Open</font></b> in the main <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">File</font></b> menu and open <i class="textVariable">installDir</i><b class="file">/host/src/windview/samples/switch.wvr</b>. <a href="c-collect2.html#89162">Figure 3-3</a> shows this event log.<div class="frame"><h4 class="EntityTitle"><a name="89162"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 3-3: Event Log Collected with CSE Level Logging </font></a></h4><dl class="margin"><div class="Anchor"><a name="89167"> </a><img class="figure" border="0" src="images/c-collect12.gif"></div></dl></div></p><dd><p class="Body"><a name="89169"> </a>When you select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Context Switch</font></b> on the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Collection Configuration</font></b> dialog box (see <a href="c-collect2.html#87700">Figure 3-2</a>), WindView collects data about the current context and where it is switched. It also records every entry and exit of an ISR, every program error that results in an exception that is handled by a default exception handler, periods of task preemption locking, and periods of priority inheritance. Because CSE level logging is the least intrusive, it can be useful for fine-tuning an otherwise debugged system. For example, you might use it to see that all timing deadlines are being met, or that all tasks get to run. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84325">Task State Transition Logging Level (TST Level) </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="87790"> </a>The term <i class="term">task state transition</i> refers to the process of a task exiting from one state and entering into another. For example, if a task issues a call to <b class="routine"><i class="routine">semTake</i></b><b>( )</b> and the semaphore is not available, it makes a transition from the executing state to the pended state. If it calls <b class="routine"><i class="routine">taskDelay</i></b><b>( )</b>, it makes a transition from the delayed state to the ready state when the number of ticks specified in the call expire. All context switches involve task state transitions, but a given task state transition may or may not result in a context switch, depending on the states of other tasks in the system when the task in question makes a state transition. View a sample event log collected at TST logging level by selecting <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Open</font></b> in the main <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">File</font></b> menu to <i class="textVariable">installDir</i><b class="file">/host/src/windview/samples/state.wvr</b>. <a href="c-collect2.html#87797">Figure 3-4</a> shows a portion of this event log. <div class="frame"><h4 class="EntityTitle"><a name="87797"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 3-4: Event Log Collected with TST Level Logging </font></a></h4><dl class="margin"><div class="Anchor"><a name="87802"> </a><img class="figure" border="0" src="images/c-collecta3.gif"></div></dl></div></p><dd><p class="Body"><a name="87804"> </a>When you select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Task State Transition </font></b>on the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Collection Configuration</font></b> dialog box, WindView collects data about task state transitions and the events that cause them. However, when you specify TST level logging WindView does not collect information on events that do not result in task state transitions. For example, if no tasks are pended on a particular semaphore, a <b class="routine"><i class="routine">semGive</i></b><b>( )</b> of that semaphore does not result in any task state transitions; thus, the <b class="eventType">semGive</b> event icon is not logged.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84270">Additional Instrumentation Logging Level (AIL Level) </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89817"> </a>AIL level logging works a little differently from CSE and TST levels. At AIL level, WindView gathers all the information included at the other two levels, as well as additional information about instrumented libraries that you choose to log. When you ask WindView to log an instrumented library, it logs <i class="emphasis">all</i> operations on library objects, including creations, gives or sends, takes or receives, and deletions. Events are generated for these operations whether or not they result in task state transitions, context switches, or neither; for example, a <b class="routine"><i class="routine">semTake</i></b><b>( )</b>of a semaphore that is available would be logged at AIL level, even though it would not change the state of the calling task. To view a sample event log collected at AIL logging level, open <i class="textVariable">installDir</i><b class="file">/host/src/windview/samples/object.wvr</b> by selecting <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Open</font></b> in the main <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">File</font></b> menu. <a href="c-collect2.html#85968">Figure 3-5</a> shows this event log.</p><dd><p class="Body"><a name="84828"> </a>When you specify AIL level logging, you can collect data for many kinds of objects in your real-time system. By default, the main kernel AIL libraries are selected when you select AIL level: <b class="library">taskLib</b>, <b class="library">semLib</b>, <b class="library">msgQLib</b>, and <b class="library">wdLib</b>, which are checked in the default setting shown in <a href="c-collect2.html#87700">Figure 3-2</a>. For information on changing the selected libraries, see <a href="c-collect3.html#84220"><i class="title">3.3 Instrumented Objects</i></a>. </p><dd><p class="Body"><a name="84282"> </a><a href="c-collect2.html#85968">Figure 3-5</a> shows the same scenario as <a href="c-collect2.html#87797">Figure 3-4</a>. The only difference is that <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Additional Instrumentation </font></b>was selected<b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans"> </font></b>on the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Collection Configuration</font></b> dialog box, causing the default libraries to be logged. You can see that in addition to the information shown in <a href="c-collect2.html#87797">Figure 3-4</a>, <b class="task">tNetTask</b> gives and take several semaphores(<img class="figure" border="0" src="images/c-collecta4.gif"> and <img class="figure" border="0" src="images/c-collect5.gif">), only one of which results in a task state transition or a context switch.<div class="frame"><h4 class="EntityTitle"><a name="85968"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 3-5: Event Log Collected with AIL Level Logging </font></a></h4><dl class="margin"><div class="Anchor"><a name="84641"> </a><img class="figure" border="0" src="images/c-collect6.gif"></div></dl></div> </p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-collect.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-collect.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-collect1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-collect3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?