kernel_stats.hh revision 5999
12521SN/A/*
21070SN/A * Copyright (c) 2007 The Hewlett-Packard Development Company
31070SN/A * All rights reserved.
42521SN/A *
556SN/A * Redistribution and use of this software in source and binary forms,
62521SN/A * with or without modification, are permitted provided that the
72522SN/A * following conditions are met:
81711SN/A *
92037SN/A * The software must be used only for Non-Commercial Use which means any
1056SN/A * use which is NOT directed to receiving any direct monetary
112378SN/A * compensation for, or commercial advantage from such use.  Illustrative
122521SN/A * examples of non-commercial use are academic research, personal study,
132378SN/A * teaching, education and corporate research & development.
142378SN/A * Illustrative examples of commercial use are distributing products for
152378SN/A * commercial advantage and providing services using the software for
162SN/A * commercial advantage.
172SN/A *
182107SN/A * If you wish to use this software or functionality therein that may be
192SN/A * covered by patents for commercial use, please contact:
202SN/A *     Director of Intellectual Property Licensing
212SN/A *     Office of Strategy and Technology
222SN/A *     Hewlett-Packard Company
232SN/A *     1501 Page Mill Road
241070SN/A *     Palo Alto, California  94304
252378SN/A *
262378SN/A * Redistributions of source code must retain the above copyright notice,
272521SN/A * this list of conditions and the following disclaimer.  Redistributions
282640Sstever@eecs.umich.edu * in binary form must reproduce the above copyright notice, this list of
292640Sstever@eecs.umich.edu * conditions and the following disclaimer in the documentation and/or
302378SN/A * other materials provided with the distribution.  Neither the name of
312378SN/A * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
322378SN/A * contributors may be used to endorse or promote products derived from
332422SN/A * this software without specific prior written permission.  No right of
342SN/A * sublicense is granted herewith.  Derivatives of the software and
351070SN/A * output created using the software may be prepared, but only for
361070SN/A * Non-Commercial Uses.  Derivatives of the software may be shared with
371070SN/A * others provided: (i) the others agree to abide by the list of
382378SN/A * conditions herein which includes the Non-Commercial Use restrictions;
391070SN/A * and (ii) such Derivatives of the software include the above copyright
401074SN/A * notice to acknowledge the contribution from this software where
411070SN/A * applicable, this list of conditions and the disclaimer below.
422520SN/A *
432520SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
442520SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
452520SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
462520SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
472520SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
482520SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
492520SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
502520SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
512521SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
522521SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
532521SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
542521SN/A *
552520SN/A * Authors: Gabe Black
561070SN/A */
572158SN/A
581070SN/A#ifndef __ARCH_X86_KERNELSTATS_HH__
591070SN/A#define __ARCH_X86_KERNELSTATS_HH__
602158SN/A
611070SN/A#include "kern/kernel_stats.hh"
622158SN/A
631070SN/Anamespace X86ISA {
641070SN/Anamespace Kernel {
652520SN/A
661070SN/Aenum cpu_mode {
671070SN/A    ring0,
681070SN/A    ring1,
691070SN/A    ring2,
701070SN/A    ring3,
711070SN/A    kernel = ring0,
721070SN/A    user = ring3,
731070SN/A    idle,
741070SN/A    //What is this next one for?
751070SN/A    cpu_mode_num
761070SN/A};
771070SN/A
781070SN/Aextern const char *modestr[];
791082SN/A
801074SN/Aclass Statistics : public ::Kernel::Statistics
811074SN/A{
821074SN/A  public:
831074SN/A    Statistics(System * system) : ::Kernel::Statistics(system)
841074SN/A    {}
851070SN/A};
861070SN/A
871070SN/A}
881070SN/A}
891070SN/A
902378SN/A#endif // __ARCH_X86_KERNELSTATS_HH__
912378SN/A