Add DEBUGLOG() calls in ldm helpers
This commit is contained in:
parent
10647924f1
commit
429dec4f42
@ -849,6 +849,8 @@ static void ldm_getNextMatchAndUpdateSeqStore(rawSeqStore_t* ldmSeqStore,
|
|||||||
ldmSeqStore->posInSequence = 0;
|
ldmSeqStore->posInSequence = 0;
|
||||||
ldmSeqStore->pos++;
|
ldmSeqStore->pos++;
|
||||||
}
|
}
|
||||||
|
DEBUGLOG(6, "ldm_getNextMatchAndUpdateSeqStore(): got an ldm that beginning at pos: %u, end at pos: %u, with offset: %u",
|
||||||
|
*matchStartPosInBlock, *matchEndPosInBlock, *matchOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ldm_maybeAddLdm():
|
/* ldm_maybeAddLdm():
|
||||||
@ -870,6 +872,8 @@ static void ldm_maybeAddLdm(ZSTD_match_t* matches, U32* nbMatches,
|
|||||||
candidateMatchLength < MINMATCH)
|
candidateMatchLength < MINMATCH)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
DEBUGLOG(6, "ldm_maybeAddLdm(): Adding ldm candidate match (offCode: %u matchLength %u) at block position=%u",
|
||||||
|
candidateOffCode, candidateMatchLength, currPosInBlock);
|
||||||
if (*nbMatches == 0) {
|
if (*nbMatches == 0) {
|
||||||
matches[*nbMatches].len = candidateMatchLength;
|
matches[*nbMatches].len = candidateMatchLength;
|
||||||
matches[*nbMatches].off = candidateOffCode;
|
matches[*nbMatches].off = candidateOffCode;
|
||||||
@ -985,14 +989,14 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms,
|
|||||||
U32 ldmStartPosInBlock = 0;
|
U32 ldmStartPosInBlock = 0;
|
||||||
U32 ldmEndPosInBlock = 0;
|
U32 ldmEndPosInBlock = 0;
|
||||||
U32 ldmOffset = 0;
|
U32 ldmOffset = 0;
|
||||||
|
|
||||||
/* Get first match from ldm seq store if long mode is enabled */
|
/* Get first match from ldm seq store if long mode is enabled */
|
||||||
if (ms->ldmSeqStore.size > 0 && ms->ldmSeqStore.pos < ms->ldmSeqStore.size) {
|
if (ms->ldmSeqStore.size > 0 && ms->ldmSeqStore.pos < ms->ldmSeqStore.size) {
|
||||||
ldm_getNextMatchAndUpdateSeqStore(&ms->ldmSeqStore, &ldmStartPosInBlock,
|
ldm_getNextMatchAndUpdateSeqStore(&ms->ldmSeqStore, &ldmStartPosInBlock,
|
||||||
&ldmEndPosInBlock, &ldmOffset,
|
&ldmEndPosInBlock, &ldmOffset,
|
||||||
(U32)(ip-istart), (U32)(iend-ip));
|
(U32)(ip-istart), (U32)(iend-ip));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* init */
|
/* init */
|
||||||
DEBUGLOG(5, "ZSTD_compressBlock_opt_generic: current=%u, prefix=%u, nextToUpdate=%u",
|
DEBUGLOG(5, "ZSTD_compressBlock_opt_generic: current=%u, prefix=%u, nextToUpdate=%u",
|
||||||
(U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate);
|
(U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate);
|
||||||
|
@ -1343,8 +1343,6 @@ optCSize19=$(datagen -g2M | zstd -19 -c | wc -c)
|
|||||||
longCSize19=$(datagen -g2M | zstd -19 --long -c | wc -c)
|
longCSize19=$(datagen -g2M | zstd -19 --long -c | wc -c)
|
||||||
optCSize19wlog23=$(datagen -g2M | zstd -19 -c --zstd=wlog=23 | wc -c)
|
optCSize19wlog23=$(datagen -g2M | zstd -19 -c --zstd=wlog=23 | wc -c)
|
||||||
longCSize19wlog23=$(datagen -g2M | zstd -19 -c --long=23 | wc -c)
|
longCSize19wlog23=$(datagen -g2M | zstd -19 -c --long=23 | wc -c)
|
||||||
optCSize19wlog27=$(datagen -g5M | zstd -19 -c --zstd=wlog=27 | wc -c)
|
|
||||||
longCSize19wlog27=$(datagen -g5M | zstd -19 -c --long=27 | wc -c)
|
|
||||||
optCSize22=$(datagen -g900K | zstd -22 --ultra -c | wc -c)
|
optCSize22=$(datagen -g900K | zstd -22 --ultra -c | wc -c)
|
||||||
longCSize22=$(datagen -g900K | zstd -22 --ultra --long -c | wc -c)
|
longCSize22=$(datagen -g900K | zstd -22 --ultra --long -c | wc -c)
|
||||||
if [ "$longCSize16" -gt "$optCSize16" ]; then
|
if [ "$longCSize16" -gt "$optCSize16" ]; then
|
||||||
@ -1356,9 +1354,6 @@ elif [ "$longCSize19" -gt "$optCSize19" ]; then
|
|||||||
elif [ "$longCSize19wlog23" -gt "$optCSize19wlog23" ]; then
|
elif [ "$longCSize19wlog23" -gt "$optCSize19wlog23" ]; then
|
||||||
echo using --long on compression level 19 with wLog=23 should not cause compressed size regression
|
echo using --long on compression level 19 with wLog=23 should not cause compressed size regression
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$longCSize19wlog27" -gt "$optCSize19wlog27" ]; then
|
|
||||||
echo using --long on compression level 19 with wLog=27 should not cause compressed size regression
|
|
||||||
exit 1
|
|
||||||
elif [ "$longCSize22" -gt "$optCSize22" ]; then
|
elif [ "$longCSize22" -gt "$optCSize22" ]; then
|
||||||
echo using --long on compression level 22 should not cause compressed size regression
|
echo using --long on compression level 22 should not cause compressed size regression
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user