Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: src/heap/spaces.cc

Issue 1961893002: Instrument callers of Semaphore::Signal to help with investigation of (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/page-parallel-job.h ('k') | src/log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/base/platform/semaphore.h" 9 #include "src/base/platform/semaphore.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 349 }
350 350
351 class MemoryAllocator::Unmapper::UnmapFreeMemoryTask : public v8::Task { 351 class MemoryAllocator::Unmapper::UnmapFreeMemoryTask : public v8::Task {
352 public: 352 public:
353 explicit UnmapFreeMemoryTask(Unmapper* unmapper) : unmapper_(unmapper) {} 353 explicit UnmapFreeMemoryTask(Unmapper* unmapper) : unmapper_(unmapper) {}
354 354
355 private: 355 private:
356 // v8::Task overrides. 356 // v8::Task overrides.
357 void Run() override { 357 void Run() override {
358 unmapper_->PerformFreeMemoryOnQueuedChunks(); 358 unmapper_->PerformFreeMemoryOnQueuedChunks();
359 unmapper_->pending_unmapping_tasks_semaphore_.Signal(); 359 unmapper_->pending_unmapping_tasks_semaphore_.Signal(
360 "Unmapper::UnmapFreeMemoryTask::Run");
360 } 361 }
361 362
362 Unmapper* unmapper_; 363 Unmapper* unmapper_;
363 DISALLOW_COPY_AND_ASSIGN(UnmapFreeMemoryTask); 364 DISALLOW_COPY_AND_ASSIGN(UnmapFreeMemoryTask);
364 }; 365 };
365 366
366 void MemoryAllocator::Unmapper::FreeQueuedChunks() { 367 void MemoryAllocator::Unmapper::FreeQueuedChunks() {
367 if (FLAG_concurrent_sweeping) { 368 if (FLAG_concurrent_sweeping) {
368 V8::GetCurrentPlatform()->CallOnBackgroundThread( 369 V8::GetCurrentPlatform()->CallOnBackgroundThread(
369 new UnmapFreeMemoryTask(this), v8::Platform::kShortRunningTask); 370 new UnmapFreeMemoryTask(this), v8::Platform::kShortRunningTask);
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after
3221 object->ShortPrint(); 3222 object->ShortPrint();
3222 PrintF("\n"); 3223 PrintF("\n");
3223 } 3224 }
3224 printf(" --------------------------------------\n"); 3225 printf(" --------------------------------------\n");
3225 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3226 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3226 } 3227 }
3227 3228
3228 #endif // DEBUG 3229 #endif // DEBUG
3229 } // namespace internal 3230 } // namespace internal
3230 } // namespace v8 3231 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/page-parallel-job.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698