Profiler.cc (7832:de7601e6e19d) | Profiler.cc (8165:5955406f7ed0) |
---|---|
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; --- 306 unchanged lines hidden (view full) --- 315 316 out << endl; 317 318 out << "All Non-Zero Cycle SW Prefetch Requests" << endl; 319 out << "------------------------------------" << endl; 320 out << "prefetch_latency: " << m_allSWPrefetchLatencyHistogram << endl; 321 for (int i = 0; i < m_SWPrefetchLatencyHistograms.size(); i++) { 322 if (m_SWPrefetchLatencyHistograms[i].size() > 0) { | 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; --- 306 unchanged lines hidden (view full) --- 315 316 out << endl; 317 318 out << "All Non-Zero Cycle SW Prefetch Requests" << endl; 319 out << "------------------------------------" << endl; 320 out << "prefetch_latency: " << m_allSWPrefetchLatencyHistogram << endl; 321 for (int i = 0; i < m_SWPrefetchLatencyHistograms.size(); i++) { 322 if (m_SWPrefetchLatencyHistograms[i].size() > 0) { |
323 out << "prefetch_latency_" << CacheRequestType(i) << ": " | 323 out << "prefetch_latency_" << RubyRequestType(i) << ": " |
324 << m_SWPrefetchLatencyHistograms[i] << endl; 325 } 326 } 327 for (int i = 0; i < m_SWPrefetchMachLatencyHistograms.size(); i++) { 328 if (m_SWPrefetchMachLatencyHistograms[i].size() > 0) { 329 out << "prefetch_latency_" << GenericMachineType(i) << ": " 330 << m_SWPrefetchMachLatencyHistograms[i] << endl; 331 } --- 163 unchanged lines hidden (view full) --- 495 m_wCCFirstResponseToCompleteHistogram.clear(200); 496 m_wCCIncompleteTimes = 0; 497 m_dirIssueToInitialRequestHistogram.clear(200); 498 m_dirInitialRequestToForwardRequestHistogram.clear(200); 499 m_dirForwardRequestToFirstResponseHistogram.clear(200); 500 m_dirFirstResponseToCompleteHistogram.clear(200); 501 m_dirIncompleteTimes = 0; 502 | 324 << m_SWPrefetchLatencyHistograms[i] << endl; 325 } 326 } 327 for (int i = 0; i < m_SWPrefetchMachLatencyHistograms.size(); i++) { 328 if (m_SWPrefetchMachLatencyHistograms[i].size() > 0) { 329 out << "prefetch_latency_" << GenericMachineType(i) << ": " 330 << m_SWPrefetchMachLatencyHistograms[i] << endl; 331 } --- 163 unchanged lines hidden (view full) --- 495 m_wCCFirstResponseToCompleteHistogram.clear(200); 496 m_wCCIncompleteTimes = 0; 497 m_dirIssueToInitialRequestHistogram.clear(200); 498 m_dirInitialRequestToForwardRequestHistogram.clear(200); 499 m_dirForwardRequestToFirstResponseHistogram.clear(200); 500 m_dirFirstResponseToCompleteHistogram.clear(200); 501 m_dirIncompleteTimes = 0; 502 |
503 m_SWPrefetchLatencyHistograms.resize(CacheRequestType_NUM); | 503 m_SWPrefetchLatencyHistograms.resize(RubyRequestType_NUM); |
504 for (int i = 0; i < m_SWPrefetchLatencyHistograms.size(); i++) { 505 m_SWPrefetchLatencyHistograms[i].clear(200); 506 } 507 m_SWPrefetchMachLatencyHistograms.resize(GenericMachineType_NUM+1); 508 for (int i = 0; i < m_SWPrefetchMachLatencyHistograms.size(); i++) { 509 m_SWPrefetchMachLatencyHistograms[i].clear(200); 510 } 511 m_allSWPrefetchLatencyHistogram.clear(200); --- 20 unchanged lines hidden (view full) --- 532 533 // update the start time 534 m_ruby_start = g_eventQueue_ptr->getTime(); 535} 536 537void 538Profiler::addAddressTraceSample(const CacheMsg& msg, NodeID id) 539{ | 504 for (int i = 0; i < m_SWPrefetchLatencyHistograms.size(); i++) { 505 m_SWPrefetchLatencyHistograms[i].clear(200); 506 } 507 m_SWPrefetchMachLatencyHistograms.resize(GenericMachineType_NUM+1); 508 for (int i = 0; i < m_SWPrefetchMachLatencyHistograms.size(); i++) { 509 m_SWPrefetchMachLatencyHistograms[i].clear(200); 510 } 511 m_allSWPrefetchLatencyHistogram.clear(200); --- 20 unchanged lines hidden (view full) --- 532 533 // update the start time 534 m_ruby_start = g_eventQueue_ptr->getTime(); 535} 536 537void 538Profiler::addAddressTraceSample(const CacheMsg& msg, NodeID id) 539{ |
540 if (msg.getType() != CacheRequestType_IFETCH) { | 540 if (msg.getType() != RubyRequestType_IFETCH) { |
541 // Note: The following line should be commented out if you 542 // want to use the special profiling that is part of the GS320 543 // protocol 544 545 // NOTE: Unless PROFILE_HOT_LINES is enabled, nothing will be 546 // profiled by the AddressProfiler 547 m_address_profiler_ptr-> 548 addTraceSample(msg.getLineAddress(), msg.getProgramCounter(), --- 129 unchanged lines hidden (view full) --- 678 } else { 679 m_dirIncompleteTimes++; 680 } 681} 682 683// non-zero cycle prefetch request 684void 685Profiler::swPrefetchLatency(Time cycles, | 541 // Note: The following line should be commented out if you 542 // want to use the special profiling that is part of the GS320 543 // protocol 544 545 // NOTE: Unless PROFILE_HOT_LINES is enabled, nothing will be 546 // profiled by the AddressProfiler 547 m_address_profiler_ptr-> 548 addTraceSample(msg.getLineAddress(), msg.getProgramCounter(), --- 129 unchanged lines hidden (view full) --- 678 } else { 679 m_dirIncompleteTimes++; 680 } 681} 682 683// non-zero cycle prefetch request 684void 685Profiler::swPrefetchLatency(Time cycles, |
686 CacheRequestType type, | 686 RubyRequestType type, |
687 const GenericMachineType respondingMach) 688{ 689 m_allSWPrefetchLatencyHistogram.add(cycles); 690 m_SWPrefetchLatencyHistograms[type].add(cycles); 691 m_SWPrefetchMachLatencyHistograms[respondingMach].add(cycles); 692 if (respondingMach == GenericMachineType_Directory || 693 respondingMach == GenericMachineType_NUM) { 694 m_SWPrefetchL2MissLatencyHistogram.add(cycles); --- 56 unchanged lines hidden --- | 687 const GenericMachineType respondingMach) 688{ 689 m_allSWPrefetchLatencyHistogram.add(cycles); 690 m_SWPrefetchLatencyHistograms[type].add(cycles); 691 m_SWPrefetchMachLatencyHistograms[respondingMach].add(cycles); 692 if (respondingMach == GenericMachineType_Directory || 693 respondingMach == GenericMachineType_NUM) { 694 m_SWPrefetchL2MissLatencyHistogram.add(cycles); --- 56 unchanged lines hidden --- |