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

Unified Diff: src/IceCompileServer.cpp

Issue 2042063002: Created Ice::Instrumentation base class and accompanying hooks. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Added minimum build checks, fixed other issues. Created 4 years, 6 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
Index: src/IceCompileServer.cpp
diff --git a/src/IceCompileServer.cpp b/src/IceCompileServer.cpp
index adb41025dfb1f3d646fae2b5b95f3a58f00d7826..19b19f8e19f690e6af9fd05be12637018fe9f10e 100644
--- a/src/IceCompileServer.cpp
+++ b/src/IceCompileServer.cpp
@@ -241,6 +241,13 @@ void CLCompileServer::run() {
}
Ctx.reset(new GlobalContext(Ls.get(), Os.get(), Ls.get(), ELFStr.get()));
+
+ // TODO(tlively): Make this instantiate an instrumentation subclass
+ if (!BuildDefs::minimal() && getFlags().getSanitizeAddresses()) {
+ std::unique_ptr<Instrumentation> Instr(new Instrumentation(Ctx.get()));
+ Ctx->setInstrumentation(std::move(Instr));
Karl 2016/06/07 14:42:40 Out of curiosity, could this be simplified to:
tlively 2016/06/07 18:14:41 I just tried this and a couple variations but the
+ }
+
if (getFlags().getNumTranslationThreads() != 0) {
std::thread CompileThread([this, &Flags, &InputStream]() {
Ctx->initParserThread();

Powered by Google App Engine
This is Rietveld 408576698