Profiler.cc (7055:4e24742201d7) Profiler.cc (7056:b66b558578bd)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 32 unchanged lines hidden (view full) ---

41
42 ----------------------------------------------------------------------
43*/
44
45// Allows use of times() library call, which determines virtual runtime
46#include <sys/resource.h>
47#include <sys/times.h>
48
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 32 unchanged lines hidden (view full) ---

41
42 ----------------------------------------------------------------------
43*/
44
45// Allows use of times() library call, which determines virtual runtime
46#include <sys/resource.h>
47#include <sys/times.h>
48
49#include "base/str.hh"
49#include "mem/gems_common/Map.hh"
50#include "mem/gems_common/PrioHeap.hh"
50#include "mem/gems_common/Map.hh"
51#include "mem/gems_common/PrioHeap.hh"
51#include "mem/gems_common/util.hh"
52#include "mem/protocol/CacheMsg.hh"
53#include "mem/protocol/MachineType.hh"
54#include "mem/protocol/Protocol.hh"
55#include "mem/ruby/common/Debug.hh"
56#include "mem/ruby/network/Network.hh"
57#include "mem/ruby/profiler/AddressProfiler.hh"
58#include "mem/ruby/profiler/Profiler.hh"
59#include "mem/ruby/system/System.hh"

--- 295 unchanged lines hidden (view full) ---

355
356 Vector<string> requestProfileKeys = m_requestProfileMap_ptr->keys();
357 requestProfileKeys.sortVector();
358
359 for (int i = 0; i < requestProfileKeys.size(); i++) {
360 int temp_int =
361 m_requestProfileMap_ptr->lookup(requestProfileKeys[i]);
362 double percent = (100.0 * double(temp_int)) / double(m_requests);
52#include "mem/protocol/CacheMsg.hh"
53#include "mem/protocol/MachineType.hh"
54#include "mem/protocol/Protocol.hh"
55#include "mem/ruby/common/Debug.hh"
56#include "mem/ruby/network/Network.hh"
57#include "mem/ruby/profiler/AddressProfiler.hh"
58#include "mem/ruby/profiler/Profiler.hh"
59#include "mem/ruby/system/System.hh"

--- 295 unchanged lines hidden (view full) ---

355
356 Vector<string> requestProfileKeys = m_requestProfileMap_ptr->keys();
357 requestProfileKeys.sortVector();
358
359 for (int i = 0; i < requestProfileKeys.size(); i++) {
360 int temp_int =
361 m_requestProfileMap_ptr->lookup(requestProfileKeys[i]);
362 double percent = (100.0 * double(temp_int)) / double(m_requests);
363 while (requestProfileKeys[i] != "") {
364 out << setw(10) << string_split(requestProfileKeys[i], ':');
365 }
363 vector<string> items;
364 tokenize(items, requestProfileKeys[i], ':');
365 vector<string>::iterator i = items.begin();
366 vector<string>::iterator end = items.end();
367 for (; i != end; ++i)
368 out << setw(10) << *i;
366 out << setw(11) << temp_int;
367 out << setw(14) << percent << endl;
368 }
369 out << endl;
370
371 out << "filter_action: " << m_filter_action_histogram << endl;
372
373 if (!m_all_instructions) {

--- 322 unchanged lines hidden ---
369 out << setw(11) << temp_int;
370 out << setw(14) << percent << endl;
371 }
372 out << endl;
373
374 out << "filter_action: " << m_filter_action_histogram << endl;
375
376 if (!m_all_instructions) {

--- 322 unchanged lines hidden ---