simple_trace.hh revision 13429
11039SN/A /* 21762SN/A * Copyright (c) 2013 ARM Limited 31039SN/A * All rights reserved 41039SN/A * 51039SN/A * The license below extends only to copyright in the software and shall 61039SN/A * not be construed as granting a license to any other intellectual 71039SN/A * property including but not limited to intellectual property relating 81039SN/A * to a hardware implementation of the functionality of the software 91039SN/A * licensed hereunder. You may use the software subject to the license 101039SN/A * terms below provided that you ensure that this notice is replicated 111039SN/A * unmodified and in its entirety in all distributions of the software, 121039SN/A * modified or unmodified, in source code or in binary form. 131039SN/A * 141039SN/A * Redistribution and use in source and binary forms, with or without 151039SN/A * modification, are permitted provided that the following conditions are 161039SN/A * met: redistributions of source code must retain the above copyright 171039SN/A * notice, this list of conditions and the following disclaimer; 181039SN/A * redistributions in binary form must reproduce the above copyright 191039SN/A * notice, this list of conditions and the following disclaimer in the 201039SN/A * documentation and/or other materials provided with the distribution; 211039SN/A * neither the name of the copyright holders nor the names of its 221039SN/A * contributors may be used to endorse or promote products derived from 231039SN/A * this software without specific prior written permission. 241039SN/A * 251039SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 261039SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 272665Ssaidi@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 282760Sbinkertn@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 292760Sbinkertn@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 301039SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 311039SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 321039SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 331039SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 341039SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 354826Ssaidi@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 361039SN/A * 374429Ssaidi@eecs.umich.edu * Authors: Matt Horsnell 381039SN/A */ 391039SN/A 401039SN/A/** 411039SN/A * @file This file initializes a simple trace unit which listens to 421039SN/A * a probe point in the fetch and commit stage of the O3 pipeline 434826Ssaidi@eecs.umich.edu * and simply outputs those events as a dissassembled instruction stream 441039SN/A * to the trace output. 451039SN/A */ 461039SN/A#ifndef __CPU_O3_PROBE_SIMPLE_TRACE_HH__ 471039SN/A#define __CPU_O3_PROBE_SIMPLE_TRACE_HH__ 481039SN/A 491039SN/A#include "cpu/o3/dyn_inst.hh" 501039SN/A#include "cpu/o3/impl.hh" 511039SN/A#include "params/SimpleTrace.hh" 521039SN/A#include "sim/probe/probe.hh" 531039SN/A 541039SN/Aclass SimpleTrace : public ProbeListenerObject { 551039SN/A 561039SN/A public: 571039SN/A SimpleTrace(const SimpleTraceParams *params): 581039SN/A ProbeListenerObject(params) 591039SN/A { 601039SN/A } 611039SN/A 621039SN/A /** Register the probe listeners. */ 631039SN/A void regProbeListeners(); 641039SN/A 651039SN/A /** Returns the name of the trace. */ 661039SN/A const std::string name() const { return ProbeListenerObject::name() + ".trace"; } 671039SN/A 681039SN/A private: 691039SN/A void traceFetch(const O3CPUImpl::DynInstConstPtr& dynInst); 701039SN/A void traceCommit(const O3CPUImpl::DynInstConstPtr& dynInst); 711039SN/A 721039SN/A}; 731039SN/A#endif//__CPU_O3_PROBE_SIMPLE_TRACE_HH__ 741039SN/A