1/* 2 * Copyright (c) 2000-2005 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; --- 46 unchanged lines hidden (view full) --- 55#include "base/statistics.hh" 56#include "base/str.hh" 57#include "base/time.hh" 58#include "config/pythonhome.hh" 59#include "cpu/base.hh" 60#include "cpu/smt.hh" 61#include "mem/mem_object.hh" 62#include "mem/port.hh" |
63#include "python/swig/init.hh" |
64#include "sim/async.hh" 65#include "sim/builder.hh" 66#include "sim/host.hh" 67#include "sim/serialize.hh" 68#include "sim/sim_events.hh" 69#include "sim/sim_exit.hh" 70#include "sim/sim_object.hh" 71#include "sim/system.hh" --- 41 unchanged lines hidden (view full) --- 113 cerr << "Program aborted at cycle " << curTick << endl; 114 115#if TRACING_ON 116 // dump trace buffer, if there is one 117 Trace::theLog.dump(cerr); 118#endif 119} 120 |
121int 122main(int argc, char **argv) 123{ 124 signal(SIGFPE, SIG_IGN); // may occur on misspeculated paths 125 signal(SIGTRAP, SIG_IGN); 126 signal(SIGUSR1, dumpStatsHandler); // dump intermediate stats 127 signal(SIGUSR2, dumprstStatsHandler); // dump and reset stats 128 signal(SIGINT, exitNowHandler); // dump final stats and exit --- 21 unchanged lines hidden (view full) --- 150 python_home = PYTHONHOME; 151 Py_SetPythonHome(python_home); 152 153 // initialize embedded Python interpreter 154 Py_Initialize(); 155 PySys_SetArgv(argc, argv); 156 157 // initialize SWIG modules |
158 init_swig(); |
159 160 PyRun_SimpleString("import m5.main"); 161 PyRun_SimpleString("m5.main.main()"); 162 163 // clean up Python intepreter. 164 Py_Finalize(); 165} 166 --- 306 unchanged lines hidden --- |