001    /*
002     *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003     *
004     *  This file is licensed to You under the Eclipse Public License (EPL);
005     *  You may not use this file except in compliance with the License. You
006     *  may obtain a copy of the License at
007     *
008     *      http://www.opensource.org/licenses/eclipse-1.0.php
009     *
010     *  See the COPYRIGHT.txt file distributed with this work for information
011     *  regarding copyright ownership.
012     */
013    package org.jikesrvm.adaptive.measurements.instrumentation;
014    
015    import org.jikesrvm.VM;
016    import org.jikesrvm.adaptive.measurements.Reportable;
017    import org.jikesrvm.compilers.opt.InstrumentedEventCounterManager;
018    
019    /**
020     * An instance of this class is used to store method counters.  It is
021     * initialized at startup, and instrumentation phase
022     * InsertMethodInvocationCounter.java inserts instrumentation that
023     * writes into this data.
024     */
025    public final class MethodInvocationCounterData extends ManagedCounterData implements Reportable {
026    
027      /**
028       * @param manager The manager that will provide the counter space
029       */
030      MethodInvocationCounterData(InstrumentedEventCounterManager manager) {
031        super(manager);
032      }
033    
034      /**
035       *  Part of Reportable interface.  Called on system exit
036       */
037      public void report() {
038        super.report(new MethodNameFunction());
039      }
040    
041      /**
042       *  Part of Reportable interface
043       **/
044      public void reset() {
045        VM._assert(false, "TODO: implement reset for BasicBlockCounterDatabase");
046      }
047    
048    }
049    
050