|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-625A116D-185D-57A3-9FB7-B8257F4AB1B2" xml:lang="en"><title>Setting |
|
13 Trace Filters Tutorial</title><shortdesc>Explains how to use the kernel trace tool API to filter trace data. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-09C81D5E-A9E0-46E1-8864-744B2B67925D"><title>Purpose</title> <p>Trace data is written to kernel side chunks. |
|
15 The kernel trace tool API can specify which trace data should be made available |
|
16 for further processing by setting filters. </p> </section> |
|
17 <section id="GUID-508D3D4E-955C-441A-A3BB-382EDD732410"><title>Intended audience</title> <p>This document is intended for |
|
18 third party developers writing a trace tool using the kernel trace tool component. </p></section> |
|
19 <section id="GUID-06E2BA5C-ADA0-40B9-A6C4-C002FE2073BF"><title>Required background</title> <p>The trace filters defined in <xref href="GUID-8919270A-B5CE-302D-B7CE-3A4680D5E8CF.dita"><apiname>EUser</apiname></xref>. |
|
20 The kernel trace tool component in general. </p></section> |
|
21 <section id="GUID-BC0711B7-3D4C-4342-B40A-E7EBCA1D6C83"><title>Introduction</title> <p>Setting trace filters is a short task |
|
22 which is performed in combination with related tasks as explained in <xref href="GUID-55C05441-33B5-5057-971D-4200345E941E.dita">Kernel Trace Tool Tutorial</xref>. </p></section> |
|
23 <section id="GUID-1585EA7A-1D16-4FA9-8FD3-994C7B6C972B"><title>Using Kernel Trace tool to set trace filters</title><p>The |
|
24 following tasks will be covered in this tutorial: </p> <ul> |
|
25 <li id="GUID-433E2116-7AB1-5FEB-B149-C1841244F47C"><p>Setting trace filters. </p> </li> |
|
26 </ul> </section> |
|
27 <section id="GUID-C8B11555-AD81-40A4-AE03-0AA8EE1D49DA"><title>Basic procedure</title><p>The high level steps to setting |
|
28 trace filters are shown here: </p> <ol id="GUID-47267A33-3AD7-549A-9824-9FD3CEDCE17E"> |
|
29 <li id="GUID-7BC999C6-CC55-5C7F-B77A-30867C8DCCF0"><p>Set a primary filter |
|
30 specifying a category of data and whether it is to be output or not. </p> </li> |
|
31 <li id="GUID-AC23ACAB-33A5-56E3-9A68-6EE9901F2C76"><p>Set a secondary filter |
|
32 if necessary. </p> </li> |
|
33 </ol> </section> |
|
34 <section id="GUID-1958FEEB-116F-4E03-B50B-515D1A913D64"><title>Using the API</title> <p>These are the function calls required |
|
35 to </p> <ol id="GUID-57ED60ED-1168-5AA5-8FB5-E26D3E56DC1A"> |
|
36 <li id="GUID-17C533B3-3B60-5E2B-A25E-F7FB1DB54823"><p>Call the <xref href="GUID-2A3BB97E-35F1-31A9-903F-3A3929524031.dita"><apiname>SetFilter()</apiname></xref> function |
|
37 of the <xref href="GUID-9E859841-E8A3-37D5-9A19-BCAA3C700922.dita"><apiname>RBTrace</apiname></xref> object. This function takes two arguments: </p> <ul> |
|
38 <li id="GUID-78E1D9B4-017C-561F-A60B-A7E114DDCECE"><p>An integer representing |
|
39 the trace category taken from the enumeration <xref href="GUID-5BF17780-AD31-30CF-AFD9-915CBDA74441.dita#GUID-5BF17780-AD31-30CF-AFD9-915CBDA74441/GUID-BAB451BE-11CF-3406-A2C4-242520615248"><apiname>BTrace::TCategories</apiname></xref>, |
|
40 and </p> </li> |
|
41 <li id="GUID-A384C0A9-C230-59DA-8FC6-017B6FC5B041"><p>A boolean, True if the |
|
42 trace category is to be output and False if it is not. </p> </li> |
|
43 </ul> </li> |
|
44 <li id="GUID-3211AD05-8222-5E3F-A4CB-55F474C1C4A6"><p>If you need a secondary |
|
45 trace filter, call the <xref href="GUID-EA3459A9-2DDF-3C4C-AC96-3061A9327B01.dita"><apiname>SetFilter2()</apiname></xref> function of the <xref href="GUID-9E859841-E8A3-37D5-9A19-BCAA3C700922.dita"><apiname>RBTrace</apiname></xref> object. </p> </li> |
|
46 </ol> </section> |
|
47 </conbody><related-links> |
|
48 <link><linktext/></link> |
|
49 <link href="GUID-7B477BA5-CC5B-56A2-82BC-E1BC0049FECB.dita"><linktext>Kernel Trace |
|
50 Tool Overview</linktext></link> |
|
51 <link href="GUID-55C05441-33B5-5057-971D-4200345E941E.dita"><linktext>Kernel Trace |
|
52 Tool Tutorial</linktext></link> |
|
53 </related-links></concept> |