diff options
author | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
commit | 141f61d83a23096dcff20df704bdd734c520f535 (patch) | |
tree | ee2383d721a039bb056bd6442a7241aa305d187e /src/mem/ruby/profiler | |
parent | f1c3f3044b73d890ffdfdd113b3b37ae2809d21b (diff) | |
download | gem5-141f61d83a23096dcff20df704bdd734c520f535.tar.xz |
ruby: get rid of gems_common/util.hh and .cc and use stuff in src/base
Diffstat (limited to 'src/mem/ruby/profiler')
-rw-r--r-- | src/mem/ruby/profiler/Profiler.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/ruby/profiler/Profiler.cc b/src/mem/ruby/profiler/Profiler.cc index fc67f0052..aa23388ee 100644 --- a/src/mem/ruby/profiler/Profiler.cc +++ b/src/mem/ruby/profiler/Profiler.cc @@ -46,9 +46,9 @@ #include <sys/resource.h> #include <sys/times.h> +#include "base/str.hh" #include "mem/gems_common/Map.hh" #include "mem/gems_common/PrioHeap.hh" -#include "mem/gems_common/util.hh" #include "mem/protocol/CacheMsg.hh" #include "mem/protocol/MachineType.hh" #include "mem/protocol/Protocol.hh" @@ -360,9 +360,12 @@ Profiler::printStats(ostream& out, bool short_stats) int temp_int = m_requestProfileMap_ptr->lookup(requestProfileKeys[i]); double percent = (100.0 * double(temp_int)) / double(m_requests); - while (requestProfileKeys[i] != "") { - out << setw(10) << string_split(requestProfileKeys[i], ':'); - } + vector<string> items; + tokenize(items, requestProfileKeys[i], ':'); + vector<string>::iterator i = items.begin(); + vector<string>::iterator end = items.end(); + for (; i != end; ++i) + out << setw(10) << *i; out << setw(11) << temp_int; out << setw(14) << percent << endl; } |