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

Side by Side Diff: src/IceGlobalContext.h

Issue 1867473002: Subzero: Fix -timing-focus . (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===//
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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 enum TimerStackKind { TSK_Default = 0, TSK_Funcs, TSK_Num }; 349 enum TimerStackKind { TSK_Default = 0, TSK_Funcs, TSK_Num };
350 350
351 /// newTimerStackID() creates a new TimerStack in the global space. It does 351 /// newTimerStackID() creates a new TimerStack in the global space. It does
352 /// not affect any TimerStack objects in TLS. 352 /// not affect any TimerStack objects in TLS.
353 TimerStackIdT newTimerStackID(const std::string &Name); 353 TimerStackIdT newTimerStackID(const std::string &Name);
354 /// dumpTimers() dumps the global timer data. This assumes all the 354 /// dumpTimers() dumps the global timer data. This assumes all the
355 /// thread-local copies of timer data have been merged into the global timer 355 /// thread-local copies of timer data have been merged into the global timer
356 /// data. 356 /// data.
357 void dumpTimers(TimerStackIdT StackID = TSK_Default, 357 void dumpTimers(TimerStackIdT StackID = TSK_Default,
358 bool DumpCumulative = true); 358 bool DumpCumulative = true);
359 /// Merges the current thread's copy of timer data into the global timer data. 359 void dumpLocalTimers(TimerStackIdT StackID = TSK_Default,
360 void mergeTimersFromTLS(); 360 bool DumpCumulative = true);
361 /// The following methods affect only the calling thread's TLS timer data. 361 /// The following methods affect only the calling thread's TLS timer data.
362 TimerIdT getTimerID(TimerStackIdT StackID, const std::string &Name); 362 TimerIdT getTimerID(TimerStackIdT StackID, const std::string &Name);
363 void pushTimer(TimerIdT ID, TimerStackIdT StackID); 363 void pushTimer(TimerIdT ID, TimerStackIdT StackID);
364 void popTimer(TimerIdT ID, TimerStackIdT StackID); 364 void popTimer(TimerIdT ID, TimerStackIdT StackID);
365 void resetTimer(TimerStackIdT StackID); 365 void resetTimer(TimerStackIdT StackID);
366 std::string getTimerName(TimerStackIdT StackID);
366 void setTimerName(TimerStackIdT StackID, const std::string &NewName); 367 void setTimerName(TimerStackIdT StackID, const std::string &NewName);
367 368
368 /// This is the first work item sequence number that the parser produces, and 369 /// This is the first work item sequence number that the parser produces, and
369 /// correspondingly the first sequence number that the emitter thread will 370 /// correspondingly the first sequence number that the emitter thread will
370 /// wait for. Start numbering at 1 to leave room for a sentinel, in case e.g. 371 /// wait for. Start numbering at 1 to leave room for a sentinel, in case e.g.
371 /// we wish to inject items with a special sequence number that may be 372 /// we wish to inject items with a special sequence number that may be
372 /// executed out of order. 373 /// executed out of order.
373 static constexpr uint32_t getFirstSequenceNumber() { return 1; } 374 static constexpr uint32_t getFirstSequenceNumber() { return 1; }
374 /// Adds a newly parsed and constructed function to the Cfg work queue. 375 /// Adds a newly parsed and constructed function to the Cfg work queue.
375 /// Notifies any idle workers that a new function is available for 376 /// Notifies any idle workers that a new function is available for
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } 677 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); }
677 ~OstreamLocker() { Ctx->unlockStr(); } 678 ~OstreamLocker() { Ctx->unlockStr(); }
678 679
679 private: 680 private:
680 GlobalContext *const Ctx; 681 GlobalContext *const Ctx;
681 }; 682 };
682 683
683 } // end of namespace Ice 684 } // end of namespace Ice
684 685
685 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H 686 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698