From 141f61d83a23096dcff20df704bdd734c520f535 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 2 Apr 2010 11:20:32 -0700 Subject: ruby: get rid of gems_common/util.hh and .cc and use stuff in src/base --- src/mem/ruby/profiler/Profiler.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/mem/ruby/profiler/Profiler.cc') 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 #include +#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 items; + tokenize(items, requestProfileKeys[i], ':'); + vector::iterator i = items.begin(); + vector::iterator end = items.end(); + for (; i != end; ++i) + out << setw(10) << *i; out << setw(11) << temp_int; out << setw(14) << percent << endl; } -- cgit v1.2.3