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

Side by Side Diff: src/wasm/wasm-module.cc

Issue 2454723002: Reland "[heap] Uncommit marking deque in concurrent task." (Closed)
Patch Set: one more ce fix Created 4 years, 1 month 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') | test/cctest/heap/test-mark-compact.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 <memory> 5 #include <memory>
6 6
7 #include "src/base/atomic-utils.h" 7 #include "src/base/atomic-utils.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 9
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 void WaitForCompilationTasks(Isolate* isolate, uint32_t* task_ids, 314 void WaitForCompilationTasks(Isolate* isolate, uint32_t* task_ids,
315 base::Semaphore* pending_tasks) { 315 base::Semaphore* pending_tasks) {
316 const size_t num_tasks = 316 const size_t num_tasks =
317 Min(static_cast<size_t>(FLAG_wasm_num_compilation_tasks), 317 Min(static_cast<size_t>(FLAG_wasm_num_compilation_tasks),
318 V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads()); 318 V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads());
319 for (size_t i = 0; i < num_tasks; ++i) { 319 for (size_t i = 0; i < num_tasks; ++i) {
320 // If the task has not started yet, then we abort it. Otherwise we wait for 320 // If the task has not started yet, then we abort it. Otherwise we wait for
321 // it to finish. 321 // it to finish.
322 if (!isolate->cancelable_task_manager()->TryAbort(task_ids[i])) { 322 if (isolate->cancelable_task_manager()->TryAbort(task_ids[i]) !=
323 CancelableTaskManager::kTaskAborted) {
323 pending_tasks->Wait(); 324 pending_tasks->Wait();
324 } 325 }
325 } 326 }
326 } 327 }
327 328
328 void FinishCompilationUnits( 329 void FinishCompilationUnits(
329 std::queue<compiler::WasmCompilationUnit*>& executed_units, 330 std::queue<compiler::WasmCompilationUnit*>& executed_units,
330 std::vector<Handle<Code>>& results, base::Mutex& result_mutex) { 331 std::vector<Handle<Code>>& results, base::Mutex& result_mutex) {
331 while (true) { 332 while (true) {
332 compiler::WasmCompilationUnit* unit = nullptr; 333 compiler::WasmCompilationUnit* unit = nullptr;
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 CHECK_NOT_NULL(result.val); 2091 CHECK_NOT_NULL(result.val);
2091 module = const_cast<WasmModule*>(result.val); 2092 module = const_cast<WasmModule*>(result.val);
2092 } 2093 }
2093 2094
2094 Handle<WasmModuleWrapper> module_wrapper = 2095 Handle<WasmModuleWrapper> module_wrapper =
2095 WasmModuleWrapper::New(isolate, module); 2096 WasmModuleWrapper::New(isolate, module);
2096 2097
2097 compiled_module->set_module_wrapper(module_wrapper); 2098 compiled_module->set_module_wrapper(module_wrapper);
2098 DCHECK(WasmCompiledModule::IsWasmCompiledModule(*compiled_module)); 2099 DCHECK(WasmCompiledModule::IsWasmCompiledModule(*compiled_module));
2099 } 2100 }
OLDNEW
« no previous file with comments | « src/heap/page-parallel-job.h ('k') | test/cctest/heap/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698