stats.hh revision 13372
12SN/A/* 21762SN/A * Copyright (c) 2014 ARM Limited 32SN/A * All rights reserved 42SN/A * 52SN/A * The license below extends only to copyright in the software and shall 62SN/A * not be construed as granting a license to any other intellectual 72SN/A * property including but not limited to intellectual property relating 82SN/A * to a hardware implementation of the functionality of the software 92SN/A * licensed hereunder. You may use the software subject to the license 102SN/A * terms below provided that you ensure that this notice is replicated 112SN/A * unmodified and in its entirety in all distributions of the software, 122SN/A * modified or unmodified, in source code or in binary form. 132SN/A * 142SN/A * Redistribution and use in source and binary forms, with or without 152SN/A * modification, are permitted provided that the following conditions are 162SN/A * met: redistributions of source code must retain the above copyright 172SN/A * notice, this list of conditions and the following disclaimer; 182SN/A * redistributions in binary form must reproduce the above copyright 192SN/A * notice, this list of conditions and the following disclaimer in the 202SN/A * documentation and/or other materials provided with the distribution; 212SN/A * neither the name of the copyright holders nor the names of its 222SN/A * contributors may be used to endorse or promote products derived from 232SN/A * this software without specific prior written permission. 242SN/A * 252SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 262SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 272665Ssaidi@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 282665Ssaidi@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 292665Ssaidi@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 302SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 312SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3211793Sbrandon.potter@amd.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3311793Sbrandon.potter@amd.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 344183Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3512334Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 368229Snate@binkert.org * 372680Sktlim@umich.edu * Authors: Andrew Bardsley 388232Snate@binkert.org * Matthias Jung 398229Snate@binkert.org * Abdul Mutaal Ahmad 408784Sgblack@eecs.umich.edu */ 414183Sgblack@eecs.umich.edu 422SN/A/** 4310417Sandreas.hansson@arm.com * @file 442201SN/A * 458784Sgblack@eecs.umich.edu * C++-only configuration stats handling example 468589Sgblack@eecs.umich.edu * 478589Sgblack@eecs.umich.edu * Register with: Stats::registerHandlers(statsReset, statsDump) 488589Sgblack@eecs.umich.edu */ 498589Sgblack@eecs.umich.edu 502201SN/A#ifndef __UTIL_CXX_CONFIG_STATS_H__ 512612SN/A#define __UTIL_CXX_CONFIG_STATS_H__ 5210417Sandreas.hansson@arm.com 532612SN/Aextern std::string filename; 546815SLisa.Hsu@amd.com 552612SN/Anamespace CxxConfig 565004Sgblack@eecs.umich.edu{ 5710417Sandreas.hansson@arm.com 588545Ssaidi@eecs.umich.eduvoid statsDump(); 598545Ssaidi@eecs.umich.eduvoid statsReset(); 608545Ssaidi@eecs.umich.eduvoid statsEnable(); 618545Ssaidi@eecs.umich.eduvoid statsPrepare(); 6211877Sbrandon.potter@amd.com 6311877Sbrandon.potter@amd.com} 6411877Sbrandon.potter@amd.com 6511877Sbrandon.potter@amd.com#endif // __UTIL_CXX_CONFIG_STATS_H__ 6611877Sbrandon.potter@amd.com