kernel_stats.cc revision 12182:acde8d31d970
1955SN/A/* 2955SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan 37816Ssteve.reinhardt@amd.com * All rights reserved. 45871Snate@binkert.org * 51762SN/A * Redistribution and use in source and binary forms, with or without 6955SN/A * modification, are permitted provided that the following conditions are 7955SN/A * met: redistributions of source code must retain the above copyright 8955SN/A * notice, this list of conditions and the following disclaimer; 9955SN/A * redistributions in binary form must reproduce the above copyright 10955SN/A * notice, this list of conditions and the following disclaimer in the 11955SN/A * documentation and/or other materials provided with the distribution; 12955SN/A * neither the name of the copyright holders nor the names of its 13955SN/A * contributors may be used to endorse or promote products derived from 14955SN/A * this software without specific prior written permission. 15955SN/A * 16955SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17955SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18955SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19955SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20955SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21955SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22955SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23955SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24955SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25955SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26955SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27955SN/A * 28955SN/A * Authors: Lisa Hsu 29955SN/A * Nathan Binkert 302665Ssaidi@eecs.umich.edu */ 312665Ssaidi@eecs.umich.edu 325863Snate@binkert.org#include <string> 33955SN/A 34955SN/A#include "base/trace.hh" 35955SN/A#include "cpu/thread_context.hh" 36955SN/A#include "kern/kernel_stats.hh" 37955SN/A#include "sim/system.hh" 388878Ssteve.reinhardt@amd.com 392632Sstever@eecs.umich.eduusing namespace std; 408878Ssteve.reinhardt@amd.comusing namespace Stats; 412632Sstever@eecs.umich.edu 42955SN/Anamespace Kernel { 438878Ssteve.reinhardt@amd.com 442632Sstever@eecs.umich.eduvoid 452761Sstever@eecs.umich.eduStatistics::regStats(const string &_name) 462632Sstever@eecs.umich.edu{ 472632Sstever@eecs.umich.edu myname = _name; 482632Sstever@eecs.umich.edu 492761Sstever@eecs.umich.edu _arm 502761Sstever@eecs.umich.edu .name(name() + ".inst.arm") 512761Sstever@eecs.umich.edu .desc("number of arm instructions executed") 528878Ssteve.reinhardt@amd.com ; 538878Ssteve.reinhardt@amd.com 542761Sstever@eecs.umich.edu _quiesce 552761Sstever@eecs.umich.edu .name(name() + ".inst.quiesce") 562761Sstever@eecs.umich.edu .desc("number of quiesce instructions executed") 572761Sstever@eecs.umich.edu ; 582761Sstever@eecs.umich.edu} 598878Ssteve.reinhardt@amd.com 608878Ssteve.reinhardt@amd.com} // namespace Kernel 612632Sstever@eecs.umich.edu