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" |
41 42#if FULL_SYSTEM 43#include "arch/kernel_stats.hh" |
44#include "arch/stacktrace.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" |
53#else |
54#include "mem/translating_port.hh" |
55#include "sim/process.hh" 56#include "sim/system.hh" |
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 |
76 if (cpu->params()->profile) { |
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 --- |