CheckTable.cc (8232:b28d06a175be) | CheckTable.cc (8932:1b2c17565ac8) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * Copyright (c) 2009 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 --- 18 unchanged lines hidden (view full) --- 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include "base/intmath.hh" 31#include "cpu/testers/rubytest/Check.hh" 32#include "cpu/testers/rubytest/CheckTable.hh" 33#include "debug/RubyTest.hh" 34 | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * Copyright (c) 2009 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 --- 18 unchanged lines hidden (view full) --- 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include "base/intmath.hh" 31#include "cpu/testers/rubytest/Check.hh" 32#include "cpu/testers/rubytest/CheckTable.hh" 33#include "debug/RubyTest.hh" 34 |
35CheckTable::CheckTable(int _num_cpu_sequencers, RubyTester* _tester) 36 : m_num_cpu_sequencers(_num_cpu_sequencers), m_tester_ptr(_tester) | 35CheckTable::CheckTable(int _num_writers, int _num_readers, RubyTester* _tester) 36 : m_num_writers(_num_writers), m_num_readers(_num_readers), 37 m_tester_ptr(_tester) |
37{ 38 physical_address_t physical = 0; 39 Address address; 40 41 const int size1 = 32; 42 const int size2 = 100; 43 44 // The first set is to get some false sharing --- 44 unchanged lines hidden (view full) --- 89 if (m_lookup_map.count(Address(address.getAddress()+i))) { 90 // A mapping for this byte already existed, discard the 91 // entire check 92 return; 93 } 94 } 95 96 Check* check_ptr = new Check(address, Address(100 + m_check_vector.size()), | 38{ 39 physical_address_t physical = 0; 40 Address address; 41 42 const int size1 = 32; 43 const int size2 = 100; 44 45 // The first set is to get some false sharing --- 44 unchanged lines hidden (view full) --- 90 if (m_lookup_map.count(Address(address.getAddress()+i))) { 91 // A mapping for this byte already existed, discard the 92 // entire check 93 return; 94 } 95 } 96 97 Check* check_ptr = new Check(address, Address(100 + m_check_vector.size()), |
97 m_num_cpu_sequencers, m_tester_ptr); | 98 m_num_writers, m_num_readers, m_tester_ptr); |
98 for (int i = 0; i < CHECK_SIZE; i++) { 99 // Insert it once per byte 100 m_lookup_map[Address(address.getAddress() + i)] = check_ptr; 101 } 102 m_check_vector.push_back(check_ptr); 103} 104 105Check* --- 24 unchanged lines hidden --- | 99 for (int i = 0; i < CHECK_SIZE; i++) { 100 // Insert it once per byte 101 m_lookup_map[Address(address.getAddress() + i)] = check_ptr; 102 } 103 m_check_vector.push_back(check_ptr); 104} 105 106Check* --- 24 unchanged lines hidden --- |