Changeset c884f2d for src/Common


Ignore:
Timestamp:
Mar 5, 2019, 3:08:46 PM (5 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
972540e
Parents:
3c0d4cd
Message:

Fixed error for % of parent printing in timing sections and added more timing instrumentation

Location:
src/Common/Stats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Common/Stats/Time.cc

    r3c0d4cd rc884f2d  
    8888                                virtual void print(std::ostream & os) override {
    8989                                        if(currl > prevl) {
     90                                                // std::cerr << "push last " << last << std::endl;
    9091                                                parents.push(last);
    9192                                        } else if(currl < prevl) {
    9293                                                parents.pop();
    93                                         } else {
     94                                                // std::cerr << "pop, top = " << parents.top() << std::endl;
     95                                        }
     96                                        // else {
    9497                                                last = end - begin;
    95                                         }
     98                                                // std::cerr << "last = " << last << "\t";
     99                                        // }
    96100
    97101                                        assert(finished);
  • src/Common/Stats/Time.h

    r3c0d4cd rc884f2d  
    3838
    3939                        template<typename func_t>
    40                         inline void TimeBLock(const char *, func_t) {}
     40                        inline void TimeBlock(const char *, func_t f) {
     41                                f();
     42                        }
    4143#               else
    4244                        void StartGlobal();
     
    5355
    5456                        template<typename func_t>
    55                         inline void TimeBLock(const char * name, func_t func) {
     57                        inline void TimeBlock(const char * name, func_t func) {
    5658                                BlockGuard guard(name);
    5759                                func();
Note: See TracChangeset for help on using the changeset viewer.