simple_thread.cc (5704:98224505352a) | simple_thread.cc (5712:199d31b47f7b) |
---|---|
1/* 2 * Copyright (c) 2001-2006 The Regents of The University of Michigan 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; --- 49 unchanged lines hidden (view full) --- 58 59using namespace std; 60 61// constructor 62#if FULL_SYSTEM 63SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys, 64 TheISA::ITB *_itb, TheISA::DTB *_dtb, 65 bool use_kernel_stats) | 1/* 2 * Copyright (c) 2001-2006 The Regents of The University of Michigan 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; --- 49 unchanged lines hidden (view full) --- 58 59using namespace std; 60 61// constructor 62#if FULL_SYSTEM 63SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys, 64 TheISA::ITB *_itb, TheISA::DTB *_dtb, 65 bool use_kernel_stats) |
66 : ThreadState(_cpu, -1, _thread_num), cpu(_cpu), system(_sys), itb(_itb), | 66 : ThreadState(_cpu, _thread_num), cpu(_cpu), system(_sys), itb(_itb), |
67 dtb(_dtb) 68 69{ 70 tc = new ProxyThreadContext<SimpleThread>(this); 71 72 quiesceEvent = new EndQuiesceEvent(tc); 73 74 regs.clear(); --- 13 unchanged lines hidden (view full) --- 88 profilePC = 3; 89 90 if (use_kernel_stats) 91 kernelStats = new TheISA::Kernel::Statistics(system); 92} 93#else 94SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process, 95 TheISA::ITB *_itb, TheISA::DTB *_dtb, int _asid) | 67 dtb(_dtb) 68 69{ 70 tc = new ProxyThreadContext<SimpleThread>(this); 71 72 quiesceEvent = new EndQuiesceEvent(tc); 73 74 regs.clear(); --- 13 unchanged lines hidden (view full) --- 88 profilePC = 3; 89 90 if (use_kernel_stats) 91 kernelStats = new TheISA::Kernel::Statistics(system); 92} 93#else 94SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process, 95 TheISA::ITB *_itb, TheISA::DTB *_dtb, int _asid) |
96 : ThreadState(_cpu, -1, _thread_num, _process, _asid), | 96 : ThreadState(_cpu, _thread_num, _process, _asid), |
97 cpu(_cpu), itb(_itb), dtb(_dtb) 98{ 99 regs.clear(); 100 tc = new ProxyThreadContext<SimpleThread>(this); 101} 102 103#endif 104 105SimpleThread::SimpleThread() 106#if FULL_SYSTEM | 97 cpu(_cpu), itb(_itb), dtb(_dtb) 98{ 99 regs.clear(); 100 tc = new ProxyThreadContext<SimpleThread>(this); 101} 102 103#endif 104 105SimpleThread::SimpleThread() 106#if FULL_SYSTEM |
107 : ThreadState(NULL, -1, -1) | 107 : ThreadState(NULL, -1) |
108#else | 108#else |
109 : ThreadState(NULL, -1, -1, NULL, -1) | 109 : ThreadState(NULL, -1, NULL, -1) |
110#endif 111{ 112 tc = new ProxyThreadContext<SimpleThread>(this); 113 regs.clear(); 114} 115 116SimpleThread::~SimpleThread() 117{ --- 55 unchanged lines hidden (view full) --- 173} 174 175void 176SimpleThread::copyState(ThreadContext *oldContext) 177{ 178 // copy over functional state 179 _status = oldContext->status(); 180 copyArchRegs(oldContext); | 110#endif 111{ 112 tc = new ProxyThreadContext<SimpleThread>(this); 113 regs.clear(); 114} 115 116SimpleThread::~SimpleThread() 117{ --- 55 unchanged lines hidden (view full) --- 173} 174 175void 176SimpleThread::copyState(ThreadContext *oldContext) 177{ 178 // copy over functional state 179 _status = oldContext->status(); 180 copyArchRegs(oldContext); |
181 cpuId = oldContext->readCpuId(); | |
182#if !FULL_SYSTEM 183 funcExeInst = oldContext->readFuncExeInst(); 184#endif 185 inst = oldContext->getInst(); 186} 187 188void 189SimpleThread::serialize(ostream &os) --- 100 unchanged lines hidden --- | 181#if !FULL_SYSTEM 182 funcExeInst = oldContext->readFuncExeInst(); 183#endif 184 inst = oldContext->getInst(); 185} 186 187void 188SimpleThread::serialize(ostream &os) --- 100 unchanged lines hidden --- |