34 #include "arch/utility.hh"
39 #include "config/the_isa.hh"
41 #include "debug/Annotate.hh"
42 #include "debug/AnnotateVerbose.hh"
53 #define CPA_IGNORE_SYMBOL(sym) { #sym, sizeof(#sym) }
77 #undef CPA_IGNORE_SYMBOL
80 using namespace TheISA;
91 virtual void process();
106 :
SimObject(p), numSm(0), numSmt(0), numSys(0), numQs(0), conId(0)
109 fatal(
"Multiple annotation objects found in system");
116 i = p->user_apps.begin();
118 while (i != p->user_apps.end()) {
122 fatal(
"Couldn't load symbols from file: %s\n", *i);
124 sf.erase(0, sf.rfind(
'/') + 1);;
125 DPRINTFN(
"file %s short: %s\n", *i, sf);
129 if (!result1 || !result2)
131 assert(result1 && result2);
141 ah.version = 0x4D35414E00000101
ULL;
144 osbin->write((
char*)&ah,
sizeof(AnnotateHeader));
180 int sysi = getSys(sys);
181 int smi = getSm(sysi, sm, args[1]);
182 DPRINTF(Annotate,
"Starting machine: %s(%d) sysi: %d id: %#x\n", sm,
184 DPRINTF(Annotate,
"smMap[%d] = %d, %s, %#x\n", smi,
185 smMap[smi-1].first, smMap[smi-1].second.first,
186 smMap[smi-1].second.second);
188 uint64_t frame = getFrame(tc);
189 StackId sid = StackId(sysi, frame);
194 if (smStack[sid].
size()) {
195 int prev_smi = smStack[sid].back();
196 DPRINTF(Annotate,
"Linking from %d to state machine %s(%d) [%#x]\n",
197 prev_smi, sm, smi, args[1]);
200 DPRINTF(Annotate,
"LnMap already contains entry for %d of %d\n",
202 assert(lnMap[smi] == 0);
203 lnMap[smi] = prev_smi;
207 DPRINTF(Annotate,
"Not Linking to state machine %s(%d) [%#x]\n",
213 smStack[sid].push_back(smi);
215 DPRINTF(Annotate,
"Stack Now (%#X):\n", frame);
216 for (
int x = smStack[sid].
size()-1;
x >= 0;
x--)
217 DPRINTF(Annotate,
"-- %d\n", smStack[sid][
x]);
224 Id
id = Id(sm, frame);
225 if (scLinks[sysi-1][
id]) {
226 AnnDataPtr an = scLinks[sysi-1][
id];
227 scLinks[sysi-1].erase(
id);
231 "Found prev unknown linking from %d to state machine %s(%d)\n",
235 DPRINTF(Annotate,
"LnMap already contains entry for %d of %d\n",
237 assert(lnMap[smi] == 0);
243 DPRINTF(Annotate,
"st: %s smi: %d stCache.size %d\n", st,
244 smi, stCache.size());
245 int sti = getSt(sm, st);
246 lastState[smi] = sti;
265 CPA::doSwSmEnd(
System *sys,
int cpuid,
string sm, uint64_t frame)
267 int sysi = getSys(sys);
268 StackId sid = StackId(sysi, frame);
276 int smib = smStack[sid].back();
278 DPRINTF(Annotate,
"Ending machine: %s[%d, %#x] (%d?)\n", sm, sysi,
281 if (!smStack[sid].
size() || smMap[smib-1].second.first != sm) {
282 DPRINTF(Annotate,
"State Machine not unwinding correctly. sid: %d, %#x"
283 " top of stack: %s Current Stack:\n",
284 sysi, frame, smMap[smib-1].second.first);
285 for (
int x = smStack[sid].
size()-1; x >= 0; x--)
286 DPRINTF(Annotate,
"-- %d\n", smStack[sid][x]);
287 DPRINTF(Annotate,
"Ending machine: %s; end stack: %s\n", sm,
288 smMap[smib-1].second.first);
290 warn(
"State machine stack not unwinding correctly at %d\n",
curTick());
293 "State machine ending:%s sysi:%d id:%#x back:%d getSm:%d\n",
294 sm, sysi, smMap[smib-1].second.second, smStack[sid].back(),
295 getSm(sysi, sm, smMap[smib-1].second.second));
296 assert(getSm(sysi, sm, smMap[smib-1].second.second) ==
297 smStack[sid].back());
299 int smi = smStack[sid].back();
300 smStack[sid].pop_back();
303 DPRINTF(Annotate,
"Linking %d back to %d\n", smi, lnMap[smi]);
304 add(OP_LINK,
FL_NONE, cpuid, smi, lnMap[smi]);
308 if (smStack[sid].
size()) {
309 add(OP_BEGIN,
FL_NONE, cpuid, smi, lastState[smi]);
312 DPRINTF(Annotate,
"Stack Now:\n");
313 for (
int x = smStack[sid].
size()-1; x >= 0; x--)
314 DPRINTF(Annotate,
"-- %d\n", smStack[sid][x]);
330 DPRINTF(Annotate,
"Explict begin of state %s\n", st);
331 uint32_t flags = args[0];
333 warn(
"BAD state encountered: at cycle %d: %s\n",
curTick(), st);
350 string app =
ti.curTaskName();
351 if (userApp.count(app))
352 userApp[app]->findNearestSymbol(next_pc, sym, sym_addr);
360 CPA::swBegin(
System *sys,
int cpuid, std::string st, uint64_t frame,
bool expl,
365 while (ignoreSymbols[x].len)
367 len = ignoreSymbols[
x].
len;
368 if (!st.compare(0,len, ignoreSymbols[x].
symbol, len))
373 int sysi = getSys(sys);
374 StackId sid = StackId(sysi, frame);
376 if (!smStack[sid].
size())
378 if (!expl && swExpl[sid])
382 DPRINTFS(AnnotateVerbose, sys,
"SwBegin: %s sysi: %d\n", st, sysi);
383 int smi = smStack[sid].back();
384 int sti = getSt(smMap[smi-1].second.first, st);
385 if (lastState[smi] != sti) {
386 lastState[smi] = sti;
387 add(OP_BEGIN, flags, cpuid, smi, sti);
405 int sysi = getSys(sys);
406 StackId sid = StackId(sysi, getFrame(tc));
407 if (!smStack[sid].
size()) {
408 DPRINTF(Annotate,
"Explict end of State: %s IGNORED\n", st);
411 DPRINTF(Annotate,
"Explict end of State: %s\n", st);
414 int smi = smStack[sid].back();
416 int sti = getSt(smMap[smi-1].second.first, st);
417 lastState[smi] = sti;
430 uint64_t
id = args[0];
432 int32_t
count = args[2];
435 int sysi = getSys(sys);
436 StackId sid = StackId(sysi, getFrame(tc));
437 if (!smStack[sid].
size())
439 int smi = smStack[sid].back();
442 int qi = getQ(sysi, q,
id);
448 "swQ: %s[%#x] cur size %d %d bytes: %d adding: %d\n",
449 q,
id, qSize[qi-1], qData[qi-1].
size(), qBytes[qi-1], count);
461 uint64_t
id = args[0];
463 int32_t count = args[2];
466 int sysi = getSys(sys);
467 StackId sid = StackId(sysi, getFrame(tc));
468 if (!smStack[sid].
size())
470 int smi = smStack[sid].back();
471 int qi = getQ(sysi, q,
id);
475 "swDq: %s[%#x] cur size %d %d bytes: %d removing: %d\n",
476 q,
id, qSize[qi-1], qData[qi-1].
size(), qBytes[qi-1], count);
490 uint64_t
id = args[0];
493 int32_t count = args[2];
495 int sysi = getSys(sys);
496 StackId sid = StackId(sysi, getFrame(tc));
497 if (!smStack[sid].
size())
499 int smi = smStack[sid].back();
500 int qi = getQ(sysi, q,
id);
504 "swPq: %s [%#x] cur size %d %d bytes: %d peeking: %d\n",
505 q,
id, qSize[qi-1], qData[qi-1].
size(), qBytes[qi-1], count);
508 if (qBytes[qi-1] < count) {
511 fatal(
"Queue %s peeking with not enough bytes available in queue!\n", q);
525 uint64_t
id = args[0];
528 int32_t count = args[2];
530 int sysi = getSys(sys);
531 StackId sid = StackId(sysi, getFrame(tc));
532 if (!smStack[sid].
size())
534 int smi = smStack[sid].back();
535 int qi = getQ(sysi, q,
id);
539 "swRq: %s [%#x] cur size %d %d bytes: %d reserve: %d\n",
540 q,
id, qSize[qi-1], qData[qi-1].
size(), qBytes[qi-1], count);
556 uint64_t
id = args[0];
559 int32_t count = args[3];
561 int sysi = getSys(sys);
562 StackId sid = StackId(sysi, getFrame(tc));
563 if (!smStack[sid].
size())
565 int smi = smStack[sid].back();
566 int qi = getQ(sysi, q,
id);
584 uint64_t
id = args[0];
587 int32_t count = args[3];
589 int sysi = getSys(sys);
590 StackId sid = StackId(sysi, getFrame(tc));
591 if (!smStack[sid].
size())
593 int smi = smStack[sid].back();
594 int qi = getQ(sysi, q,
id);
612 uint64_t
id = args[0];
616 int32_t
size = args[2];
619 int sysi = getSys(sys);
620 StackId sid = StackId(sysi, getFrame(tc));
621 if (!smStack[sid].
size())
623 int smi = smStack[sid].back();
624 int qi = getQ(sysi, q,
id);
625 DPRINTF(AnnotateQ,
"swSq: %s [%#x] cur size: %d bytes: %d, new size: %d\n",
626 q,
id, qSize[qi-1], qBytes[qi-1], size);
629 DPRINTF(AnnotateQ,
"Resetting Queue %s\n", q);
636 if (qBytes[qi-1] < size)
638 else if (qBytes[qi-1] > size) {
639 DPRINTF(AnnotateQ,
"removing for resize of queue %s\n", q);
647 int need = qBytes[qi-1] -
size;
650 int32_t tail_bytes = qData[qi-1].back()->data;
651 if (qSize[qi-1] <= 0 || qBytes[qi-1] < 0) {
654 fatal(
"Queue %s had inconsistancy when doing size queue!\n", q);
656 if (tail_bytes > need) {
657 qData[qi-1].back()->data -= need;
659 }
else if (tail_bytes == need) {
660 qData[qi-1].pop_back();
664 qData[qi-1].pop_back();
680 uint64_t
id = args[0];
684 int32_t size = args[2];
686 int sysi = getSys(sys);
687 int qi = getQ(sysi, q,
id);
688 if (qBytes[qi-1] != size) {
689 DPRINTF(AnnotateQ,
"Queue %s [%#x] has inconsintant size\n", q,
id);
694 while (ai != qData[qi-1].end()) {
695 DPRINTF(AnnotateQ,
"--Element %d size %d\n", x, (*ai)->data);
700 warn(
"%d: Queue Assert: SW said there should be %d byte(s) in %s,"
701 "however there are %d byte(s)\n",
702 curTick(), size, q, qBytes[qi-1]);
703 DPRINTF(AnnotateQ,
"%d: Queue Assert: SW said there should be %d"
704 " byte(s) in %s, however there are %d byte(s)\n",
705 curTick(), size, q, qBytes[qi-1]);
721 int sysi = getSys(sys);
722 StackId sid = StackId(sysi, getFrame(tc));
723 if (!smStack[sid].
size())
725 int smi = smStack[sid].back();
726 int lsmi = getSm(sysi, lsm, args[1]);
728 DPRINTF(Annotate,
"Linking from %d to state machine %s(%d) [%#x]\n",
729 smi, lsm, lsmi, args[1]);
732 DPRINTF(Annotate,
"LnMap already contains entry for %d of %d\n",
734 assert(lnMap[lsmi] == 0);
754 StackId sid = StackId(sysi, getFrame(tc));
755 if (!smStack[sid].
size())
757 int smi = smStack[sid].back();
770 uint64_t
id = ++conId;
772 StackId sid = StackId(sysi, getFrame(tc));
773 if (!smStack[sid].
size())
774 panic(
"swGetId called without a state machine stack!");
775 int smi = smStack[sid].back();
795 int sysi = getSys(sys);
797 Id
id = Id(lsm, getFrame(tc));
798 StackId sid = StackId(sysi, getFrame(tc));
800 if (!smStack[sid].
size())
803 int smi = smStack[sid].back();
805 DPRINTF(Annotate,
"Linking from %d to state machine %s(UNKNOWN)\n",
808 if (scLinks[sysi-1][
id])
810 "scLinks already contains entry for system %d %s[%x] of %d\n",
811 sysi, lsm, getFrame(tc), scLinks[sysi-1][
id]);
812 assert(scLinks[sysi-1][
id] == 0);
814 scLinks[sysi-1][
id]->dump =
false;
824 CPA::add(
int t,
int f,
int c,
int sm,
int stq, int32_t
d)
826 AnnDataPtr an = std::make_shared<AnnotateData>();
839 DPRINTF(AnnotateVerbose,
"Annotate: op: %d flags: 0x%x sm: %d state: %d time: %d, data: %d\n",
840 an->op, an->flag, an->sm, an->stq, an->time, an->data);
843 if (an->op != OP_LINK)
852 std::streampos curpos = osbin->tellp();
856 *osbin <<
"# Automatically generated state machine descriptor file" << endl;
858 *osbin <<
"sms = {}" << endl << endl;
860 state_machines.resize(numSmt+1);
863 SCache::iterator i = smtCache.begin();
864 while (i != smtCache.end()) {
865 state_machines[i->second] = i->first;
869 for (
int x = 1; x < state_machines.size(); x++) {
871 states.resize(numSt[x-1]+1);
872 assert(x-1 < stCache.size());
873 SCache::iterator i = stCache[x-1].begin();
874 while (i != stCache[x-1].end()) {
875 states[i->second] = i->first;
878 *osbin <<
"sms[\"" << state_machines[
x] <<
"\"] = [\"NULL\"";
879 for (
int y = 1; y < states.size(); y++)
880 *osbin <<
", \"" << states[y] <<
"\"";
881 *osbin <<
"]" << endl;
884 *osbin << endl << endl << endl;
887 *osbin <<
"smNum = [\"NULL\"";
888 for (
int x = 0; x < smMap.size(); x++)
889 *osbin <<
", (" << smMap[x].first <<
", \"" << smMap[x].second.first <<
890 "\", " << smMap[x].second.second <<
")";
891 *osbin <<
"]" << endl;
893 *osbin << endl << endl << endl;
897 systems.resize(numSys+1);
898 NameCache::iterator i2 = nameCache.begin();
899 while (i2 != nameCache.end()) {
900 systems[i2->second.second] = i2->second.first;
904 *osbin <<
"sysNum = [\"NULL\"";
905 for (
int x = 1; x < systems.size(); x++) {
906 *osbin <<
", \"" << systems[
x] <<
"\"";
908 *osbin <<
"]" << endl;
911 *osbin <<
"queues = [\"NULL\"";
912 for (
int x = 0; x < qMap.size(); x++)
913 *osbin <<
", (" << qMap[x].first <<
", \"" << qMap[x].second.first <<
914 "\", " << qMap[x].second.second <<
")";
915 *osbin <<
"]" << endl;
917 *osbin <<
"smComb = [s for s in [(i,r) for i in xrange(1,len(sysNum)) "
918 <<
"for r in xrange (1,len(smNum))]]" << endl;
919 ah.key_len = osbin->tellp() - curpos;
922 curpos = osbin->tellp();
925 for (
int x = 0; x < annotateIdx.size(); x++)
926 osbin->write((
char*)&annotateIdx[x],
sizeof(uint64_t));
927 ah.idx_len = osbin->tellp() - curpos;
930 osbin->write((
char*)&ah,
sizeof(AnnotateHeader));
947 if (!all &&
data.size() < 10000)
951 while (i !=
data.end()) {
955 if (!an->dump && !all)
959 if (ah.num_recs % 100000 == 0)
960 annotateIdx.push_back(osbin->tellp());
963 osbin->write((
char*)&(an->time),
sizeof(an->time));
964 osbin->write((
char*)&(an->orig_data),
sizeof(an->orig_data));
965 osbin->write((
char*)&(an->sm),
sizeof(an->sm));
966 osbin->write((
char*)&(an->stq),
sizeof(an->stq));
967 osbin->write((
char*)&(an->op),
sizeof(an->op));
968 osbin->write((
char*)&(an->flag),
sizeof(an->flag));
969 osbin->write((
char*)&(an->cpu),
sizeof(an->cpu));
972 if (
data.begin() !=
i)
980 CPA::doQ(
System *sys,
int flags,
int cpuid,
int sm,
981 string q,
int qi,
int count)
984 qBytes[qi-1] +=
count;
985 if (qSize[qi-1] > 2501 || qBytes[qi-1] > 2000000000)
986 warn(
"Queue %s is %d elements/%d bytes, "
987 "maybe things aren't being removed?\n",
988 q, qSize[qi-1], qBytes[qi-1]);
990 qData[qi-1].push_front(add(OP_QUEUE, flags, cpuid, sm, qi, count));
992 qData[qi-1].push_back(add(OP_QUEUE, flags, cpuid, sm, qi, count));
993 DPRINTFS(AnnotateQ, sys,
"Queing in queue %s size now %d/%d\n",
994 q, qSize[qi-1], qBytes[qi-1]);
995 assert(qSize[qi-1] >= 0);
996 assert(qBytes[qi-1] >= 0);
1001 CPA::doDq(
System *sys,
int flags,
int cpuid,
int sm,
1002 string q,
int qi,
int count)
1007 add(OP_DEQUEUE, flags, cpuid, sm, qi, count);
1008 qData[qi-1].clear();
1011 DPRINTF(AnnotateQ,
"Dequeing all data in queue %s size now %d/%d\n",
1012 q, qSize[qi-1], qBytes[qi-1]);
1017 if (qSize[qi-1] <= 0 || qBytes[qi-1] <= 0 || !qData[qi-1].
size()) {
1020 fatal(
"Queue %s dequing with no data available in queue!\n",
1023 assert(qSize[qi-1] >= 0);
1024 assert(qBytes[qi-1] >= 0);
1025 assert(qData[qi-1].
size());
1027 int32_t need =
count;
1028 qBytes[qi-1] -=
count;
1029 if (qBytes[qi-1] < 0) {
1032 fatal(
"Queue %s dequing with no bytes available in queue!\n",
1037 int32_t head_bytes = qData[qi-1].front()->data;
1038 if (qSize[qi-1] <= 0 || qBytes[qi-1] < 0) {
1041 fatal(
"Queue %s dequing with nothing in queue!\n",
1045 if (head_bytes > need) {
1046 qData[qi-1].front()->data -= need;
1048 }
else if (head_bytes == need) {
1049 qData[qi-1].pop_front();
1053 qData[qi-1].pop_front();
1059 add(OP_DEQUEUE, flags, cpuid, sm, qi, count);
1060 DPRINTF(AnnotateQ,
"Dequeing in queue %s size now %d/%d\n",
1061 q, qSize[qi-1], qBytes[qi-1]);
1087 i = smtCache.begin();
1088 while (i != smtCache.end()) {
1095 for (x = 0; x < stCache.size(); x++) {
1096 i = stCache[
x].begin();
1098 while (i != stCache[x].end()) {
1106 IdHCache::iterator idi;
1107 for (x = 0; x < qCache.size(); x++) {
1108 idi = qCache[
x].begin();
1110 while (idi != qCache[x].end()) {
1119 for (x = 0; x < smCache.size(); x++) {
1120 idi = smCache[
x].begin();
1123 while (idi != smCache[x].end()) {
1135 NameCache::iterator
ni;
1137 ni = nameCache.begin();
1139 while (ni != nameCache.end()) {
1147 SmStack::iterator
si;
1148 si = smStack.begin();
1150 paramOut(
os,
"smStackIdCount", smStack.size());
1151 while (si != smStack.end()) {
1155 for (y = 0; y < si->second.size(); y++)
1162 LinkMap::iterator
li;
1165 while (li != lnMap.end()) {
1172 SwExpl::iterator swexpli;
1173 swexpli = swExpl.begin();
1176 while (swexpli != swExpl.end()) {
1186 ii = lastState.begin();
1187 paramOut(
os,
"lastStateSize", lastState.size());
1188 while (ii != lastState.end()) {
1195 for (x = 0; x < smMap.size(); x++) {
1202 for (x = 0; x < qMap.size(); x++) {
1209 for (x = 0; x < qData.size(); x++) {
1210 if (!qData[x].
size())
1213 for (
auto &ann : qData[x]) {
1214 ann->serializeSection(
os,
csprintf(
"Q%d_%d", x, y));
1237 for (
int x = 0; x < numSmt; x++) {
1240 smtCache[str] = smi;
1244 stCache.resize(numSmt);
1245 for (
int x = 0; x < numSmt; x++) {
1246 for (
int y = 0; y < numSt[
x]; y++) {
1249 stCache[
x][str] = smi;
1255 qCache.resize(numSys);
1256 for (
int x = 0; x < numSys; x++) {
1257 for (
int y = 0; y < numQ[
x]; y++) {
1261 qCache[
x][Id(str,
id)] = smi;
1266 smCache.resize(numSys);
1267 for (
int x = 0; x < numSys; x++) {
1270 for (
int y = 0; y <
size; y++) {
1274 smCache[
x][Id(str,
id)] = smi;
1279 for (
int x = 0; x < numSys; x++)
1280 scLinks.push_back(ScHCache());
1283 for (
int x = 0; x < numSys; x++) {
1290 sys =
dynamic_cast<System*
>(sptr);
1294 nameCache[sys] = std::make_pair(str, sysi);
1299 paramIn(cp,
"smStackIdCount", smStack_size);
1300 for (
int x = 0; x < smStack_size; x++) {
1307 StackId sid = StackId(sysi, frame);
1308 for (
int y = 0; y <
count; y++) {
1310 smStack[sid].push_back(smi);
1317 paramIn(cp,
"lnMapSize", lnMap_size);
1318 for (
int x = 0; x < lnMap_size; x++) {
1326 paramIn(cp,
"swExplCount", swExpl_size);
1327 for (
int x = 0; x < swExpl_size; x++) {
1334 StackId sid = StackId(sysi, frame);
1341 paramIn(cp,
"lastStateSize", lastState_size);
1342 for (
int x = 0; x < lastState_size; x++) {
1345 lastState[smi] = sti;
1350 smMap.resize(numSm);
1351 for (
int x = 0; x < smMap.size(); x++) {
1359 for (
int x = 0; x < qMap.size(); x++) {
1367 qData.resize(qSize.size());
1368 for (
int x = 0; x < qSize.size(); x++) {
1371 for (
int y = 0; y < qSize[
x]; y++) {
1372 AnnDataPtr
a = std::make_shared<AnnotateData>();
1373 a->unserializeSection(cp,
csprintf(
"Q%d_%d", x, y));
1375 qData[
x].push_back(a);
1409 return new CPA(
this);
virtual System * getSystemPtr()=0
const std::string & name()
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=maxAddr)=0
void swLink(ThreadContext *tc)
void swPq(ThreadContext *tc)
virtual MiscReg readMiscRegNoEffect(int misc_reg) const =0
void swIdentify(ThreadContext *tc)
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
void swSmEnd(ThreadContext *tc)
virtual bool loadLocalSymbols(SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=maxAddr)=0
ThreadContext is the external interface to all thread state for anything outside of the CPU...
const RegIndex ReturnAddressReg
void swWf(ThreadContext *tc)
uint64_t swGetId(ThreadContext *tc)
#define UNSERIALIZE_SCALAR(scalar)
void swAutoBegin(ThreadContext *tc, Addr next_pc)
void swDq(ThreadContext *tc)
Tick curTick()
The current simulated tick.
virtual uint64_t readIntReg(int reg_idx)=0
std::string csprintf(const char *format, const Args &...args)
void swSq(ThreadContext *tc)
void CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen)
void paramOut(CheckpointOut &cp, const string &name, ExtMachInst const &machInst)
void swWe(ThreadContext *tc)
void registerExitCallback(Callback *callback)
Register an exit callback.
#define UNSERIALIZE_CONTAINER(member)
void arrayParamOut(CheckpointOut &cp, const std::string &name, const CircleBuf< T > ¶m)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool inUserMode(ThreadContext *tc)
#define ULL(N)
uint64_t constant
#define CPA_IGNORE_SYMBOL(sym)
#define SERIALIZE_SCALAR(scalar)
void swEnd(ThreadContext *tc)
virtual const std::string name() const
std::ostream CheckpointOut
ObjectFile * createObjectFile(const string &fname, bool raw)
void swSyscallLink(ThreadContext *tc)
virtual int contextId() const =0
void swRq(ThreadContext *tc)
CPAIgnoreSymbol ignoreSymbols[]
void paramIn(CheckpointIn &cp, const string &name, ExtMachInst &machInst)
void swExplictBegin(ThreadContext *tc)
virtual void process()
virtual process function that is invoked when the callback queue is executed.
bool findNearestSymbol(Addr addr, std::string &symbol, Addr &symaddr, Addr &nextaddr) const
Find the nearest symbol equal to or less than the supplied address (e.g., the label for the enclosing...
void serialize(CheckpointOut &cp) const override
void dump()
Dump all statistics data to the registered outputs.
void swAq(ThreadContext *tc)
void unserialize(CheckpointIn &cp) override
AnnotateDumpCallback(CPA *_cpa)
Abstract superclass for simulation objects.
void swSmBegin(ThreadContext *tc)
void objParamIn(CheckpointIn &cp, const string &name, SimObject *¶m)
void swQ(ThreadContext *tc)