From dc8018a5c3482008232e6faaa2d96cf20aed7485 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sat, 6 Feb 2016 17:21:18 -0800 Subject: style: remove trailing whitespace Result of running 'hg m5style --skip-all --fix-white -a'. --- src/base/cp_annotate.cc | 26 ++++++------- src/base/cp_annotate.hh | 84 ++++++++++++++++++++--------------------- src/base/cprintf.hh | 4 +- src/base/flags.hh | 4 +- src/base/inet.cc | 2 +- src/base/inet.hh | 2 +- src/base/loader/ecoff_object.cc | 2 +- src/base/loader/elf_object.cc | 2 +- src/base/statistics.cc | 2 +- 9 files changed, 64 insertions(+), 64 deletions(-) (limited to 'src/base') diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc index 5c421a5cf..70ab31167 100644 --- a/src/base/cp_annotate.cc +++ b/src/base/cp_annotate.cc @@ -180,8 +180,8 @@ CPA::swSmBegin(ThreadContext *tc) int smi = getSm(sysi, sm, args[1]); DPRINTF(Annotate, "Starting machine: %s(%d) sysi: %d id: %#x\n", sm, smi, sysi, args[1]); - DPRINTF(Annotate, "smMap[%d] = %d, %s, %#x\n", smi, - smMap[smi-1].first, smMap[smi-1].second.first, + DPRINTF(Annotate, "smMap[%d] = %d, %s, %#x\n", smi, + smMap[smi-1].first, smMap[smi-1].second.first, smMap[smi-1].second.second); uint64_t frame = getFrame(tc); @@ -226,7 +226,7 @@ CPA::swSmBegin(ThreadContext *tc) scLinks[sysi-1].erase(id); an->stq = smi; an->dump = true; - DPRINTF(Annotate, + DPRINTF(Annotate, "Found prev unknown linking from %d to state machine %s(%d)\n", an->sm, sm, smi); @@ -288,11 +288,11 @@ CPA::doSwSmEnd(System *sys, int cpuid, string sm, uint64_t frame) warn("State machine stack not unwinding correctly at %d\n", curTick()); } else { - DPRINTF(Annotate, + DPRINTF(Annotate, "State machine ending:%s sysi:%d id:%#x back:%d getSm:%d\n", sm, sysi, smMap[smib-1].second.second, smStack[sid].back(), getSm(sysi, sm, smMap[smib-1].second.second)); - assert(getSm(sysi, sm, smMap[smib-1].second.second) == + assert(getSm(sysi, sm, smMap[smib-1].second.second) == smStack[sid].back()); int smi = smStack[sid].back(); @@ -400,7 +400,7 @@ CPA::swEnd(ThreadContext *tc) tc->readIntReg(ReturnAddressReg), st, junk); System *sys = tc->getSystemPtr(); StringWrap name(sys->name()); - + int sysi = getSys(sys); StackId sid = StackId(sysi, getFrame(tc)); if (!smStack[sid].size()) { @@ -443,7 +443,7 @@ CPA::swQ(ThreadContext *tc) //warn("Tried to queue 0 bytes in %s, ignoring\n", q); return; } - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "swQ: %s[%#x] cur size %d %d bytes: %d adding: %d\n", q, id, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); doQ(sys, FL_NONE, tc->contextId(), smi, q, qi, count); @@ -470,7 +470,7 @@ CPA::swDq(ThreadContext *tc) int qi = getQ(sysi, q, id); if (swExpl[sid]) swExpl[sid] = false; - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "swDq: %s[%#x] cur size %d %d bytes: %d removing: %d\n", q, id, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); assert(count != 0); @@ -499,7 +499,7 @@ CPA::swPq(ThreadContext *tc) int qi = getQ(sysi, q, id); if (swExpl[sid]) swExpl[sid] = false; - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "swPq: %s [%#x] cur size %d %d bytes: %d peeking: %d\n", q, id, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); @@ -534,7 +534,7 @@ CPA::swRq(ThreadContext *tc) int qi = getQ(sysi, q, id); if (swExpl[sid]) swExpl[sid] = false; - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "swRq: %s [%#x] cur size %d %d bytes: %d reserve: %d\n", q, id, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); @@ -696,7 +696,7 @@ CPA::swAq(ThreadContext *tc) x++; } - warn("%d: Queue Assert: SW said there should be %d byte(s) in %s," + warn("%d: Queue Assert: SW said there should be %d byte(s) in %s," "however there are %d byte(s)\n", curTick(), size, q, qBytes[qi-1]); DPRINTF(AnnotateQ, "%d: Queue Assert: SW said there should be %d" @@ -805,7 +805,7 @@ CPA::swSyscallLink(ThreadContext *tc) smi, lsm); if (scLinks[sysi-1][id]) - DPRINTF(Annotate, + DPRINTF(Annotate, "scLinks already contains entry for system %d %s[%x] of %d\n", sysi, lsm, getFrame(tc), scLinks[sysi-1][id]); assert(scLinks[sysi-1][id] == 0); @@ -837,7 +837,7 @@ CPA::add(int t, int f, int c, int sm, int stq, int32_t d) DPRINTF(AnnotateVerbose, "Annotate: op: %d flags: 0x%x sm: %d state: %d time: %d, data: %d\n", an->op, an->flag, an->sm, an->stq, an->time, an->data); - + // Don't dump Links because we might be setting no-dump on it if (an->op != OP_LINK) dump(false); diff --git a/src/base/cp_annotate.hh b/src/base/cp_annotate.hh index 0a0cc34a3..587ea0f1a 100644 --- a/src/base/cp_annotate.hh +++ b/src/base/cp_annotate.hh @@ -101,25 +101,25 @@ class CPA void swIdentify(ThreadContext *tc) { return; } uint64_t swGetId(ThreadContext *tc) { return 0; } void swSyscallLink(ThreadContext *tc) { return; } - void hwBegin(flags f, System *sys, uint64_t frame, std::string sm, + 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, - std::string q, uint64_t qid, System *q_sys = NULL, + void hwQ(flags f, System *sys, uint64_t frame, std::string sm, + std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { return; } - void hwDq(flags f, System *sys, uint64_t frame, std::string sm, - std::string q, uint64_t qid, System *q_sys = NULL, + void hwDq(flags f, System *sys, uint64_t frame, std::string sm, + std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { return; } - void hwPq(flags f, System *sys, uint64_t frame, std::string sm, - std::string q, uint64_t qid, System *q_sys = NULL, + void hwPq(flags f, System *sys, uint64_t frame, std::string sm, + std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { return; } - void hwRq(flags f, System *sys, uint64_t frame, std::string sm, - std::string q, uint64_t qid, System *q_sys = NULL, + void hwRq(flags f, System *sys, uint64_t frame, std::string sm, + std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { return; } - void hwWf(flags f, System *sys, uint64_t frame, std::string sm, - std::string q, uint64_t qid, System *q_sys = NULL, + void hwWf(flags f, System *sys, uint64_t frame, std::string sm, + std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { return; } - void hwWe(flags f, System *sys, uint64_t frame, std::string sm, - std::string q, uint64_t qid, System *q_sys = NULL, + void hwWe(flags f, System *sys, uint64_t frame, std::string sm, + std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { return; } }; #else @@ -145,7 +145,7 @@ class CPA : SimObject { public: typedef CPAParams Params; - + /** The known operations that are written to the annotation output file. */ enum ops { OP_BEGIN = 0x01, @@ -171,7 +171,7 @@ class CPA : SimObject /* Queue like a stack, not a queue */ FL_QOPP = 0x04, /* Mark HW state as waiting for some non-resource constraint - * (e.g. wait because SM only starts after 10 items are queued) */ + * (e.g. wait because SM only starts after 10 items are queued) */ FL_WAIT = 0x08, /* operation is linking to another state machine */ FL_LINK = 0x10, @@ -222,9 +222,9 @@ class CPA : SimObject std::vector annotateIdx; - // number of state machines encountered in the simulation + // number of state machines encountered in the simulation int numSm; - // number of states encountered in the simulation + // number of states encountered in the simulation int numSmt; // number of states/queues for a given state machine/system respectively std::vector numSt, numQ; @@ -291,7 +291,7 @@ class CPA : SimObject NameCache nameCache; // Stack of state machines currently nested (should unwind correctly) SmStack smStack; - // Map of currently outstanding links + // Map of currently outstanding links LinkMap lnMap; // If the state machine is currently exculding automatic changes SwExpl swExpl; @@ -299,7 +299,7 @@ class CPA : SimObject IMap lastState; // Hold mapping of sm and queues to output python IdMap smMap, qMap; - // Items still in queue, used for sanity checking + // Items still in queue, used for sanity checking std::vector qData; void doDq(System *sys, int flags, int cpu, int sm, std::string q, int qi, @@ -311,7 +311,7 @@ class CPA : SimObject // Turn a system id, state machine string, state machine id into a small int // for annotation output - int + int getSm(int sysi, std::string si, uint64_t id) { int smi; @@ -328,7 +328,7 @@ class CPA : SimObject // Turn a state machine string, state string into a small int // for annotation output - int + int getSt(std::string sm, std::string s) { int sti, smi; @@ -351,7 +351,7 @@ class CPA : SimObject } // Turn state machine pointer into a smal int for annotation output - int + int getSys(System *s) { NameCache::iterator i = nameCache.find(s); @@ -369,9 +369,9 @@ class CPA : SimObject return i->second.second; } - // Turn queue name, and queue context into small int for + // Turn queue name, and queue context into small int for // annotation output - int + int getQ(int sys, std::string q, uint64_t id) { int qi; @@ -390,7 +390,7 @@ class CPA : SimObject return qi; } - void swBegin(System *sys, int cpuid, std::string st, uint64_t frame, + void swBegin(System *sys, int cpuid, std::string st, uint64_t frame, bool expl = false, int flags = FL_NONE); AnnDataPtr add(int t, int f, int c, int sm, int stq, int32_t data=0); @@ -399,7 +399,7 @@ class CPA : SimObject bool _enabled; - /** Only allow one CPA object in a system. It doesn't make sense to have + /** Only allow one CPA object in a system. It doesn't make sense to have * more that one per simulation because if a part of the system was * important it would have annotations and queues, and with more than one * object none of the sanity checking for queues will work. */ @@ -429,7 +429,7 @@ class CPA : SimObject uint64_t swGetId(ThreadContext *tc); void swSyscallLink(ThreadContext *tc); - inline void hwBegin(flags f, System *sys, uint64_t frame, std::string sm, + inline void hwBegin(flags f, System *sys, uint64_t frame, std::string sm, std::string st) { if (!enabled()) @@ -442,7 +442,7 @@ class CPA : SimObject warn("BAD state encountered: at cycle %d: %s\n", curTick(), st); } - inline void hwQ(flags f, System *sys, uint64_t frame, std::string sm, + inline void hwQ(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { if (!enabled()) @@ -450,14 +450,14 @@ class CPA : SimObject int sysi = getSys(sys); int qi = getQ(q_sys ? getSys(q_sys) : sysi, q, qid); - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "hwQ: %s[%#x] cur size %d %d bytes: %d adding: %d\n", q, qid, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); doQ(sys, FL_HW | f, 0, getSm(sysi, sm, frame), q, qi, count); } - inline void hwDq(flags f, System *sys, uint64_t frame, std::string sm, + inline void hwDq(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { if (!enabled()) @@ -465,13 +465,13 @@ class CPA : SimObject int sysi = getSys(sys); int qi = getQ(q_sys ? getSys(q_sys) : sysi, q, qid); - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "hwDQ: %s[%#x] cur size %d %d bytes: %d removing: %d\n", q, qid, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); doDq(sys, FL_HW | f, 0, getSm(sysi,sm, frame), q, qi, count); } - inline void hwPq(flags f, System *sys, uint64_t frame, std::string sm, + inline void hwPq(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { if (!enabled()) @@ -479,13 +479,13 @@ class CPA : SimObject int sysi = getSys(sys); int qi = getQ(q_sys ? getSys(q_sys) : sysi, q, qid); - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "hwPQ: %s[%#x] cur size %d %d bytes: %d peeking: %d\n", q, qid, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); add(OP_PEEK, FL_HW | f, 0, getSm(sysi, sm, frame), qi, count); } - inline void hwRq(flags f, System *sys, uint64_t frame, std::string sm, + inline void hwRq(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { if (!enabled()) @@ -493,13 +493,13 @@ class CPA : SimObject int sysi = getSys(sys); int qi = getQ(q_sys ? getSys(q_sys) : sysi, q, qid); - DPRINTFS(AnnotateQ, sys, + DPRINTFS(AnnotateQ, sys, "hwRQ: %s[%#x] cur size %d %d bytes: %d reserving: %d\n", q, qid, qSize[qi-1], qData[qi-1].size(), qBytes[qi-1], count); add(OP_RESERVE, FL_HW | f, 0, getSm(sysi, sm, frame), qi, count); } - inline void hwWf(flags f, System *sys, uint64_t frame, std::string sm, + inline void hwWf(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { if (!enabled()) @@ -510,8 +510,8 @@ class CPA : SimObject add(OP_WAIT_FULL, FL_HW | f, 0, getSm(sysi, sm, frame), qi, count); } - inline void hwWe(flags f, System *sys, uint64_t frame, std::string sm, - std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) + inline void hwWe(flags f, System *sys, uint64_t frame, std::string sm, + std::string q, uint64_t qid, System *q_sys = NULL, int32_t count = 1) { if (!enabled()) return; @@ -529,14 +529,14 @@ class CPA : SimObject static bool available() { return true; } - bool - enabled() - { + bool + enabled() + { if (!this) return false; return _enabled; } - + void dump(bool all); void dumpKey(); diff --git a/src/base/cprintf.hh b/src/base/cprintf.hh index 94a74728d..14b663c9c 100644 --- a/src/base/cprintf.hh +++ b/src/base/cprintf.hh @@ -69,7 +69,7 @@ struct Print { return data; } - + template int get_number(const T& data) @@ -90,7 +90,7 @@ struct Print fmt.width = get_number(data); return; } - + if (fmt.get_precision) { fmt.get_precision = false; cont = true; diff --git a/src/base/flags.hh b/src/base/flags.hh index 2e0506391..caf23492a 100644 --- a/src/base/flags.hh +++ b/src/base/flags.hh @@ -44,7 +44,7 @@ class Flags operator const Type() const { return _flags; } - template + template const Flags & operator=(const Flags &flags) { @@ -58,7 +58,7 @@ class Flags _flags = flags; return *this; } - + bool isSet() const { return _flags; } bool isSet(Type flags) const { return (_flags & flags); } bool allSet() const { return !(~_flags); } diff --git a/src/base/inet.cc b/src/base/inet.cc index 190a7a11e..866b77fcf 100644 --- a/src/base/inet.cc +++ b/src/base/inet.cc @@ -374,7 +374,7 @@ TcpHdr::options(vector &vec) const return true; } -int +int hsplit(const EthPacketPtr &ptr) { int split_point = 0; diff --git a/src/base/inet.hh b/src/base/inet.hh index d7e003970..7d1235cc5 100644 --- a/src/base/inet.hh +++ b/src/base/inet.hh @@ -521,7 +521,7 @@ struct TcpHdr : public tcp_hdr void sum(uint16_t sum) { th_sum = sum; } void seq(uint32_t _seq) { th_seq = htonl(_seq); } - void flags(uint8_t _flags) { th_flags = _flags; } + void flags(uint8_t _flags) { th_flags = _flags; } bool options(std::vector &vec) const; diff --git a/src/base/loader/ecoff_object.cc b/src/base/loader/ecoff_object.cc index 3b9f6ba3f..c3c1c1108 100644 --- a/src/base/loader/ecoff_object.cc +++ b/src/base/loader/ecoff_object.cc @@ -39,7 +39,7 @@ // Only alpha will be able to load ecoff files for now. // base/types.hh and ecoff_machdep.h must be before the other .h files -// because they are are gathered from other code bases and require some +// because they are are gathered from other code bases and require some // typedefs from those files. #include "arch/alpha/ecoff_machdep.h" #include "base/loader/coff_sym.h" diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc index d1d89f20b..c9684c42a 100644 --- a/src/base/loader/elf_object.cc +++ b/src/base/loader/elf_object.cc @@ -347,7 +347,7 @@ ElfObject::ElfObject(const string &_filename, size_t _len, uint8_t *_data, data.size = phdr.p_filesz; data.fileImage = fileData + phdr.p_offset; } else { - // If it's none of the above but is loadable, + // If it's none of the above but is loadable, // load the filesize worth of data Segment extra; extra.baseAddr = phdr.p_paddr; diff --git a/src/base/statistics.cc b/src/base/statistics.cc index b63e69b68..131c74566 100644 --- a/src/base/statistics.cc +++ b/src/base/statistics.cc @@ -178,7 +178,7 @@ Info::setName(const string &name) Info *other = p.first->second; bool result = p.second; - + if (!result) { // using other->name instead of just name to avoid a compiler // warning. They should be the same. -- cgit v1.2.3