simple_thread.cc (5499:8bfc7650c344) | simple_thread.cc (5529:9ae69b9cd7fd) |
---|---|
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; --- 23 unchanged lines hidden (view full) --- 32 */ 33 34#include <string> 35 36#include "arch/isa_traits.hh" 37#include "cpu/base.hh" 38#include "cpu/simple_thread.hh" 39#include "cpu/thread_context.hh" | 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; --- 23 unchanged lines hidden (view full) --- 32 */ 33 34#include <string> 35 36#include "arch/isa_traits.hh" 37#include "cpu/base.hh" 38#include "cpu/simple_thread.hh" 39#include "cpu/thread_context.hh" |
40#include "params/BaseCPU.hh" |
|
40 41#if FULL_SYSTEM 42#include "arch/kernel_stats.hh" | 41 42#if FULL_SYSTEM 43#include "arch/kernel_stats.hh" |
44#include "arch/stacktrace.hh" |
|
43#include "base/callback.hh" 44#include "base/cprintf.hh" 45#include "base/output.hh" 46#include "base/trace.hh" 47#include "cpu/profile.hh" 48#include "cpu/quiesce_event.hh" 49#include "sim/serialize.hh" 50#include "sim/sim_exit.hh" | 45#include "base/callback.hh" 46#include "base/cprintf.hh" 47#include "base/output.hh" 48#include "base/trace.hh" 49#include "cpu/profile.hh" 50#include "cpu/quiesce_event.hh" 51#include "sim/serialize.hh" 52#include "sim/sim_exit.hh" |
51#include "arch/stacktrace.hh" | |
52#else | 53#else |
54#include "mem/translating_port.hh" |
|
53#include "sim/process.hh" 54#include "sim/system.hh" | 55#include "sim/process.hh" 56#include "sim/system.hh" |
55#include "mem/translating_port.hh" | |
56#endif 57 58using namespace std; 59 60// constructor 61#if FULL_SYSTEM 62SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys, 63 TheISA::ITB *_itb, TheISA::DTB *_dtb, 64 bool use_kernel_stats) 65 : ThreadState(_cpu, -1, _thread_num), cpu(_cpu), system(_sys), itb(_itb), 66 dtb(_dtb) 67 68{ 69 tc = new ProxyThreadContext<SimpleThread>(this); 70 71 quiesceEvent = new EndQuiesceEvent(tc); 72 73 regs.clear(); 74 | 57#endif 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), 67 dtb(_dtb) 68 69{ 70 tc = new ProxyThreadContext<SimpleThread>(this); 71 72 quiesceEvent = new EndQuiesceEvent(tc); 73 74 regs.clear(); 75 |
75 if (cpu->params->profile) { | 76 if (cpu->params()->profile) { |
76 profile = new FunctionProfile(system->kernelSymtab); 77 Callback *cb = 78 new MakeCallback<SimpleThread, 79 &SimpleThread::dumpFuncProfile>(this); 80 registerExitCallback(cb); 81 } 82 83 // let's fill with a dummy node for now so we don't get a segfault --- 205 unchanged lines hidden --- | 77 profile = new FunctionProfile(system->kernelSymtab); 78 Callback *cb = 79 new MakeCallback<SimpleThread, 80 &SimpleThread::dumpFuncProfile>(this); 81 registerExitCallback(cb); 82 } 83 84 // let's fill with a dummy node for now so we don't get a segfault --- 205 unchanged lines hidden --- |