| OLD | NEW |
| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 Tls->StatsFunction.update(CodeStats::CS_NumRPImms); | 345 Tls->StatsFunction.update(CodeStats::CS_NumRPImms); |
| 346 Tls->StatsCumulative.update(CodeStats::CS_NumRPImms); | 346 Tls->StatsCumulative.update(CodeStats::CS_NumRPImms); |
| 347 } | 347 } |
| 348 | 348 |
| 349 /// These are predefined TimerStackIdT values. | 349 /// These are predefined TimerStackIdT values. |
| 350 enum TimerStackKind { TSK_Default = 0, TSK_Funcs, TSK_Num }; | 350 enum TimerStackKind { TSK_Default = 0, TSK_Funcs, TSK_Num }; |
| 351 | 351 |
| 352 /// newTimerStackID() creates a new TimerStack in the global space. It does | 352 /// newTimerStackID() creates a new TimerStack in the global space. It does |
| 353 /// not affect any TimerStack objects in TLS. | 353 /// not affect any TimerStack objects in TLS. |
| 354 TimerStackIdT newTimerStackID(const std::string &Name); | 354 TimerStackIdT newTimerStackID(const std::string &Name); |
| 355 /// dumpTimers() dumps the global timer data. As such, one probably wants to | 355 /// dumpTimers() dumps the global timer data. This assumes all the |
| 356 /// call mergeTimerStacks() as a prerequisite. | 356 /// thread-local copies of timer data have been merged into the global timer |
| 357 /// data. |
| 357 void dumpTimers(TimerStackIdT StackID = TSK_Default, | 358 void dumpTimers(TimerStackIdT StackID = TSK_Default, |
| 358 bool DumpCumulative = true); | 359 bool DumpCumulative = true); |
| 360 /// Merges the current thread's copy of timer data into the global timer data. |
| 361 void mergeTimersFromTLS(); |
| 359 /// The following methods affect only the calling thread's TLS timer data. | 362 /// The following methods affect only the calling thread's TLS timer data. |
| 360 TimerIdT getTimerID(TimerStackIdT StackID, const std::string &Name); | 363 TimerIdT getTimerID(TimerStackIdT StackID, const std::string &Name); |
| 361 void pushTimer(TimerIdT ID, TimerStackIdT StackID); | 364 void pushTimer(TimerIdT ID, TimerStackIdT StackID); |
| 362 void popTimer(TimerIdT ID, TimerStackIdT StackID); | 365 void popTimer(TimerIdT ID, TimerStackIdT StackID); |
| 363 void resetTimer(TimerStackIdT StackID); | 366 void resetTimer(TimerStackIdT StackID); |
| 364 void setTimerName(TimerStackIdT StackID, const std::string &NewName); | 367 void setTimerName(TimerStackIdT StackID, const std::string &NewName); |
| 365 | 368 |
| 366 /// 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 |
| 367 /// correspondingly the first sequence number that the emitter thread will | 370 /// correspondingly the first sequence number that the emitter thread will |
| 368 /// 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. |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } | 677 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } |
| 675 ~OstreamLocker() { Ctx->unlockStr(); } | 678 ~OstreamLocker() { Ctx->unlockStr(); } |
| 676 | 679 |
| 677 private: | 680 private: |
| 678 GlobalContext *const Ctx; | 681 GlobalContext *const Ctx; |
| 679 }; | 682 }; |
| 680 | 683 |
| 681 } // end of namespace Ice | 684 } // end of namespace Ice |
| 682 | 685 |
| 683 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 686 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
| OLD | NEW |