Deleted Added
sdiff udiff text old ( 6896:649e40aad897 ) new ( 6897:cfeb3d9563dd )
full compact
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;

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

85 m_stats_period = 1000000; // Default
86 m_periodic_output_file_ptr = &cerr;
87
88 m_hot_lines = p->hot_lines;
89 m_all_instructions = p->all_instructions;
90
91 m_num_of_sequencers = p->num_of_sequencers;
92
93 m_hot_lines = false;
94 m_all_instructions = false;
95
96 m_address_profiler_ptr = new AddressProfiler(m_num_of_sequencers);
97 m_address_profiler_ptr -> setHotLines(m_hot_lines);
98 m_address_profiler_ptr -> setAllInstructions(m_all_instructions);
99
100 if (m_all_instructions) {

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

105}
106
107Profiler::~Profiler()
108{
109 if (m_periodic_output_file_ptr != &cerr) {
110 delete m_periodic_output_file_ptr;
111 }
112
113 delete m_requestProfileMap_ptr;
114}
115
116void Profiler::wakeup()
117{
118 // FIXME - avoid the repeated code
119
120 Vector<integer_t> perProcCycleCount;

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

318 out << "transactions_ended: " << transactions_ended << " " << m_perProcEndTransaction << endl;
319 out << "cycles_per_transaction: " << cycles_per_transaction << " " << perProcCyclesPerTrans << endl;
320 out << "misses_per_transaction: " << misses_per_transaction << " " << perProcMissesPerTrans << endl;
321
322 out << endl;
323
324 out << endl;
325
326 if (!short_stats) {
327 out << "Busy Controller Counts:" << endl;
328 for(int i=0; i < MachineType_NUM; i++) {
329 for(int j=0; j < MachineType_base_count((MachineType)i); j++) {
330 MachineID machID;
331 machID.type = (MachineType)i;
332 machID.num = j;
333 out << machID << ":" << m_busyControllerCount[i][j] << " ";

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

540 m_requestProfileMap_ptr->clear();
541
542 // count requests profiled
543 m_requests = 0;
544
545 m_outstanding_requests.clear();
546 m_outstanding_persistent_requests.clear();
547
548 // Flush the prefetches through the system - used so that there are no outstanding requests after stats are cleared
549 //g_eventQueue_ptr->triggerAllEvents();
550
551 // update the start time
552 m_ruby_start = g_eventQueue_ptr->getTime();
553}
554
555void Profiler::addAddressTraceSample(const CacheMsg& msg, NodeID id)

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

732 else
733 return false;
734}
735
736int64 Profiler::getTotalTransactionsExecuted() const {
737 return m_perProcEndTransaction.sum();
738}
739
740
741Profiler *
742RubyProfilerParams::create()
743{
744 return new Profiler(this);
745}