[ros-dev] [ros-diffs] [sginsberg] 36428: - Add basic tracing to CmpReferenceKeyControlBlock, CmpDereferenceKeyControlBlock and CmpDereferenceKeyControlBlockWithLock

Aleksey Bragin aleksey at reactos.org
Tue Sep 23 22:03:00 CEST 2008


All other modules have tracing compiled in by default (OB, PS, IO,  
etc), so CM may not be an exception. As for spamming debug log,  
CmpTraceLevel is set to 0, so no output goes into the debug log by  
default.

I misread this in the beginning too, and complained to Stefan without  
a reason.


WBR,
Aleksey.


On Sep 23, 2008, at 7:53 PM, Alex Ionescu wrote:

> Do you think you could maybe turn OFF debugging by default so that not
> every build gets spammed with this code?
>
> On 23-Sep-08, at 10:15 AM, sginsberg at svn.reactos.org wrote:
>
>> Author: sginsberg
>> Date: Tue Sep 23 09:15:56 2008
>> New Revision: 36428
>>
>> URL: http://svn.reactos.org/svn/reactos?rev=36428&view=rev
>> Log:
>> - Add basic tracing to CmpReferenceKeyControlBlock,
>> CmpDereferenceKeyControlBlock and
>> CmpDereferenceKeyControlBlockWithLock
>>
>> Modified:
>>    trunk/reactos/ntoskrnl/config/cmkcbncb.c
>>
>> Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c
>> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ 
>> config/cmkcbncb.c?rev=36428&r1=36427&r2=36428&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ===================================================================== 
>> =
>> --- trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] (original)
>> +++ trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] Tue Sep 23
>> 09:15:56 2008
>> @@ -354,6 +354,9 @@
>> NTAPI
>> CmpReferenceKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb)
>> {
>> +    CMTRACE(CM_REFERENCE_DEBUG,
>> +            "%s - Referencing KCB: %p\n", __FUNCTION__, Kcb);
>> +
>>     /* Check if this is the KCB's first reference */
>>     if (Kcb->RefCount == 0)
>>     {
>> @@ -570,6 +573,8 @@
>> {
>>     LONG OldRefCount, NewRefCount;
>>     ULONG ConvKey;
>> +    CMTRACE(CM_REFERENCE_DEBUG,
>> +            "%s - Dereferencing KCB: %p\n", __FUNCTION__, Kcb);
>>
>>     /* Get the ref count and update it */
>>     OldRefCount = *(PLONG)&Kcb->RefCount;
>> @@ -602,6 +607,9 @@
>> CmpDereferenceKeyControlBlockWithLock(IN PCM_KEY_CONTROL_BLOCK Kcb,
>>                                       IN BOOLEAN LockHeldExclusively)
>> {
>> +    CMTRACE(CM_REFERENCE_DEBUG,
>> +            "%s - Dereferencing KCB: %p\n", __FUNCTION__, Kcb);
>> +
>>     /* Sanity check */
>>     ASSERT_KCB_VALID(Kcb);
>>
>>
>
> Best regards,
> Alex Ionescu
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev



More information about the Ros-dev mailing list