Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-7B477BA5-CC5B-56A2-82BC-E1BC0049FECB" xml:lang="en"><title>Kernel
Trace Tool Overview </title><shortdesc>The kernel trace tool is a user-side client DLL which provides
an interface for extracting trace data from a memory buffer</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-8A1309B2-08A5-4FD8-BF0A-A2EE14B14A0E"><title>Purpose </title> <p>. Kernel Trace tool is part of the reference
implementation of trace handling and is also used by the <filepath>btrace.exe</filepath> command
line interface. </p> </section>
<section id="GUID-5ABFC059-DFD0-4F8D-A662-DF0A1770B3DB"><title>Intended audience</title> <p>This document is intended to
be used by platform developers and device creators.</p> <p>It is for use by
developers implementing a trace service using the kernel trace tool framework
and for developers implementing a custom trace tool using the output of the
kernel trace tool client. </p> </section>
<section id="GUID-0F4F5501-E3B8-4CCB-B83B-0F62E1E6BE31"><title>Kernel Trace Tool Variant Device Driver Library Details</title> <p>The
DLL that provides the functionality and the library to which your code must
link is identified below. </p> <table id="GUID-58AB1D07-42D4-5B18-924E-AA6718B16DDE">
<tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/>
<thead>
<row>
<entry>DLL</entry>
<entry>LIB</entry>
<entry>Short Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p> <filepath>btracec.dll</filepath> </p> </entry>
<entry><p> <filepath>btracec.lib</filepath> </p> </entry>
<entry><p>An interface for extracting trace data from a memory buffer. </p> </entry>
</row>
</tbody>
</tgroup>
</table> </section>
<section id="GUID-001BE399-E1F0-481F-900D-CCB1B3BAA1C8"><title>Architectural relationship</title> <p>The kernel trace tool
uses the output of the kernel side module <filepath>btracex.ldd</filepath> and
the trace filters defined in <codeph>EUser</codeph>. It provides input to
the command line kernel trace tool. </p> <p><b>Description</b> </p> <p>The
kernel trace tool is a user side interface to the kernel side trace module.
It is not used in isolation. It is used by the <codeph>BTrace.exe</codeph> command
line trace tool. The licensee may create their own trace tool using this library. </p> </section>
<section id="GUID-BC047568-BA6A-4F26-9BA5-2C693188B060"><title>Kernel Trace tool variant device driver functionality</title> <p>The
kernel trace tool module provides functionality to: </p> <ul>
<li id="GUID-71CD4B34-DC12-56BC-B73E-E4D47F26947F"><p>open and close a communication
channel to kernel side, </p> </li>
<li id="GUID-24FA1349-F7DE-51D4-95B8-8CA2A5B5021E"><p>open and close the chunk
from which it reads data, </p> </li>
<li id="GUID-05EAEDBC-CED6-56E7-BA04-E09748864B2B"><p>get and set the size
of the buffer to which it writes, </p> </li>
<li id="GUID-D68DE97B-29B1-533F-8049-871FE90B668B"><p>discard buffer data, </p> </li>
<li id="GUID-77213A01-3F85-5D64-8A4A-7BCCB02A89C0"><p>get and set the trace
mode, </p> </li>
<li id="GUID-0CAFB4EC-FABB-5C8C-9D70-45FFD2660F34"><p>get and set the trace
filters, </p> </li>
<li id="GUID-D66B1A92-2715-53C1-B3DE-6B06AE27A49F"><p>get data from the chunk, </p> </li>
<li id="GUID-E406CA17-F1A1-59BE-902D-E5BB031BBEDE"><p>remove data from the
buffer, </p> </li>
<li id="GUID-C89CE1F6-A7DC-5393-A697-6C27CCE9E965"><p>request notification
that data is available, and </p> </li>
<li id="GUID-F542D6AF-BD05-5D4B-BBCC-4281D3B6E7D0"><p>cancel a notification
request. </p> </li>
</ul></section>
<section id="GUID-4F5FCE34-4197-44AA-ABB1-25C0D4495C47"><title>Key Kernel Trace tool variant device driver classes</title> <p>The
key classes that make up the kernel trace tool module are as follows: </p> <ul>
<li id="GUID-917C05E0-38D7-5E18-85AE-94E96C328768"><p> <xref href="GUID-9E859841-E8A3-37D5-9A19-BCAA3C700922.dita"><apiname>RBTrace</apiname></xref> </p> <p>A
class providing functions to read trace data from kernel side chunks and write
it to a buffer. For example the command line kernel trace tool declares an <xref href="GUID-9E859841-E8A3-37D5-9A19-BCAA3C700922.dita"><apiname>RBTrace</apiname></xref> object
and calls its functions. </p> </li>
<li id="GUID-B281CDB4-BB6A-5952-8796-42225F9099C9"><p> <xref href="GUID-E194EFBC-9D8C-3E39-9556-452F8D2F26AC.dita"><apiname>TBTraceBuffer</apiname></xref> </p> <p>A
class which encapsulates the buffer to which trace data is written. </p> </li>
</ul> </section>
<section id="GUID-FDEC494D-7379-4AA7-85DE-76FEAE02AB0D"><title>Using Kernel Trace tool variant device driver</title> <p>The
use of the kernel trace tool API is covered in the Kernel Trace Tool Tutorial </p> </section>
</conbody><related-links>
<link href="GUID-7EA3FAD3-9A41-5B2D-8F46-8C8965CE8B97.dita"><linktext>BTraceX Overview</linktext>
</link>
<link href="GUID-55C05441-33B5-5057-971D-4200345E941E.dita"><linktext>BTraceC Tutorial</linktext>
</link>
<link href="GUID-F27F49B3-4AC1-5517-AF3A-1ADBA1E87A0B.dita"><linktext> Command
Line Kernel Trace Tool Overview</linktext></link>
<link href="GUID-9E0957A1-0691-5741-ABCA-3EA61B4AC0CD.dita"><linktext>Command Line
Kernel Trace Tool Tutorial</linktext></link>
<link href="GUID-5CEA46BA-5AA2-51B4-8BBA-5B6EF141D68A.dita"><linktext> Reading
Kernel Trace Data From Chunks Tutorial</linktext></link>
<link href="GUID-7195C3C2-6DF4-56DE-B3C7-00CC10A22AD2.dita"><linktext>Writing Trace
Data to Buffers Tutorial</linktext></link>
<link href="GUID-625A116D-185D-57A3-9FB7-B8257F4AB1B2.dita"><linktext> Setting
Trace Filters Tutorial</linktext></link>
<link href="GUID-2341CFE1-1CDF-537A-99FB-78C59FFA30CE.dita"><linktext> Requesting
Data Notification Tutorial</linktext></link>
</related-links></concept>