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; --- 103 unchanged lines hidden (view full) --- 112 cerr << "Program aborted at cycle " << curTick << endl; 113 114#if TRACING_ON 115 // dump trace buffer, if there is one 116 Trace::theLog.dump(cerr); 117#endif 118} 119 |
120extern "C" { 121void init_main(); 122} |
123 124int 125main(int argc, char **argv) 126{ 127 signal(SIGFPE, SIG_IGN); // may occur on misspeculated paths 128 signal(SIGTRAP, SIG_IGN); 129 signal(SIGUSR1, dumpStatsHandler); // dump intermediate stats 130 signal(SIGUSR2, dumprstStatsHandler); // dump and reset stats --- 21 unchanged lines hidden (view full) --- 152 if (!python_home) 153 python_home = PYTHONHOME; 154 Py_SetPythonHome(python_home); 155 156 // initialize embedded Python interpreter 157 Py_Initialize(); 158 PySys_SetArgv(argc, argv); 159 |
160 // initialize SWIG 'm5.internal.main' module 161 init_main(); |
162 163 PyRun_SimpleString("import m5.main"); 164 PyRun_SimpleString("m5.main.main()"); 165 166 // clean up Python intepreter. 167 Py_Finalize(); 168} 169 --- 306 unchanged lines hidden --- |