|
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-C8DF0CB0-92F4-5F9E-A8F1-7DE50954C4F1" xml:lang="en"><title>Debugging |
|
13 the PRM</title><shortdesc>This document describes how to debug the PRM using internal macros.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-CA939F43-E904-4285-9CBA-BB0D9767555A"><title>Purpose</title> <p>Use the provided KTrace and BTrace macros |
|
15 to debug your PRM implementation. </p> <p><b>Introduction</b> </p> <p>These |
|
16 kernel services allow you to generate and capture trace information in a manner |
|
17 designed to minimise the impact on a running system. </p> </section> |
|
18 <section id="GUID-86D96673-D319-4791-9256-E3C79B8CCA26"><title>Using KTrace </title> <p>Use the <xref href="GUID-C4D86928-8806-3FF4-AE84-F2846B846B73.dita"><apiname>KTRACE</apiname></xref> macro |
|
19 with <codeph>KRESMANAGER</codeph> for debug print messages in the code. </p> <codeblock id="GUID-D193E79B-5908-5419-AAD1-69C1FA223B08" xml:space="preserve">__KTRACE_OPT(KRESMANAGER,Kern::Printf(">DH4PowerResourceController::DoInitController\n”))</codeblock> </section> |
|
20 <section id="GUID-4476C500-FAB6-5A2F-B3E0-F85A171A59B3"><title>Using the kernel |
|
21 trace tool</title> <p>The <codeph>BTRACE</codeph> category, <xref href="GUID-24FEA283-108A-3693-8DA6-C2A85CB11DB0.dita#GUID-24FEA283-108A-3693-8DA6-C2A85CB11DB0/GUID-3E994A9D-6849-31FB-80B6-088ED5E0C7B9"><apiname>TCategory::EResourceManager</apiname></xref>, |
|
22 and a number of sub categories are defined and used to trace the progress |
|
23 of all operations on the PRM. All tracing sub categories are wrapped with |
|
24 a macro definition. Implement macro definitions in <filepath>e32\include\drivers\rescontrol_trace.h</filepath> to |
|
25 replace <codeph>BTrace</codeph> with other tracing methods. </p> </section> |
|
26 </conbody><related-links> |
|
27 <link href="GUID-2ECF13A1-9D56-5740-A09F-8267E6A45DD9.dita"><linktext>Porting the |
|
28 Power Resource Manager</linktext></link> |
|
29 <link href="GUID-B1CE51BC-B452-5FC9-9C00-35447AF40671.dita"><linktext>Implement |
|
30 the controllable power resources</linktext></link> |
|
31 <link href="GUID-66FD040B-133E-57CF-80DD-9369F62709C6.dita"><linktext>Implement |
|
32 the PSL for the target</linktext></link> |
|
33 <link href="GUID-E7F91A65-235D-589C-9A8C-0B207D19A24B.dita"><linktext>Port client |
|
34 drivers to use the PRM</linktext></link> |
|
35 <link href="GUID-66E5F769-1156-54CA-94BC-8912159A1240.dita"><linktext>Testing the |
|
36 PRM PSL</linktext></link> |
|
37 </related-links></concept> |