Adaptation/GUID-C8DF0CB0-92F4-5F9E-A8F1-7DE50954C4F1.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?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-C8DF0CB0-92F4-5F9E-A8F1-7DE50954C4F1" xml:lang="en"><title>Debugging
the PRM</title><shortdesc>This document describes how to debug the PRM using internal macros.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-CA939F43-E904-4285-9CBA-BB0D9767555A"><title>Purpose</title> <p>Use the provided KTrace and BTrace macros
to debug your PRM implementation. </p> <p><b>Introduction</b> </p> <p>These
kernel services allow you to generate and capture trace information in a manner
designed to minimise the impact on a running system. </p> </section>
<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
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("&gt;DH4PowerResourceController::DoInitController\n”))</codeblock> </section>
<section id="GUID-4476C500-FAB6-5A2F-B3E0-F85A171A59B3"><title>Using the kernel
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>,
and a number of sub categories are defined and used to trace the progress
of all operations on the PRM. All tracing sub categories are wrapped with
a macro definition. Implement macro definitions in <filepath>e32\include\drivers\rescontrol_trace.h</filepath> to
replace <codeph>BTrace</codeph> with other tracing methods. </p> </section>
</conbody><related-links>
<link href="GUID-2ECF13A1-9D56-5740-A09F-8267E6A45DD9.dita"><linktext>Porting the
Power Resource Manager</linktext></link>
<link href="GUID-B1CE51BC-B452-5FC9-9C00-35447AF40671.dita"><linktext>Implement
the controllable power resources</linktext></link>
<link href="GUID-66FD040B-133E-57CF-80DD-9369F62709C6.dita"><linktext>Implement
the PSL for the target</linktext></link>
<link href="GUID-E7F91A65-235D-589C-9A8C-0B207D19A24B.dita"><linktext>Port client
drivers to use the PRM</linktext></link>
<link href="GUID-66E5F769-1156-54CA-94BC-8912159A1240.dita"><linktext>Testing the
PRM PSL</linktext></link>
</related-links></concept>