@@ -348,9 +348,10 @@ void multiThreadedPageInBackground(DeferredFiles &deferred) {
348
348
using namespace std ::chrono;
349
349
static const size_t pageSize = Process::getPageSizeEstimate ();
350
350
static const size_t largeArchive = 10 * 1024 * 1024 ;
351
- static std::atomic_uint64_t totalBytes = 0 ;
352
- std::atomic_int index = 0 , included = 0 ;
351
+ std::atomic_int index = 0 ;
353
352
#ifndef NDEBUG
353
+ std::atomic_int numDeferedFilesTouched = 0 ;
354
+ static std::atomic_uint64_t totalBytes = 0 ;
354
355
auto t0 = high_resolution_clock::now ();
355
356
#endif
356
357
@@ -364,7 +365,7 @@ void multiThreadedPageInBackground(DeferredFiles &deferred) {
364
365
continue ;
365
366
#ifndef NDEBUG
366
367
totalBytes += buff.size ();
367
- included += 1 ;
368
+ numDeferedFilesTouched += 1 ;
368
369
#endif
369
370
370
371
// Reference all file's mmap'd pages to load them into memory.
@@ -377,8 +378,9 @@ void multiThreadedPageInBackground(DeferredFiles &deferred) {
377
378
#ifndef NDEBUG
378
379
auto dt = high_resolution_clock::now () - t0;
379
380
if (Process::GetEnv (" LLD_MULTI_THREAD_PAGE" ))
380
- std::cerr << " multiThreadedPageIn " << totalBytes << " /" << included << " /"
381
- << deferred.size () << " /" << std::setprecision (4 )
381
+ std::cerr << " multiThreadedPageIn " << totalBytes << " /"
382
+ << numDeferedFilesTouched << " /" << deferred.size () << " /"
383
+ << std::setprecision (4 )
382
384
<< duration_cast<milliseconds>(dt).count () / 1000 . << " \n " ;
383
385
#endif
384
386
}
0 commit comments