events.cc revision 2235
12497SN/A/*
214006Stiago.muck@arm.com * Copyright (c) 2004-2006 The Regents of The University of Michigan
38711SN/A * All rights reserved.
48711SN/A *
58711SN/A * Redistribution and use in source and binary forms, with or without
68711SN/A * modification, are permitted provided that the following conditions are
78711SN/A * met: redistributions of source code must retain the above copyright
88711SN/A * notice, this list of conditions and the following disclaimer;
98711SN/A * redistributions in binary form must reproduce the above copyright
108711SN/A * notice, this list of conditions and the following disclaimer in the
118711SN/A * documentation and/or other materials provided with the distribution;
128711SN/A * neither the name of the copyright holders nor the names of its
138711SN/A * contributors may be used to endorse or promote products derived from
142497SN/A * this software without specific prior written permission.
152497SN/A *
162497SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172497SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182497SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192497SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202497SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212497SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222497SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232497SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242497SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252497SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262497SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272497SN/A */
282497SN/A
292497SN/A#include "arch/arguments.hh"
302497SN/A#include "base/trace.hh"
312497SN/A#include "cpu/exec_context.hh"
322497SN/A#include "kern/linux/events.hh"
332497SN/A#include "kern/linux/printk.hh"
342497SN/A#include "kern/system_events.hh"
352497SN/A#include "sim/system.hh"
362497SN/A
372497SN/A
382497SN/Anamespace Linux {
392665SN/A
402665SN/Avoid
418715SN/ADebugPrintkEvent::process(ExecContext *xc)
428922SN/A{
4312351Snikos.nikoleris@arm.com    if (DTRACE(DebugPrintf)) {
442497SN/A        if (!raw) {
452497SN/A            StringWrap name(xc->getSystemPtr()->name() + ".dprintk");
462497SN/A            DPRINTFN("");
472982SN/A        }
4810405Sandreas.hansson@arm.com
492497SN/A        AlphaArguments args(xc);
502497SN/A        Printk(args);
5111793Sbrandon.potter@amd.com        SkipFuncEvent::process(xc);
5211793Sbrandon.potter@amd.com    }
5312334Sgabeblack@google.com}
542548SN/A
5510405Sandreas.hansson@arm.com} // namespace linux
5610405Sandreas.hansson@arm.com