main.cc (3645:2bf1f7c69254) main.cc (3868:5a58b399e883)
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"
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"
63#include "sim/async.hh"
64#include "sim/builder.hh"
65#include "sim/host.hh"
66#include "sim/serialize.hh"
67#include "sim/sim_events.hh"
68#include "sim/sim_exit.hh"
69#include "sim/sim_object.hh"
70#include "sim/system.hh"

--- 41 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
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
120extern "C" {
121void init_main();
122void init_debug();
123}
124
125int
126main(int argc, char **argv)
127{
128 signal(SIGFPE, SIG_IGN); // may occur on misspeculated paths
129 signal(SIGTRAP, SIG_IGN);
130 signal(SIGUSR1, dumpStatsHandler); // dump intermediate stats
131 signal(SIGUSR2, dumprstStatsHandler); // dump and reset stats
132 signal(SIGINT, exitNowHandler); // dump final stats and exit

--- 21 unchanged lines hidden (view full) ---

154 python_home = PYTHONHOME;
155 Py_SetPythonHome(python_home);
156
157 // initialize embedded Python interpreter
158 Py_Initialize();
159 PySys_SetArgv(argc, argv);
160
161 // initialize SWIG modules
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
162 init_main();
163 init_debug();
158 init_swig();
164
165 PyRun_SimpleString("import m5.main");
166 PyRun_SimpleString("m5.main.main()");
167
168 // clean up Python intepreter.
169 Py_Finalize();
170}
171

--- 306 unchanged lines hidden ---
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 ---