}
void
-CPA::swSmBegin(ThreadContext *tc)
+CPA::swSmBegin(ThreadContext *tc, Addr sm_string, int32_t sm_id, int32_t flags)
{
if (!enabled())
return;
- Arguments args(tc);
std::string st;
Addr junk;
char sm[50];
debugSymbolTable->findNearestSymbol(
tc->readIntReg(ReturnAddressReg), st, junk);
- tc->getVirtProxy().readString(sm, args[0], 50);
+ tc->getVirtProxy().readString(sm, sm_string, 50);
System *sys = tc->getSystemPtr();
StringWrap name(sys->name());
warn("Got null SM at tick %d\n", curTick());
int sysi = getSys(sys);
- int smi = getSm(sysi, sm, args[1]);
+ int smi = getSm(sysi, sm, sm_id);
DPRINTF(Annotate, "Starting machine: %s(%d) sysi: %d id: %#x\n", sm,
- smi, sysi, args[1]);
+ smi, sysi, sm_id);
DPRINTF(Annotate, "smMap[%d] = %d, %s, %#x\n", smi,
smMap[smi-1].first, smMap[smi-1].second.first,
smMap[smi-1].second.second);
StackId sid = StackId(sysi, frame);
// check if we need to link to the previous state machine
- int flags = args[2];
if (flags & FL_LINK) {
if (smStack[sid].size()) {
int prev_smi = smStack[sid].back();
DPRINTF(Annotate, "Linking from %d to state machine %s(%d) [%#x]\n",
- prev_smi, sm, smi, args[1]);
+ prev_smi, sm, smi, sm_id);
if (lnMap[smi])
DPRINTF(Annotate, "LnMap already contains entry for %d of %d\n",
add(OP_LINK, FL_NONE, tc->contextId(), prev_smi, smi);
} else {
DPRINTF(Annotate, "Not Linking to state machine %s(%d) [%#x]\n",
- sm, smi, args[1]);
+ sm, smi, sm_id);
}
}
}
void
-CPA::swSmEnd(ThreadContext *tc)
+CPA::swSmEnd(ThreadContext *tc, Addr sm_string)
{
if (!enabled())
return;
- Arguments args(tc);
char sm[50];
- tc->getVirtProxy().readString(sm, args[0], 50);
+ tc->getVirtProxy().readString(sm, sm_string, 50);
System *sys = tc->getSystemPtr();
doSwSmEnd(sys, tc->contextId(), sm, getFrame(tc));
}
void
-CPA::swExplictBegin(ThreadContext *tc)
+CPA::swExplictBegin(ThreadContext *tc, int32_t flags, Addr st_string)
{
if (!enabled())
return;
- Arguments args(tc);
char st[50];
- tc->getVirtProxy().readString(st, args[1], 50);
+ tc->getVirtProxy().readString(st, st_string, 50);
StringWrap name(tc->getSystemPtr()->name());
DPRINTF(Annotate, "Explict begin of state %s\n", st);
- uint32_t flags = args[0];
if (flags & FL_BAD)
warn("BAD state encountered: at cycle %d: %s\n", curTick(), st);
- swBegin(tc->getSystemPtr(), tc->contextId(), st, getFrame(tc), true, args[0]);
+ swBegin(tc->getSystemPtr(), tc->contextId(),
+ st, getFrame(tc), true, flags);
}
void
}
void
-CPA::swQ(ThreadContext *tc)
+CPA::swQ(ThreadContext *tc, Addr id, Addr q_string, int32_t count)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
- int32_t count = args[2];
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
int sysi = getSys(sys);
}
void
-CPA::swDq(ThreadContext *tc)
+CPA::swDq(ThreadContext *tc, Addr id, Addr q_string, int32_t count)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
- int32_t count = args[2];
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
int sysi = getSys(sys);
}
void
-CPA::swPq(ThreadContext *tc)
+CPA::swPq(ThreadContext *tc, Addr id, Addr q_string, int32_t count)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
- int32_t count = args[2];
int sysi = getSys(sys);
StackId sid = StackId(sysi, getFrame(tc));
}
void
-CPA::swRq(ThreadContext *tc)
+CPA::swRq(ThreadContext *tc, Addr id, Addr q_string, int32_t count)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
- int32_t count = args[2];
int sysi = getSys(sys);
StackId sid = StackId(sysi, getFrame(tc));
void
-CPA::swWf(ThreadContext *tc)
+CPA::swWf(ThreadContext *tc, Addr id, Addr q_string, Addr sm_string,
+ int32_t count)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
- int32_t count = args[3];
int sysi = getSys(sys);
StackId sid = StackId(sysi, getFrame(tc));
int qi = getQ(sysi, q, id);
add(OP_WAIT_FULL, FL_NONE, tc->contextId(), smi, qi, count);
- if (!!args[2]) {
+ if (!!sm_string) {
char sm[50];
- tc->getVirtProxy().readString(sm, args[2], 50);
+ tc->getVirtProxy().readString(sm, sm_string, 50);
doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc));
}
}
void
-CPA::swWe(ThreadContext *tc)
+CPA::swWe(ThreadContext *tc, Addr id, Addr q_string, Addr sm_string,
+ int32_t count)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
- int32_t count = args[3];
int sysi = getSys(sys);
StackId sid = StackId(sysi, getFrame(tc));
int qi = getQ(sysi, q, id);
add(OP_WAIT_EMPTY, FL_NONE, tc->contextId(), smi, qi, count);
- if (!!args[2]) {
+ if (!!sm_string) {
char sm[50];
- tc->getVirtProxy().readString(sm, args[2], 50);
+ tc->getVirtProxy().readString(sm, sm_string, 50);
doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc));
}
}
void
-CPA::swSq(ThreadContext *tc)
+CPA::swSq(ThreadContext *tc, Addr id, Addr q_string, int32_t size,
+ int32_t flags)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
StringWrap name(sys->name());
- int32_t size = args[2];
- int flags = args[3];
int sysi = getSys(sys);
StackId sid = StackId(sysi, getFrame(tc));
}
void
-CPA::swAq(ThreadContext *tc)
+CPA::swAq(ThreadContext *tc, Addr id, Addr q_string, int32_t size)
{
if (!enabled())
return;
char q[50];
- Arguments args(tc);
- uint64_t id = args[0];
- tc->getVirtProxy().readString(q, args[1], 50);
+ tc->getVirtProxy().readString(q, q_string, 50);
System *sys = tc->getSystemPtr();
StringWrap name(sys->name());
- int32_t size = args[2];
int sysi = getSys(sys);
int qi = getQ(sysi, q, id);
}
void
-CPA::swLink(ThreadContext *tc)
+CPA::swLink(ThreadContext *tc, Addr lsm_string, Addr lsm_id, Addr sm_string)
{
if (!enabled())
return;
char lsm[50];
- Arguments args(tc);
- tc->getVirtProxy().readString(lsm, args[0], 50);
+ tc->getVirtProxy().readString(lsm, lsm_string, 50);
System *sys = tc->getSystemPtr();
StringWrap name(sys->name());
if (!smStack[sid].size())
return;
int smi = smStack[sid].back();
- int lsmi = getSm(sysi, lsm, args[1]);
+ int lsmi = getSm(sysi, lsm, lsm_id);
DPRINTF(Annotate, "Linking from %d to state machine %s(%d) [%#x]\n",
- smi, lsm, lsmi, args[1]);
+ smi, lsm, lsmi, lsm_id);
if (lnMap[lsmi])
DPRINTF(Annotate, "LnMap already contains entry for %d of %d\n",
add(OP_LINK, FL_NONE, tc->contextId(), smi, lsmi);
- if (!!args[2]) {
+ if (!!sm_string) {
char sm[50];
- tc->getVirtProxy().readString(sm, args[2], 50);
+ tc->getVirtProxy().readString(sm, sm_string, 50);
doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc));
}
}
void
-CPA::swIdentify(ThreadContext *tc)
+CPA::swIdentify(ThreadContext *tc, Addr smi_string)
{
if (!enabled())
return;
- Arguments args(tc);
int sysi = getSys(tc->getSystemPtr());
StackId sid = StackId(sysi, getFrame(tc));
if (!smStack[sid].size())
return;
int smi = smStack[sid].back();
- DPRINTFS(Annotate, tc->getSystemPtr(), "swIdentify: id %#X\n", args[0]);
+ DPRINTFS(Annotate, tc->getSystemPtr(), "swIdentify: id %#X\n", smi_string);
- add(OP_IDENT, FL_NONE, tc->contextId(), smi, 0, args[0]);
+ add(OP_IDENT, FL_NONE, tc->contextId(), smi, 0, smi_string);
}
uint64_t
void
-CPA::swSyscallLink(ThreadContext *tc)
+CPA::swSyscallLink(ThreadContext *tc, Addr lsm_string, Addr sm_string)
{
if (!enabled())
return;
char lsm[50];
- Arguments args(tc);
- tc->getVirtProxy().readString(lsm, args[0], 50);
+ tc->getVirtProxy().readString(lsm, lsm_string, 50);
System *sys = tc->getSystemPtr();
StringWrap name(sys->name());
int sysi = getSys(sys);
scLinks[sysi-1][id] = add(OP_LINK, FL_NONE, tc->contextId(), smi, 0xFFFF);
scLinks[sysi-1][id]->dump = false;
- if (!!args[1]) {
+ if (!!sm_string) {
char sm[50];
- tc->getVirtProxy().readString(sm, args[1], 50);
+ tc->getVirtProxy().readString(sm, sm_string, 50);
doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc));
}
}
static CPA *cpa() { return NULL; }
static bool available() { return false; }
bool enabled() { return false; }
- void swSmBegin(ThreadContext *tc) { return; }
- void swSmEnd(ThreadContext *tc) { return; }
- void swExplictBegin(ThreadContext *tc) { return; }
+ void swSmBegin(ThreadContext *tc, Addr sm_string,
+ int32_t sm_id, int32_t flags) { return; }
+ void swSmEnd(ThreadContext *tc, Addr sm_string) { return; }
+ void swExplictBegin(ThreadContext *tc, int32_t flags,
+ Addr st_string) { return; }
void swAutoBegin(ThreadContext *tc, Addr next_pc) { return; }
void swEnd(ThreadContext *tc) { return; }
- void swQ(ThreadContext *tc) { return; }
- void swDq(ThreadContext *tc) { return; }
- void swPq(ThreadContext *tc) { return; }
- void swRq(ThreadContext *tc) { return; }
- void swWf(ThreadContext *tc) { return; }
- void swWe(ThreadContext *tc) { return; }
- void swSq(ThreadContext *tc) { return; }
- void swAq(ThreadContext *tc) { return; }
- void swLink(ThreadContext *tc) { return; }
- void swIdentify(ThreadContext *tc) { return; }
+ void swQ(ThreadContext *tc, Addr id, Addr q_string,
+ int32_t count) { return; }
+ void swDq(ThreadContext *tc, Addr id, Addr q_string,
+ int32_t count) { return; }
+ void swPq(ThreadContext *tc, Addr id, Addr q_string,
+ int32_t count) { return; }
+ void swRq(ThreadContext *tc, Addr id, Addr q_string,
+ int32_t count) { return; }
+ void swWf(ThreadContext *tc, Addr id, Addr q_string,
+ Addr sm_string, int32_t count) { return; }
+ void swWe(ThreadContext *tc, Addr id, Addr q_string,
+ Addr sm_string, int32_t count) { return; }
+ void swSq(ThreadContext *tc, Addr id, Addr q_string,
+ int32_t size, int32_t flags) { return; }
+ void swAq(ThreadContext *tc, Addr id, Addr q_string,
+ int32_t size) { return; }
+ void swLink(ThreadContext *tc, Addr lsm_string,
+ Addr lsm_id, Addr sm_string) { return; }
+ void swIdentify(ThreadContext *tc, Addr smi_string) { return; }
uint64_t swGetId(ThreadContext *tc) { return 0; }
- void swSyscallLink(ThreadContext *tc) { return; }
+ void swSyscallLink(ThreadContext *tc, Addr lsm_string,
+ Addr sm_string) { return; }
void hwBegin(flags f, System *sys, uint64_t frame, std::string sm,
std::string st) { return; }
void hwQ(flags f, System *sys, uint64_t frame, std::string sm,