idle_event.cc revision 13614
16700SN/A/*
28257SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan
36700SN/A * All rights reserved.
46700SN/A *
56700SN/A * Redistribution and use in source and binary forms, with or without
66700SN/A * modification, are permitted provided that the following conditions are
76700SN/A * met: redistributions of source code must retain the above copyright
86700SN/A * notice, this list of conditions and the following disclaimer;
96700SN/A * redistributions in binary form must reproduce the above copyright
106700SN/A * notice, this list of conditions and the following disclaimer in the
116700SN/A * documentation and/or other materials provided with the distribution;
126700SN/A * neither the name of the copyright holders nor the names of its
136700SN/A * contributors may be used to endorse or promote products derived from
146700SN/A * this software without specific prior written permission.
156700SN/A *
166700SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176700SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186700SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196700SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206700SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216700SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226700SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236700SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246700SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256700SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266700SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276700SN/A *
286285SN/A * Authors: Lisa Hsu
298258SBrad.Beckmann@amd.com *          Nathan Binkert
306285SN/A */
318258SBrad.Beckmann@amd.com
328258SBrad.Beckmann@amd.com#include "arch/alpha/idle_event.hh"
336285SN/A
348258SBrad.Beckmann@amd.com#include "arch/alpha/kernel_stats.hh"
3511320Ssteve.reinhardt@amd.com#include "cpu/thread_context.hh"
3611320Ssteve.reinhardt@amd.com
3711320Ssteve.reinhardt@amd.comusing namespace AlphaISA;
388258SBrad.Beckmann@amd.com
396285SN/Avoid
406285SN/AIdleStartEvent::process(ThreadContext *tc)
417054SN/A{
428258SBrad.Beckmann@amd.com    if (tc->getKernelStats()) {
436493SN/A        RegVal val = tc->readMiscRegNoEffect(IPR_PALtemp23);
448257SN/A        tc->getKernelStats()->setIdleProcess(val, tc);
456493SN/A    }
467054SN/A    remove();
478258SBrad.Beckmann@amd.com}
488258SBrad.Beckmann@amd.com