Symbian3/SDK/Source/GUID-49700B0C-AEDD-50EB-874E-45025CF474BE.dita
changeset 13 48780e181b38
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
       
     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 xml:lang="en" id="GUID-49700B0C-AEDD-50EB-874E-45025CF474BE"><title>Debug Logging</title><prolog><metadata><keywords/></metadata></prolog><conbody><section id="GUID-4F238A4E-5F05-5F19-9D19-7115230862BA"><title>Overview</title> <p>There are three types of debug logging which can be enabled for the server. Each of these types of debug logging is activated by enabling one of the following macros in the server’s MMP file (<i>app-engines\cntmodel\cntsrv\cntsrv.mmp</i>): </p> <ul><li id="GUID-377DBA1D-6B3D-5CE9-92D9-EEBD9915724D"><codeblock id="GUID-5635FF72-67B9-56BC-97ED-7A164C4B261A" xml:space="preserve">__VERBOSE_DEBUG__</codeblock> </li> <li id="GUID-C6103CA8-1AEC-5769-BA65-B69B2AA1B916"><codeblock id="GUID-88FEACA0-8CBE-5302-B80F-43DCECD7FA94" xml:space="preserve">__STATE_MACHINE_DEBUG__</codeblock> </li> <li id="GUID-69685730-A605-545C-9407-4387115AF75B"><codeblock id="GUID-1BBD7BA7-B7FA-5528-9C47-73D2B045FDEA" xml:space="preserve">__PROFILE_DEBUG__</codeblock> </li> </ul> </section> <section id="GUID-672BBB65-8B98-5BF3-8CF3-05176843F575"><title>Verbose Debug Logging</title> <p>Enabling the <i>__VERBOSE_DEBUG__</i> macro activates a variety of debug logging. </p> <p id="GUID-D0D365AB-7F28-5939-BBE5-826982FD1CC6"><b>IPC Calls</b> </p> <p>One of the more useful forms of verbose debug logging is for IPC calls. The following type of debug is emitted for each IPC call received by a session on the server: </p> <codeblock id="GUID-4525B398-ED81-55EE-A2F5-67639DCA326A" xml:space="preserve">IPC: ECntCompress, SessId: 4, ErrCode: 0</codeblock> <p>The debug indicates the IPC call op-code and the ID of the session that is handling the IPC call. The error code will always be 0 in this case. </p> <p>If an IPC call leaves on the server then the following type of debug is emitted: </p> <codeblock id="GUID-DDB9CA30-1760-51CF-A1C2-872546EFDABD" xml:space="preserve">IPC_ERROR: ECntCompress, SessId: 4, ErrCode: -4</codeblock> <p>The debug indicates the IPC call op-code, the ID of the session that is handling the IPC call and the error code for the leave. </p> <p id="GUID-B627FD66-32A9-5355-8645-E93771F1B0AF"><b>Database Events</b> </p> <p>Another useful form of verbose debug logging is for database events. The following type of debug is emitted for each database event that is queued by the server: </p> <codeblock id="GUID-5F97AB09-9A1B-5D3D-8B74-70C02C709476" xml:space="preserve">-&gt;Q: Message: EContactDbObserverEventContactAdded, ContactID: 2, ConnectionId: 2</codeblock> <p>For each event that is transferred from the server to the client the following type of debug is emitted: </p> <codeblock id="GUID-5A56C86E-90D4-50CE-9813-E08C25D8A61A" xml:space="preserve">Q-&gt;: Message: EContactDbObserverEventContactAdded, ContactID: 1, ConnectionId: 2</codeblock> </section> <section id="GUID-A09AB738-EE96-5D09-A4C3-75E504F59AE5"><title>State Machine Debug Logging</title> <p>Enabling the <i>__STATE_MACHINE_DEBUG__</i> macro activates state machine transition debug logging. </p> <p>Each time the state machine changes state a line of debug will be emitted. This indicates between which states the state machine is making a transition. For example: </p> <codeblock id="GUID-1BE1EE6D-B76C-5CE5-860B-B8073B53C7FA" xml:space="preserve">STA: EStateClosed --&gt; EStateOpening</codeblock> <p>This indicates that the state machine is in transition between the Closed and Opening states. </p> </section> <section id="GUID-D588A28C-5027-5CA6-A8BC-7E91AA96F3F7"><title>Profile Debug Logging</title> <p>Enabling the <i>__PROFILE_DEBUG__</i> macro activates profile debug logging. This form of debug logging indicates which methods are being called in order to identify paths of execution for optimisation. For example: </p> <codeblock id="GUID-88C4F17A-CE37-5BBB-9756-ED8443FBDEA3" xml:space="preserve">MTD: CCntSession::ServiceL
       
    13 MTD: CCntSession::CntItemManagerL
       
    14 MTD: CCntSession::ServiceL
       
    15 MTD: CCntSession::CntItemManagerL
       
    16 MTD: CCntSession::ServiceL
       
    17 MTD: CCntSession::CntItemManagerL
       
    18 MTD: CCntStateMachine::ProcessRequestL
       
    19 MTD: CCntStateMachine::HandleDatabaseEventL
       
    20 MTD: CCntSession::ServiceL
       
    21 MTD: CCntSession::CntItemManagerL
       
    22 MTD: CCntStateMachine::ProcessRequestL
       
    23 MTD: CCntStateMachine::HandleDatabaseEventL
       
    24 MTD: CCntSession::ServiceL
       
    25 MTD: CCntSession::CntItemManagerL
       
    26 MTD: CCntStateMachine::ProcessRequestL 
       
    27 MTD: CCntStateMachine::HandleDatabaseEventL
       
    28 MTD: CCntSession::ServiceL 
       
    29 MTD: CCntSession::CntItemManagerL
       
    30 MTD: CCntStateMachine::ProcessRequestL 
       
    31 MTD: CCntStateMachine::HandleDatabaseEventL
       
    32 MTD: CCntSession::ServiceL 
       
    33 MTD: CCntSession::CntItemManagerL 
       
    34 MTD: CCntStateMachine::ProcessRequestL
       
    35 MTD: CCntStateMachine::HandleDatabaseEventL
       
    36 MTD: CCntSession::ServiceL
       
    37 MTD: CCntSession::CntItemManagerL</codeblock> <p>This table shows the methods called on the server when adding a series of contact items. </p> </section> </conbody></concept>