idle_event.cc revision 4172:141705d83494
113511Sgabeblack@google.com/*
213511Sgabeblack@google.com * Copyright (c) 2004-2005 The Regents of The University of Michigan
313511Sgabeblack@google.com * All rights reserved.
413511Sgabeblack@google.com *
513511Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without
613511Sgabeblack@google.com * modification, are permitted provided that the following conditions are
713511Sgabeblack@google.com * met: redistributions of source code must retain the above copyright
813511Sgabeblack@google.com * notice, this list of conditions and the following disclaimer;
913511Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright
1013511Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the
1113511Sgabeblack@google.com * documentation and/or other materials provided with the distribution;
1213511Sgabeblack@google.com * neither the name of the copyright holders nor the names of its
1313511Sgabeblack@google.com * contributors may be used to endorse or promote products derived from
1413511Sgabeblack@google.com * this software without specific prior written permission.
1513511Sgabeblack@google.com *
1613511Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1713511Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1813511Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1913511Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2013511Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2113511Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2213511Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2313511Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2413511Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2513511Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2613511Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2713511Sgabeblack@google.com *
2813511Sgabeblack@google.com * Authors: Lisa Hsu
2913511Sgabeblack@google.com *          Nathan Binkert
3013511Sgabeblack@google.com */
3113511Sgabeblack@google.com
3213511Sgabeblack@google.com#include "arch/alpha/idle_event.hh"
3313511Sgabeblack@google.com#include "arch/alpha/kernel_stats.hh"
3413511Sgabeblack@google.com#include "cpu/thread_context.hh"
3513511Sgabeblack@google.com
3613511Sgabeblack@google.comusing namespace TheISA;
3713511Sgabeblack@google.com
3813511Sgabeblack@google.comvoid
3913511Sgabeblack@google.comIdleStartEvent::process(ThreadContext *tc)
4013511Sgabeblack@google.com{
4113511Sgabeblack@google.com    if (tc->getKernelStats())
4213511Sgabeblack@google.com        tc->getKernelStats()->setIdleProcess(
4313511Sgabeblack@google.com            tc->readMiscRegNoEffect(AlphaISA::IPR_PALtemp23), tc);
4413511Sgabeblack@google.com    remove();
4513511Sgabeblack@google.com}
4613511Sgabeblack@google.com