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

Side by Side 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: Style and comment fixes 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 unified diff | Download patch
« no previous file with comments | « src/IceClFlags.def ('k') | src/IceGlobalContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCompileServer.cpp - Compile server ------------------===// 1 //===- subzero/src/IceCompileServer.cpp - Compile server ------------------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 Err.print(Flags.getAppName().c_str(), *Ls); 234 Err.print(Flags.getAppName().c_str(), *Ls);
235 return transferErrorCode(getReturnValue(Ice::EC_Bitcode)); 235 return transferErrorCode(getReturnValue(Ice::EC_Bitcode));
236 } 236 }
237 237
238 if (Flags.getGenerateBuildAtts()) { 238 if (Flags.getGenerateBuildAtts()) {
239 dumpBuildAttributes(*Os.get()); 239 dumpBuildAttributes(*Os.get());
240 return transferErrorCode(getReturnValue(Ice::EC_None)); 240 return transferErrorCode(getReturnValue(Ice::EC_None));
241 } 241 }
242 242
243 Ctx.reset(new GlobalContext(Ls.get(), Os.get(), Ls.get(), ELFStr.get())); 243 Ctx.reset(new GlobalContext(Ls.get(), Os.get(), Ls.get(), ELFStr.get()));
244
245 // TODO(tlively): Make this instantiate an instrumentation subclass
246 if (!BuildDefs::minimal() && getFlags().getSanitizeAddresses()) {
247 std::unique_ptr<Instrumentation> Instr(new Instrumentation(Ctx.get()));
248 Ctx->setInstrumentation(std::move(Instr));
249 }
250
244 if (getFlags().getNumTranslationThreads() != 0) { 251 if (getFlags().getNumTranslationThreads() != 0) {
245 std::thread CompileThread([this, &Flags, &InputStream]() { 252 std::thread CompileThread([this, &Flags, &InputStream]() {
246 Ctx->initParserThread(); 253 Ctx->initParserThread();
247 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); 254 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream));
248 }); 255 });
249 CompileThread.join(); 256 CompileThread.join();
250 } else { 257 } else {
251 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); 258 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream));
252 } 259 }
253 transferErrorCode( 260 transferErrorCode(
254 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); 261 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value())));
255 Ctx->dumpConstantLookupCounts(); 262 Ctx->dumpConstantLookupCounts();
256 Ctx->dumpStrings(); 263 Ctx->dumpStrings();
257 } 264 }
258 265
259 } // end of namespace Ice 266 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceClFlags.def ('k') | src/IceGlobalContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698