kernel_stats.hh revision 7087
112855Sgabeblack@google.com/* 212855Sgabeblack@google.com * Copyright (c) 2007 The Hewlett-Packard Development Company 312855Sgabeblack@google.com * All rights reserved. 412855Sgabeblack@google.com * 512855Sgabeblack@google.com * The license below extends only to copyright in the software and shall 612855Sgabeblack@google.com * not be construed as granting a license to any other intellectual 712855Sgabeblack@google.com * property including but not limited to intellectual property relating 812855Sgabeblack@google.com * to a hardware implementation of the functionality of the software 912855Sgabeblack@google.com * licensed hereunder. You may use the software subject to the license 1012855Sgabeblack@google.com * terms below provided that you ensure that this notice is replicated 1112855Sgabeblack@google.com * unmodified and in its entirety in all distributions of the software, 1212855Sgabeblack@google.com * modified or unmodified, in source code or in binary form. 1312855Sgabeblack@google.com * 1412855Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 1512855Sgabeblack@google.com * modification, are permitted provided that the following conditions are 1612855Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 1712855Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 1812855Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 19 * notice, this list of conditions and the following disclaimer in the 20 * documentation and/or other materials provided with the distribution; 21 * neither the name of the copyright holders nor the names of its 22 * contributors may be used to endorse or promote products derived from 23 * this software without specific prior written permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 * 37 * Authors: Gabe Black 38 */ 39 40#ifndef __ARCH_X86_KERNELSTATS_HH__ 41#define __ARCH_X86_KERNELSTATS_HH__ 42 43#include "kern/kernel_stats.hh" 44 45namespace X86ISA { 46namespace Kernel { 47 48enum cpu_mode { 49 ring0, 50 ring1, 51 ring2, 52 ring3, 53 kernel = ring0, 54 user = ring3, 55 idle, 56 //What is this next one for? 57 cpu_mode_num 58}; 59 60extern const char *modestr[]; 61 62class Statistics : public ::Kernel::Statistics 63{ 64 public: 65 Statistics(System * system) : ::Kernel::Statistics(system) 66 {} 67}; 68 69} 70} 71 72#endif // __ARCH_X86_KERNELSTATS_HH__ 73