12155SN/A# -*- mode:python -*- 22155SN/A 32155SN/A# Copyright (c) 2006 The Regents of The University of Michigan 42155SN/A# All rights reserved. 52155SN/A# 62155SN/A# Redistribution and use in source and binary forms, with or without 72155SN/A# modification, are permitted provided that the following conditions are 82155SN/A# met: redistributions of source code must retain the above copyright 92155SN/A# notice, this list of conditions and the following disclaimer; 102155SN/A# redistributions in binary form must reproduce the above copyright 112155SN/A# notice, this list of conditions and the following disclaimer in the 122155SN/A# documentation and/or other materials provided with the distribution; 132155SN/A# neither the name of the copyright holders nor the names of its 142155SN/A# contributors may be used to endorse or promote products derived from 152155SN/A# this software without specific prior written permission. 162155SN/A# 172155SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182155SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192155SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202155SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212155SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222155SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232155SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242155SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252155SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262155SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272155SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282665Ssaidi@eecs.umich.edu# 292665Ssaidi@eecs.umich.edu# Authors: Steve Reinhardt 302155SN/A 314202Sbinkertn@umich.eduImport('*') 322155SN/A 3313898Sgabeblack@google.comDebugFlag('Activity') 3413898Sgabeblack@google.comDebugFlag('Commit') 3513898Sgabeblack@google.comDebugFlag('Context') 3613898Sgabeblack@google.comDebugFlag('Decode') 3713898Sgabeblack@google.comDebugFlag('DynInst') 3813898Sgabeblack@google.comDebugFlag('ExecEnable', 3913898Sgabeblack@google.com 'Filter: Enable exec tracing (no tracing without this)') 4013898Sgabeblack@google.comDebugFlag('ExecCPSeq', 'Format: Instruction sequence number') 4113898Sgabeblack@google.comDebugFlag('ExecEffAddr', 'Format: Include effective address') 4213898Sgabeblack@google.comDebugFlag('ExecFaulting', 'Trace faulting instructions') 4313898Sgabeblack@google.comDebugFlag('ExecFetchSeq', 'Format: Fetch sequence number') 4413898Sgabeblack@google.comDebugFlag('ExecOpClass', 'Format: Include operand class') 4513898Sgabeblack@google.comDebugFlag('ExecRegDelta') 4613898Sgabeblack@google.comDebugFlag('ExecResult', 'Format: Include results from execution') 4713898Sgabeblack@google.comDebugFlag('ExecSymbol', 'Format: Try to include symbol names') 4813898Sgabeblack@google.comDebugFlag('ExecThread', 'Format: Include thread ID in trace') 4913898Sgabeblack@google.comDebugFlag('ExecTicks', 'Format: Include tick count') 5013898Sgabeblack@google.comDebugFlag('ExecMicro', 'Filter: Include microops') 5113898Sgabeblack@google.comDebugFlag('ExecMacro', 'Filter: Include macroops') 5213898Sgabeblack@google.comDebugFlag('ExecUser', 'Filter: Trace user mode instructions') 5313898Sgabeblack@google.comDebugFlag('ExecKernel', 'Filter: Trace kernel mode instructions') 5413898Sgabeblack@google.comDebugFlag('ExecAsid', 'Format: Include ASID in trace') 5513898Sgabeblack@google.comDebugFlag('ExecFlags', 'Format: Include instruction flags in trace') 5613898Sgabeblack@google.comDebugFlag('Fetch') 5713898Sgabeblack@google.comDebugFlag('IntrControl') 5813898Sgabeblack@google.comDebugFlag('O3PipeView') 5913898Sgabeblack@google.comDebugFlag('PCEvent') 6013898Sgabeblack@google.comDebugFlag('Quiesce') 6113898Sgabeblack@google.comDebugFlag('Mwait') 6213898Sgabeblack@google.com 6313898Sgabeblack@google.comCompoundFlag('ExecAll', [ 'ExecEnable', 'ExecCPSeq', 'ExecEffAddr', 6413898Sgabeblack@google.com 'ExecFaulting', 'ExecFetchSeq', 'ExecOpClass', 'ExecRegDelta', 6513898Sgabeblack@google.com 'ExecResult', 'ExecSymbol', 'ExecThread', 6613898Sgabeblack@google.com 'ExecTicks', 'ExecMicro', 'ExecMacro', 'ExecUser', 'ExecKernel', 6713898Sgabeblack@google.com 'ExecAsid', 'ExecFlags' ]) 6813898Sgabeblack@google.comCompoundFlag('Exec', [ 'ExecEnable', 'ExecTicks', 'ExecOpClass', 'ExecThread', 6913898Sgabeblack@google.com 'ExecEffAddr', 'ExecResult', 'ExecSymbol', 'ExecMicro', 'ExecMacro', 7013898Sgabeblack@google.com 'ExecFaulting', 'ExecUser', 'ExecKernel' ]) 7113898Sgabeblack@google.comCompoundFlag('ExecNoTicks', [ 'ExecEnable', 'ExecOpClass', 'ExecThread', 7213898Sgabeblack@google.com 'ExecEffAddr', 'ExecResult', 'ExecMicro', 'ExecMacro', 'ExecFaulting', 7313898Sgabeblack@google.com 'ExecUser', 'ExecKernel' ]) 7413898Sgabeblack@google.com 759850Sandreas.hansson@arm.comif env['TARGET_ISA'] == 'null': 769850Sandreas.hansson@arm.com SimObject('IntrControl.py') 779850Sandreas.hansson@arm.com Source('intr_control_noisa.cc') 787768SAli.Saidi@ARM.com Return() 797768SAli.Saidi@ARM.com 8010695SAli.Saidi@ARM.com# Only build the protocol buffer instructions tracer if we have protobuf support 8110695SAli.Saidi@ARM.comif env['HAVE_PROTOBUF'] and env['TARGET_ISA'] != 'x86': 8210695SAli.Saidi@ARM.com SimObject('InstPBTrace.py') 8310695SAli.Saidi@ARM.com Source('inst_pb_trace.cc') 8410695SAli.Saidi@ARM.com 858887Sgeoffrey.blake@arm.comSimObject('CheckerCPU.py') 862766Sktlim@umich.edu 874486Sbinkertn@umich.eduSimObject('BaseCPU.py') 8810663SAli.Saidi@ARM.comSimObject('CPUTracers.py') 894486Sbinkertn@umich.eduSimObject('FuncUnit.py') 908739Sgblack@eecs.umich.eduSimObject('IntrControl.py') 9110259SAndrew.Bardsley@arm.comSimObject('TimingExpr.py') 924486Sbinkertn@umich.edu 934202Sbinkertn@umich.eduSource('activity.cc') 944202Sbinkertn@umich.eduSource('base.cc') 954202Sbinkertn@umich.eduSource('cpuevent.cc') 964202Sbinkertn@umich.eduSource('exetrace.cc') 9710319SAndreas.Sandberg@ARM.comSource('exec_context.cc') 984202Sbinkertn@umich.eduSource('func_unit.cc') 994776Sgblack@eecs.umich.eduSource('inteltrace.cc') 1008739Sgblack@eecs.umich.eduSource('intr_control.cc') 1016365Sgblack@eecs.umich.eduSource('nativetrace.cc') 1024202Sbinkertn@umich.eduSource('pc_event.cc') 1038777Sgblack@eecs.umich.eduSource('profile.cc') 1044202Sbinkertn@umich.eduSource('quiesce_event.cc') 1059913Ssteve.reinhardt@amd.comSource('reg_class.cc') 1064202Sbinkertn@umich.eduSource('static_inst.cc') 1074202Sbinkertn@umich.eduSource('simple_thread.cc') 1085217Ssaidi@eecs.umich.eduSource('thread_context.cc') 1094202Sbinkertn@umich.eduSource('thread_state.cc') 11010259SAndrew.Bardsley@arm.comSource('timing_expr.cc') 1112155SN/A 1128887Sgeoffrey.blake@arm.comSimObject('DummyChecker.py') 11310201SAndrew.Bardsley@arm.comSimObject('StaticInstFlags.py') 1148887Sgeoffrey.blake@arm.comSource('checker/cpu.cc') 1159340SAndreas.Sandberg@arm.comSource('dummy_checker.cc') 1168887Sgeoffrey.blake@arm.comDebugFlag('Checker') 117