Deleted Added
sdiff udiff text old ( 11153:20bbfe5b2b86 ) new ( 12615:ccdc49c36ad3 )
full compact
1/*
2 * Copyright (c) 2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

64 }
65
66 // If this instruction accessed memory lets record it
67 if (getMemValid())
68 tracer.traceMem(staticInst, getAddr(), getSize(), getFlags());
69}
70
71InstPBTrace::InstPBTrace(const InstPBTraceParams *p)
72 : InstTracer(p), curMsg(nullptr)
73{
74 // Create our output file
75 createTraceFile(p->file_name);
76}
77
78void
79InstPBTrace::createTraceFile(std::string filename)
80{

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

136{
137 if (curMsg) {
138 /// @todo if we are running multi-threaded I assume we'd need a lock here
139 traceStream->write(*curMsg);
140 delete curMsg;
141 curMsg = NULL;
142 }
143
144 // Create a new instruction message and fill out the fields
145 curMsg = new ProtoMessage::Inst;
146 curMsg->set_pc(pc.pc());
147 curMsg->set_inst(static_cast<uint32_t>(bits(si->machInst, 31, 0)));
148 curMsg->set_cpuid(tc->cpuId());
149 curMsg->set_tick(curTick());
150 curMsg->set_type(static_cast<ProtoMessage::Inst_InstType>(si->opClass()));
151 curMsg->set_inst_flags(bits(si->machInst, 7, 0));
152
153}
154
155void

--- 23 unchanged lines hidden ---