Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages | Examples

ac_sto_stats.H

00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 
00003 /*  ArchC Storage Statistics Library for the ArchC architecture simulators
00004     Copyright (C) 2002-2004  The ArchC Team
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation; either
00009     version 2.1 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Lesser General Public License for more details.
00015 */
00016 
00017 /********************************************************/
00018 /* Storage Statistics class                             */
00019 /* Author:  Sandro Rigo                                 */
00020 /*                                                      */
00021 /*                                                      */
00022 /* The ArchC Team                                       */
00023 /* Computer Systems Laboratory (LSC)                    */
00024 /* IC-UNICAMP                                           */
00025 /* http://www.lsc.ic.unicamp.br                         */
00026 /********************************************************/
00027 
00029 class ac_sto_stats {
00030 
00031   char *name;
00032   long long accesses;
00033   long long misses;
00034 
00035 public:
00036 
00037   ac_sto_stats *next;
00038 
00040   ac_sto_stats( char* n ): accesses(0), misses(0){ name = n;}
00041 
00042   void inc_accesses(){ accesses++;}
00043   void inc_accesses( int n ) { accesses+= n;}
00044   void inc_misses(){ misses++;}
00045   void inc_misses( int n ){ misses+=n;}
00046 
00047   int get_accesses() {return accesses;}
00048   int get_misses()  {return misses;}
00049   char* get_name()  {return name;}
00050 };

Generated on Thu Jun 24 08:30:05 2004 for ArchC by doxygen 1.3.4