Deleted Added
sdiff udiff text old ( 3380:382e21bc32f3 ) new ( 3506:99f86646ba5c )
full compact
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 19 unchanged lines hidden (view full) ---

28 * Authors: Steve Reinhardt
29 * Lisa Hsu
30 * Nathan Binkert
31 * Steve Raasch
32 */
33
34#include <fstream>
35#include <iomanip>
36
37#include "arch/regfile.hh"
38#include "base/loader/symtab.hh"
39#include "cpu/base.hh"
40#include "cpu/exetrace.hh"
41#include "cpu/static_inst.hh"
42#include "sim/param.hh"
43#include "sim/system.hh"
44
45//XXX This is temporary
46#include "arch/isa_specific.hh"
47
48using namespace std;
49using namespace TheISA;
50
51////////////////////////////////////////////////////////////////////////
52//
53// Methods for the InstRecord object
54//
55
56
57void
58Trace::InstRecord::dump(ostream &outs)
59{
60 if (flags[PRINT_REG_DELTA])
61 {
62#if THE_ISA == SPARC_ISA
63 //Don't print what happens for each micro-op, just print out
64 //once at the last op, and for regular instructions.
65 if(!staticInst->isMicroOp() || staticInst->isLastMicroOp())
66 {
67 static uint64_t regs[32] = {
68 0, 0, 0, 0, 0, 0, 0, 0,
69 0, 0, 0, 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0, 0, 0, 0,

--- 45 unchanged lines hidden (view full) ---

116 sprintf(buf, " F%d = 0x%016llx", 2 * y, newVal);
117 outs << buf;
118 floats[y] = newVal;
119 }
120 }
121 outs << endl;
122 }
123#endif
124 }
125 else if (flags[INTEL_FORMAT]) {
126#if FULL_SYSTEM
127 bool is_trace_system = (thread->getCpuPtr()->system->name() == trace_system);
128#else
129 bool is_trace_system = true;
130#endif
131 if (is_trace_system) {

--- 85 unchanged lines hidden (view full) ---

217 if (flags[PRINT_CP_SEQ] && cp_seq_valid)
218 outs << " CPSeq=" << dec << cp_seq;
219
220 //
221 // End of line...
222 //
223 outs << endl;
224 }
225}
226
227
228vector<bool> Trace::InstRecord::flags(NUM_BITS);
229string Trace::InstRecord::trace_system;
230
231////////////////////////////////////////////////////////////////////////
232//

--- 33 unchanged lines hidden (view full) ---

266Param<bool> exe_trace_print_cp_seq(&exeTraceParams, "print_cpseq",
267 "print correct-path sequence number", false);
268Param<bool> exe_trace_print_reg_delta(&exeTraceParams, "print_reg_delta",
269 "print which registers changed to what", false);
270Param<bool> exe_trace_pc_symbol(&exeTraceParams, "pc_symbol",
271 "Use symbols for the PC if available", true);
272Param<bool> exe_trace_intel_format(&exeTraceParams, "intel_format",
273 "print trace in intel compatible format", false);
274Param<string> exe_trace_system(&exeTraceParams, "trace_system",
275 "print trace of which system (client or server)",
276 "client");
277
278
279//
280// Helper function for ExecutionTraceParamContext::checkParams() just
281// to get us into the InstRecord namespace

--- 9 unchanged lines hidden (view full) ---

291 flags[PRINT_RESULT_DATA] = exe_trace_print_effaddr;
292 flags[PRINT_EFF_ADDR] = exe_trace_print_data;
293 flags[PRINT_INT_REGS] = exe_trace_print_iregs;
294 flags[PRINT_FETCH_SEQ] = exe_trace_print_fetchseq;
295 flags[PRINT_CP_SEQ] = exe_trace_print_cp_seq;
296 flags[PRINT_REG_DELTA] = exe_trace_print_reg_delta;
297 flags[PC_SYMBOL] = exe_trace_pc_symbol;
298 flags[INTEL_FORMAT] = exe_trace_intel_format;
299 trace_system = exe_trace_system;
300}
301
302void
303ExecutionTraceParamContext::checkParams()
304{
305 Trace::InstRecord::setParams();
306}
307