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

Unified Diff: src/IceGlobalContext.h

Issue 1877873002: Reduce wait times for very large PEXE files. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | src/IceThreading.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index a95a50376a5fb56da548600a874ce729df7fa1b3..848fe1221dcfa5bd33fc19795ffad13b5562d26e 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -477,6 +477,11 @@ public:
return LockedPtr<StringPool>(Strings.get(), &StringsLock);
}
+ /// Number of function blocks that can be queued before waiting for
Jim Stichnoth 2016/04/13 15:33:19 reflow comment
+ /// translation
+ /// threads to consume.
+ static constexpr size_t MaxOptQSize = 1 << 16;
+
private:
// Try to ensure mutexes are allocated on separate cache lines.
@@ -543,7 +548,8 @@ private:
Intrinsics IntrinsicsInfo;
// TODO(jpp): move to EmitterContext.
std::unique_ptr<ELFObjectWriter> ObjectWriter;
- static constexpr size_t MaxOptQSize = 1 << 16;
+ // Value defining when to wake up the main parse thread.
+ const size_t OptQWakeupSize;
BoundedProducerConsumerQueue<OptWorkItem, MaxOptQSize> OptQ;
BoundedProducerConsumerQueue<EmitterWorkItem> EmitQ;
// DataLowering is only ever used by a single thread at a time (either in
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | src/IceThreading.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698