Changeset 8f74a6a


Ignore:
Timestamp:
Feb 28, 2019, 2:33:20 PM (6 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:
c9e640e
Parents:
7abee38
Message:

Added code to support generic statistic counters in the compiler

Location:
src
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/Common/Stats.h

    r7abee38 r8f74a6a  
    1616#pragma once
    1717
     18#include "Common/Stats/Counter.h"
    1819#include "Common/Stats/Heap.h"
  • src/Common/Stats/Heap.cc

    r7abee38 r8f74a6a  
    2121#include <iostream>
    2222
    23 //#define WITH_HEAP_STATISTICS
    24 
    2523namespace Stats {
    2624        namespace Heap {
    27 #if !defined( WITH_HEAP_STATISTICS )
     25#if defined( NO_HEAP_STATISTICS )
    2826                void newPass( const char * const ) {}
    2927
    30                 void printStats() {}
     28                void print() {}
    3129#else
    3230                struct StatBlock {
     
    7876                }
    7977
    80                 void printStats() {
     78                void print() {
    8179                        size_t nc = 0;
    8280                        size_t total_mallocs = 0;
  • src/Common/Stats/Heap.h

    r7abee38 r8f74a6a  
    1919        namespace Heap {
    2020                void newPass( const char * const name );
    21                 void printStats();
     21                void print();
    2222        }
    2323}
  • src/Common/module.mk

    r7abee38 r8f74a6a  
    1818      Common/Assert.cc \
    1919      Common/Stats/Heap.cc \
     20      Common/Stats/Counter.cc \
    2021      Common/Eval.cc \
    2122      Common/SemanticError.cc \
  • src/Makefile.in

    r7abee38 r8f74a6a  
    166166        CodeGen/OperatorTable.$(OBJEXT)
    167167am__objects_2 = Common/Assert.$(OBJEXT) Common/Stats/Heap.$(OBJEXT) \
    168         Common/Eval.$(OBJEXT) Common/SemanticError.$(OBJEXT) \
    169         Common/UniqueName.$(OBJEXT)
     168        Common/Stats/Counter.$(OBJEXT) Common/Eval.$(OBJEXT) \
     169        Common/SemanticError.$(OBJEXT) Common/UniqueName.$(OBJEXT)
    170170am__objects_3 = ControlStruct/ForExprMutator.$(OBJEXT) \
    171171        ControlStruct/LabelFixer.$(OBJEXT) \
     
    561561      Common/Assert.cc \
    562562      Common/Stats/Heap.cc \
     563      Common/Stats/Counter.cc \
    563564      Common/Eval.cc \
    564565      Common/SemanticError.cc \
     
    727728        @: > Common/Stats/$(DEPDIR)/$(am__dirstamp)
    728729Common/Stats/Heap.$(OBJEXT): Common/Stats/$(am__dirstamp) \
     730        Common/Stats/$(DEPDIR)/$(am__dirstamp)
     731Common/Stats/Counter.$(OBJEXT): Common/Stats/$(am__dirstamp) \
    729732        Common/Stats/$(DEPDIR)/$(am__dirstamp)
    730733Common/Eval.$(OBJEXT): Common/$(am__dirstamp) \
     
    11141117@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/SemanticError.Po@am__quote@
    11151118@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/UniqueName.Po@am__quote@
     1119@AMDEP_TRUE@@am__include@ @am__quote@Common/Stats/$(DEPDIR)/Counter.Po@am__quote@
    11161120@AMDEP_TRUE@@am__include@ @am__quote@Common/Stats/$(DEPDIR)/Heap.Po@am__quote@
    11171121@AMDEP_TRUE@@am__include@ @am__quote@Concurrency/$(DEPDIR)/Keywords.Po@am__quote@
  • src/main.cc

    r7abee38 r8f74a6a  
    377377
    378378        deleteAll( translationUnit );
    379         if(!libcfap && !treep) Stats::Heap::printStats();
     379        if(!libcfap && !treep) {
     380                Stats::Counters::print();
     381                Stats::Heap::print();
     382        }
     383
    380384        return 0;
    381385} // main
Note: See TracChangeset for help on using the changeset viewer.