A disabled debug helper to visualize reads/writes and if they would have been
contiguous. Was used to optimized CD boot before the alpha release. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33521 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6e6b0851ca
commit
3e12a70b0d
@ -126,6 +126,29 @@ scsi_read_write_6(scsi_ccb *request)
|
||||
cdb->length = B_HOST_TO_BENDIAN_INT16((uint16)cmd->length);
|
||||
cdb->control = cmd->control;
|
||||
|
||||
if (0) {
|
||||
static uint32 lastLBA = 0;
|
||||
static uint16 lastLength = 0;
|
||||
static uint32 contigCount = 0;
|
||||
static uint64 totalContig = 0;
|
||||
|
||||
uint32 currentLBA = B_BENDIAN_TO_HOST_INT32(cdb->lba);
|
||||
uint16 currentLength = B_BENDIAN_TO_HOST_INT16(cdb->length);
|
||||
|
||||
if (lastLBA + lastLength == currentLBA) {
|
||||
contigCount++;
|
||||
totalContig++;
|
||||
} else
|
||||
contigCount = 0;
|
||||
|
||||
lastLBA = currentLBA;
|
||||
lastLength = currentLength;
|
||||
|
||||
dprintf("scsi_read_write_6: %lld lba %ld; length: %d\n", totalContig,
|
||||
B_BENDIAN_TO_HOST_INT32(cdb->lba),
|
||||
B_BENDIAN_TO_HOST_INT16(cdb->length));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user