Changeset 57e0289


Ignore:
Timestamp:
Sep 17, 2020, 1:43:09 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
a951171, b2a11ba
Parents:
468c5aa
Message:

Added stats option to print stats per expression in new-ast resolution

Location:
src
Files:
2 added
3 edited

Legend:

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

    r468c5aa r57e0289  
    3535        }
    3636
     37        namespace ResolveTime {
     38                bool enabled = false;
     39        }
     40
    3741        struct {
    3842                const char * const opt;
     
    4347                { "heap"    , Heap::enabled },
    4448                { "time"    , Time::enabled },
     49                { "resolve" , ResolveTime::enabled },
    4550        };
    4651
  • src/Common/module.mk

    r468c5aa r57e0289  
    4040      Common/Stats/Heap.cc \
    4141      Common/Stats/Heap.h \
     42      Common/Stats/ResolveTime.cc \
     43      Common/Stats/ResolveTime.h \
    4244      Common/Stats/Stats.cc \
    4345      Common/Stats/Time.cc \
  • src/ResolvExpr/Resolver.cc

    r468c5aa r57e0289  
    3838#include "Common/PassVisitor.h"          // for PassVisitor
    3939#include "Common/SemanticError.h"        // for SemanticError
     40#include "Common/Stats/ResolveTime.h"    // for ResolveTime::start(), ResolveTime::stop()
    4041#include "Common/utility.h"              // for ValueGuard, group_iterate
    4142#include "InitTweak/GenInit.h"
     
    11691170                        const ast::Expr * untyped, const ast::SymbolTable & symtab
    11701171                ) {
    1171                         return findKindExpression( untyped, symtab );
     1172                        Stats::ResolveTime::start( untyped );
     1173                        auto res = findKindExpression( untyped, symtab );
     1174                        Stats::ResolveTime::stop();
     1175                        return res;
    11721176                }
    11731177        } // anonymous namespace
Note: See TracChangeset for help on using the changeset viewer.