diff options
author | Gabe Black <gabeblack@google.com> | 2019-05-01 21:43:09 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-05-30 06:07:33 +0000 |
commit | 096598c05a6c352bfd4b93adf06143a43a8f4e11 (patch) | |
tree | 1dcbf980d846035fed6554ae00ca1d2669072b51 /src/base/cp_annotate.cc | |
parent | da7e63d088cd1710ee4f55f7c5481df4fa95e531 (diff) | |
download | gem5-096598c05a6c352bfd4b93adf06143a43a8f4e11.tar.xz |
arch, base, sim: Replace Copy(String)?(In|Out) with equivalent code.
This expands those functions into code which extracts the virt proxy
and then uses the appropriate method on it. This has two benefits.
First, the Copy* functions where mostly redundant wrappers around the
methods the proxy port already had. Second, using them forced a
particular port which might not actually be what the user wanted.
Change-Id: I62084631dd080061e3c74997125164f40da2d77c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18575
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/base/cp_annotate.cc')
-rw-r--r-- | src/base/cp_annotate.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc index 9209ffdd3..b387b99ca 100644 --- a/src/base/cp_annotate.cc +++ b/src/base/cp_annotate.cc @@ -170,7 +170,7 @@ CPA::swSmBegin(ThreadContext *tc) debugSymbolTable->findNearestSymbol( tc->readIntReg(ReturnAddressReg), st, junk); - CopyStringOut(tc, sm, args[0], 50); + tc->getVirtProxy().readString(sm, args[0], 50); System *sys = tc->getSystemPtr(); StringWrap name(sys->name()); @@ -256,7 +256,7 @@ CPA::swSmEnd(ThreadContext *tc) Arguments args(tc); char sm[50]; - CopyStringOut(tc, sm, args[0], 50); + tc->getVirtProxy().readString(sm, args[0], 50); System *sys = tc->getSystemPtr(); doSwSmEnd(sys, tc->contextId(), sm, getFrame(tc)); } @@ -324,7 +324,7 @@ CPA::swExplictBegin(ThreadContext *tc) Arguments args(tc); char st[50]; - CopyStringOut(tc, st, args[1], 50); + tc->getVirtProxy().readString(st, args[1], 50); StringWrap name(tc->getSystemPtr()->name()); DPRINTF(Annotate, "Explict begin of state %s\n", st); @@ -428,7 +428,7 @@ CPA::swQ(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); int32_t count = args[2]; System *sys = tc->getSystemPtr(); @@ -459,7 +459,7 @@ CPA::swDq(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); int32_t count = args[2]; System *sys = tc->getSystemPtr(); @@ -488,7 +488,7 @@ CPA::swPq(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); System *sys = tc->getSystemPtr(); int32_t count = args[2]; @@ -523,7 +523,7 @@ CPA::swRq(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); System *sys = tc->getSystemPtr(); int32_t count = args[2]; @@ -554,7 +554,7 @@ CPA::swWf(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); System *sys = tc->getSystemPtr(); int32_t count = args[3]; @@ -568,7 +568,7 @@ CPA::swWf(ThreadContext *tc) if (!!args[2]) { char sm[50]; - CopyStringOut(tc, sm, args[2], 50); + tc->getVirtProxy().readString(sm, args[2], 50); doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc)); } } @@ -582,7 +582,7 @@ CPA::swWe(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); System *sys = tc->getSystemPtr(); int32_t count = args[3]; @@ -596,7 +596,7 @@ CPA::swWe(ThreadContext *tc) if (!!args[2]) { char sm[50]; - CopyStringOut(tc, sm, args[2], 50); + tc->getVirtProxy().readString(sm, args[2], 50); doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc)); } } @@ -610,7 +610,7 @@ CPA::swSq(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); System *sys = tc->getSystemPtr(); StringWrap name(sys->name()); int32_t size = args[2]; @@ -678,7 +678,7 @@ CPA::swAq(ThreadContext *tc) char q[50]; Arguments args(tc); uint64_t id = args[0]; - CopyStringOut(tc, q, args[1], 50); + tc->getVirtProxy().readString(q, args[1], 50); System *sys = tc->getSystemPtr(); StringWrap name(sys->name()); int32_t size = args[2]; @@ -714,7 +714,7 @@ CPA::swLink(ThreadContext *tc) char lsm[50]; Arguments args(tc); - CopyStringOut(tc, lsm, args[0], 50); + tc->getVirtProxy().readString(lsm, args[0], 50); System *sys = tc->getSystemPtr(); StringWrap name(sys->name()); @@ -738,7 +738,7 @@ CPA::swLink(ThreadContext *tc) if (!!args[2]) { char sm[50]; - CopyStringOut(tc, sm, args[2], 50); + tc->getVirtProxy().readString(sm, args[2], 50); doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc)); } } @@ -789,7 +789,7 @@ CPA::swSyscallLink(ThreadContext *tc) char lsm[50]; Arguments args(tc); - CopyStringOut(tc, lsm, args[0], 50); + tc->getVirtProxy().readString(lsm, args[0], 50); System *sys = tc->getSystemPtr(); StringWrap name(sys->name()); int sysi = getSys(sys); @@ -815,7 +815,7 @@ CPA::swSyscallLink(ThreadContext *tc) if (!!args[1]) { char sm[50]; - CopyStringOut(tc, sm, args[1], 50); + tc->getVirtProxy().readString(sm, args[1], 50); doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc)); } } |