mirror of
https://github.com/facebook/zstd.git
synced 2025-10-09 00:05:28 -04:00
updating debug statements again
This commit is contained in:
parent
d3d759301f
commit
8328f8192a
@ -396,7 +396,7 @@ static void* compressionThread(void* arg)
|
|||||||
for ( ; ; ) {
|
for ( ; ; ) {
|
||||||
unsigned const currJobIndex = currJob % ctx->numJobs;
|
unsigned const currJobIndex = currJob % ctx->numJobs;
|
||||||
jobDescription* job = &ctx->jobs[currJobIndex];
|
jobDescription* job = &ctx->jobs[currJobIndex];
|
||||||
DEBUG(3, "compressionThread(): waiting on job ready\n");
|
DEBUG(2, "starting compression for job %u\n", currJob);
|
||||||
|
|
||||||
{
|
{
|
||||||
/* check if compression thread will have to wait */
|
/* check if compression thread will have to wait */
|
||||||
@ -413,7 +413,7 @@ static void* compressionThread(void* arg)
|
|||||||
|
|
||||||
|
|
||||||
if (willWaitForCreate || willWaitForWrite) {
|
if (willWaitForCreate || willWaitForWrite) {
|
||||||
DEBUG(2, "compression will wait for create or write\n");
|
DEBUG(2, "compression will wait for create or write on job %u\n", currJob);
|
||||||
|
|
||||||
pthread_mutex_lock(&ctx->createCompletion_mutex.pMutex);
|
pthread_mutex_lock(&ctx->createCompletion_mutex.pMutex);
|
||||||
ctx->compressWaitCreateCompletion = ctx->createCompletion;
|
ctx->compressWaitCreateCompletion = ctx->createCompletion;
|
||||||
@ -534,7 +534,7 @@ static void* compressionThread(void* arg)
|
|||||||
DEBUG(3, "all jobs finished compressing\n");
|
DEBUG(3, "all jobs finished compressing\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
DEBUG(2, "finished compressing job %u\n", currJob);
|
||||||
currJob++;
|
currJob++;
|
||||||
}
|
}
|
||||||
return arg;
|
return arg;
|
||||||
@ -567,7 +567,7 @@ static void* outputThread(void* arg)
|
|||||||
for ( ; ; ) {
|
for ( ; ; ) {
|
||||||
unsigned const currJobIndex = currJob % ctx->numJobs;
|
unsigned const currJobIndex = currJob % ctx->numJobs;
|
||||||
jobDescription* job = &ctx->jobs[currJobIndex];
|
jobDescription* job = &ctx->jobs[currJobIndex];
|
||||||
DEBUG(3, "outputThread(): waiting on job compressed\n");
|
DEBUG(2, "starting write for job %u\n", currJob);
|
||||||
pthread_mutex_lock(&ctx->jobCompressed_mutex.pMutex);
|
pthread_mutex_lock(&ctx->jobCompressed_mutex.pMutex);
|
||||||
while (currJob + 1 > ctx->jobCompressedID && !ctx->threadError) {
|
while (currJob + 1 > ctx->jobCompressedID && !ctx->threadError) {
|
||||||
pthread_mutex_lock(&ctx->compressionCompletion_mutex.pMutex);
|
pthread_mutex_lock(&ctx->compressionCompletion_mutex.pMutex);
|
||||||
@ -638,6 +638,7 @@ static void* outputThread(void* arg)
|
|||||||
pthread_mutex_unlock(&ctx->allJobsCompleted_mutex.pMutex);
|
pthread_mutex_unlock(&ctx->allJobsCompleted_mutex.pMutex);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
DEBUG(2, "finished writing job %u\n", currJob);
|
||||||
currJob++;
|
currJob++;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -738,6 +739,7 @@ static int performCompression(adaptCCtx* ctx, FILE* const srcFile, outputThreadA
|
|||||||
size_t const readBlockSize = 1 << 15;
|
size_t const readBlockSize = 1 << 15;
|
||||||
size_t remaining = FILE_CHUNK_SIZE;
|
size_t remaining = FILE_CHUNK_SIZE;
|
||||||
|
|
||||||
|
DEBUG(2, "starting creation of job %u\n", currJob);
|
||||||
while (remaining != 0 && !feof(srcFile)) {
|
while (remaining != 0 && !feof(srcFile)) {
|
||||||
size_t const ret = fread(ctx->input.buffer.start + ctx->input.filled + pos, 1, readBlockSize, srcFile);
|
size_t const ret = fread(ctx->input.buffer.start + ctx->input.filled + pos, 1, readBlockSize, srcFile);
|
||||||
if (ret != readBlockSize && !feof(srcFile)) {
|
if (ret != readBlockSize && !feof(srcFile)) {
|
||||||
@ -768,6 +770,7 @@ static int performCompression(adaptCCtx* ctx, FILE* const srcFile, outputThreadA
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DEBUG(2, "finished creating job %u\n", currJob);
|
||||||
currJob++;
|
currJob++;
|
||||||
if (feof(srcFile)) {
|
if (feof(srcFile)) {
|
||||||
DEBUG(3, "THE STREAM OF DATA ENDED %u\n", ctx->nextJobID);
|
DEBUG(3, "THE STREAM OF DATA ENDED %u\n", ctx->nextJobID);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user