CacheMemory.cc (10974:bbdf1177f250) CacheMemory.cc (10978:436d5dde4bb7)
1/*
2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

523
524 numDataArrayStalls
525 .name(name() + ".num_data_array_stalls")
526 .desc("number of stalls caused by data array")
527 .flags(Stats::nozero)
528 ;
529}
530
1/*
2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

523
524 numDataArrayStalls
525 .name(name() + ".num_data_array_stalls")
526 .desc("number of stalls caused by data array")
527 .flags(Stats::nozero)
528 ;
529}
530
531// assumption: SLICC generated files will only call this function
532// once **all** resources are granted
531void
533void
532CacheMemory::recordRequestType(CacheRequestType requestType)
534CacheMemory::recordRequestType(CacheRequestType requestType, Address addr)
533{
534 DPRINTF(RubyStats, "Recorded statistic: %s\n",
535 CacheRequestType_to_string(requestType));
536 switch(requestType) {
537 case CacheRequestType_DataArrayRead:
535{
536 DPRINTF(RubyStats, "Recorded statistic: %s\n",
537 CacheRequestType_to_string(requestType));
538 switch(requestType) {
539 case CacheRequestType_DataArrayRead:
540 if (m_resource_stalls)
541 dataArray.reserve(addressToCacheSet(addr));
538 numDataArrayReads++;
539 return;
540 case CacheRequestType_DataArrayWrite:
542 numDataArrayReads++;
543 return;
544 case CacheRequestType_DataArrayWrite:
545 if (m_resource_stalls)
546 dataArray.reserve(addressToCacheSet(addr));
541 numDataArrayWrites++;
542 return;
543 case CacheRequestType_TagArrayRead:
547 numDataArrayWrites++;
548 return;
549 case CacheRequestType_TagArrayRead:
550 if (m_resource_stalls)
551 tagArray.reserve(addressToCacheSet(addr));
544 numTagArrayReads++;
545 return;
546 case CacheRequestType_TagArrayWrite:
552 numTagArrayReads++;
553 return;
554 case CacheRequestType_TagArrayWrite:
555 if (m_resource_stalls)
556 tagArray.reserve(addressToCacheSet(addr));
547 numTagArrayWrites++;
548 return;
549 default:
550 warn("CacheMemory access_type not found: %s",
551 CacheRequestType_to_string(requestType));
552 }
553}
554

--- 30 unchanged lines hidden ---
557 numTagArrayWrites++;
558 return;
559 default:
560 warn("CacheMemory access_type not found: %s",
561 CacheRequestType_to_string(requestType));
562 }
563}
564

--- 30 unchanged lines hidden ---