system_events.hh revision 720
16285Snate@binkert.org/* 26285Snate@binkert.org * Copyright (c) 2003 The Regents of The University of Michigan 36285Snate@binkert.org * All rights reserved. 46285Snate@binkert.org * 56285Snate@binkert.org * Redistribution and use in source and binary forms, with or without 66285Snate@binkert.org * modification, are permitted provided that the following conditions are 76285Snate@binkert.org * met: redistributions of source code must retain the above copyright 86285Snate@binkert.org * notice, this list of conditions and the following disclaimer; 96876Ssteve.reinhardt@amd.com * redistributions in binary form must reproduce the above copyright 106876Ssteve.reinhardt@amd.com * notice, this list of conditions and the following disclaimer in the 116285Snate@binkert.org * documentation and/or other materials provided with the distribution; 126285Snate@binkert.org * neither the name of the copyright holders nor the names of its 136285Snate@binkert.org * contributors may be used to endorse or promote products derived from 146285Snate@binkert.org * this software without specific prior written permission. 156285Snate@binkert.org * 166285Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 176285Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 186285Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 196285Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 206285Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 216285Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 226285Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 236876Ssteve.reinhardt@amd.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 246876Ssteve.reinhardt@amd.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 256876Ssteve.reinhardt@amd.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 266285Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 276285Snate@binkert.org */ 286825Spdudnik@gmail.com 296285Snate@binkert.org#ifndef __SYSTEM_EVENTS_HH__ 306285Snate@binkert.org#define __SYSTEM_EVENTS_HH__ 316285Snate@binkert.org 326285Snate@binkert.org#include "cpu/pc_event.hh" 336285Snate@binkert.org 346285Snate@binkert.orgclass System; 356285Snate@binkert.org 366285Snate@binkert.orgclass SkipFuncEvent : public PCEvent 376285Snate@binkert.org{ 386285Snate@binkert.org public: 396285Snate@binkert.org SkipFuncEvent(PCEventQueue *q, const std::string &desc) 406285Snate@binkert.org : PCEvent(q, desc) {} 416285Snate@binkert.org virtual void process(ExecContext *xc); 426285Snate@binkert.org}; 436368Sdrh5@cs.wisc.edu 446285Snate@binkert.orgclass FnEvent : public PCEvent 456285Snate@binkert.org{ 466285Snate@binkert.org public: 476285Snate@binkert.org FnEvent(PCEventQueue *q, const std::string &desc, System *system); 486285Snate@binkert.org virtual void process(ExecContext *xc); 49 std::string myname() const { return _name; } 50 51 private: 52 std::string _name; 53 Statistics::MainBin *myBin; 54}; 55 56#endif // __SYSTEM_EVENTS_HH__ 57