[NTOS:CC] Fix some debug prints

svn path=/trunk/; revision=65830
This commit is contained in:
Hervé Poussineau 2014-12-26 11:38:31 +00:00
parent 373fb8c25c
commit 723f55af2c
3 changed files with 31 additions and 50 deletions

View file

@ -230,14 +230,13 @@ CcInitializeCacheMap(IN PFILE_OBJECT FileObject,
RtlCopyMemory(&Map->Callbacks, Callbacks, sizeof(*Callbacks));
/* For now ... */
DPRINT("FileSizes->ValidDataLength %08x%08x\n",
FileSizes->ValidDataLength.HighPart,
FileSizes->ValidDataLength.LowPart);
DPRINT("FileSizes->ValidDataLength %I64x\n",
FileSizes->ValidDataLength.QuadPart);
InitializeListHead(&Map->AssociatedBcb);
InitializeListHead(&Map->PrivateCacheMaps);
InsertTailList(&CcpAllSharedCacheMaps, &Map->Entry);
DPRINT("New Map %x\n", Map);
DPRINT("New Map %p\n", Map);
}
/* We don't have a private cache map. Link it with the shared cache map
to serve as a held reference. When the list in the shared cache map
@ -423,11 +422,9 @@ CcZeroData(IN PFILE_OBJECT FileObject,
PVOID PinnedBcb, PinnedBuffer;
PNOCC_CACHE_MAP Map = FileObject->SectionObjectPointer->SharedCacheMap;
DPRINT("S %08x%08x E %08x%08x\n",
StartOffset->u.HighPart,
StartOffset->u.LowPart,
EndOffset->u.HighPart,
EndOffset->u.LowPart);
DPRINT("S %I64x E %I64x\n",
StartOffset->QuadPart,
EndOffset->QuadPart);
if (!Map)
{
@ -449,9 +446,8 @@ CcZeroData(IN PFILE_OBJECT FileObject,
ToWrite = MIN(UpperBound.QuadPart - LowerBound.QuadPart,
(PAGE_SIZE - LowerBound.QuadPart) & (PAGE_SIZE - 1));
DPRINT("Zero last half %08x%08x %x\n",
Target.u.HighPart,
Target.u.LowPart,
DPRINT("Zero last half %I64x %lx\n",
Target.QuadPart,
ToWrite);
Status = MiSimpleRead(FileObject,
@ -467,7 +463,7 @@ CcZeroData(IN PFILE_OBJECT FileObject,
RtlRaiseStatus(Status);
}
DPRINT1("RtlZeroMemory(%x,%x)\n",
DPRINT1("RtlZeroMemory(%p, %lx)\n",
ZeroBuf + LowerBound.QuadPart - Target.QuadPart,
ToWrite);
@ -494,9 +490,8 @@ CcZeroData(IN PFILE_OBJECT FileObject,
while (UpperBound.QuadPart - Target.QuadPart > PAGE_SIZE)
{
DPRINT("Zero full page %08x%08x\n",
Target.u.HighPart,
Target.u.LowPart);
DPRINT("Zero full page %I64x\n",
Target.QuadPart);
Status = MiSimpleWrite(FileObject,
&Target,
@ -515,9 +510,8 @@ CcZeroData(IN PFILE_OBJECT FileObject,
if (UpperBound.QuadPart > Target.QuadPart)
{
ToWrite = UpperBound.QuadPart - Target.QuadPart;
DPRINT("Zero first half %08x%08x %x\n",
Target.u.HighPart,
Target.u.LowPart,
DPRINT("Zero first half %I64x %lx\n",
Target.QuadPart,
ToWrite);
Status = MiSimpleRead(FileObject,
@ -563,10 +557,9 @@ CcZeroData(IN PFILE_OBJECT FileObject,
if (Bcb->FileOffset.QuadPart + Bcb->Length >= LowerBound.QuadPart &&
Bcb->FileOffset.QuadPart < UpperBound.QuadPart)
{
DPRINT("Bcb #%x (@%08x%08x)\n",
DPRINT("Bcb #%x (@%I64x)\n",
Bcb - CcCacheSections,
Bcb->FileOffset.u.HighPart,
Bcb->FileOffset.u.LowPart);
Bcb->FileOffset.QuadPart);
Target.QuadPart = MAX(Bcb->FileOffset.QuadPart,
LowerBound.QuadPart);

View file

@ -486,10 +486,9 @@ CcpMapData(IN PFILE_OBJECT FileObject,
return FALSE;
}
DPRINT("CcMapData(F->%x,%08x%08x:%d)\n",
DPRINT("CcMapData(F->%x, %I64x:%d)\n",
FileObject,
FileOffset->HighPart,
FileOffset->LowPart,
FileOffset->QuadPart,
Length);
ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
@ -510,10 +509,9 @@ CcpMapData(IN PFILE_OBJECT FileObject,
*BcbResult = Bcb;
*Buffer = ((PCHAR)Bcb->BaseAddress) + (int)(FileOffset->QuadPart - Bcb->FileOffset.QuadPart);
DPRINT("Bcb #%x Buffer maps (%08x%08x) At %x Length %x (Getting %x:%x) %wZ\n",
DPRINT("Bcb #%x Buffer maps (%I64x) At %x Length %x (Getting %p:%x) %wZ\n",
Bcb - CcCacheSections,
Bcb->FileOffset.HighPart,
Bcb->FileOffset.LowPart,
Bcb->FileOffset.QuadPart,
Bcb->BaseAddress,
Bcb->Length,
*Buffer,
@ -524,9 +522,8 @@ CcpMapData(IN PFILE_OBJECT FileObject,
goto cleanup;
}
DPRINT("File size %08x%08x\n",
Map->FileSizes.ValidDataLength.HighPart,
Map->FileSizes.ValidDataLength.LowPart);
DPRINT("File size %I64x\n",
Map->FileSizes.ValidDataLength.QuadPart);
/* Not all files have length, in fact filesystems often use stream file
objects for various internal purposes and are loose about the file
@ -635,7 +632,6 @@ retry:
* in the NOCC_CACHE_MAP.
*/
Success = TRUE;
//DPRINT("w1n\n");
Bcb->Length = MIN(Map->FileSizes.ValidDataLength.QuadPart - Target.QuadPart,
CACHE_STRIPE);
@ -649,10 +645,9 @@ retry:
*Buffer = ((PCHAR)Bcb->BaseAddress) + (int)(FileOffset->QuadPart - Bcb->FileOffset.QuadPart);
FaultIn = TRUE;
DPRINT("Bcb #%x Buffer maps (%08x%08x) At %x Length %x (Getting %x:%x) %wZ\n",
DPRINT("Bcb #%x Buffer maps (%I64x) At %x Length %x (Getting %p:%lx) %wZ\n",
Bcb - CcCacheSections,
Bcb->FileOffset.HighPart,
Bcb->FileOffset.LowPart,
Bcb->FileOffset.QuadPart,
Bcb->BaseAddress,
Bcb->Length,
*Buffer,
@ -663,8 +658,6 @@ retry:
ASSERT((EndInterval.QuadPart & ~(CACHE_STRIPE - 1)) ==
(Bcb->FileOffset.QuadPart & ~(CACHE_STRIPE - 1)));
//DPRINT("TERM!\n");
cleanup:
CcpUnlock();
if (Success)
@ -675,10 +668,9 @@ cleanup:
ULONG i;
PCHAR FaultIn = Bcb->BaseAddress;
DPRINT("Faulting in pages at this point: file %wZ %08x%08x:%x\n",
DPRINT("Faulting in pages at this point: file %wZ %I64x:%x\n",
&FileObject->FileName,
Bcb->FileOffset.HighPart,
Bcb->FileOffset.LowPart,
Bcb->FileOffset.QuadPart,
Bcb->Length);
for (i = 0; i < Bcb->Length; i += PAGE_SIZE)
@ -873,15 +865,14 @@ CcPreparePinWrite(IN PFILE_OBJECT FileObject,
if (Zero)
{
DPRINT("Zero fill #%x %08x%08x:%x Buffer %x %wZ\n",
DPRINT("Zero fill #%x %I64x:%x Buffer %x %wZ\n",
RealBcb - CcCacheSections,
FileOffset->u.HighPart,
FileOffset->u.LowPart,
FileOffset->QuadPart,
Length,
*Buffer,
&FileObject->FileName);
DPRINT1("RtlZeroMemory(%x,%x)\n", *Buffer, Length);
DPRINT1("RtlZeroMemory(%p, %lx)\n", *Buffer, Length);
RtlZeroMemory(*Buffer, Length);
}
}

View file

@ -389,7 +389,7 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
FileSizes.ValidDataLength = FileInfo.EndOfFile;
FileSizes.FileSize = FileInfo.EndOfFile;
}
DPRINT("Got %08x\n", FileSizes.ValidDataLength.u.LowPart);
DPRINT("Got %I64x\n", FileSizes.ValidDataLength.QuadPart);
/*
* FIXME: Revise this once a locking order for file size changes is
@ -399,15 +399,12 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
*/
if (UMaximumSize != NULL && UMaximumSize->QuadPart)
{
DPRINT("Taking maximum %x\n", UMaximumSize->LowPart);
DPRINT("Taking maximum %I64x\n", UMaximumSize->QuadPart);
MaximumSize.QuadPart = UMaximumSize->QuadPart;
}
else
{
DPRINT("Got file size %08x%08x\n",
FileSizes.FileSize.u.HighPart,
FileSizes.FileSize.u.LowPart);
DPRINT("Got file size %I64x\n", FileSizes.FileSize.QuadPart);
MaximumSize.QuadPart = FileSizes.FileSize.QuadPart;
}