コード例 #1
0
//        public static Dictionary<ulong, int>[] reuse;

        static void Main(string[] args)
        {
//            MLPDEC = 0;
//           MLPINC = 0;
            //*IMPORTANT* without a trace listener, mono can't output Dbg.Assert() */
            Debug.Listeners.Add(new ConsoleTraceListener());

            Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;

            Config config = new Config();

            config.read(args);
            caches = new Cache[Config.proc.cache_num];
            for (int n = 0; n < Config.proc.cache_num; n++)
            {
                caches[n] = Activator.CreateInstance(Config.proc.typeof_cache_replacement_policy) as Cache;
            }

            stat = new Stat();

            task_queue = new Queue <string>();



            initialize();
            run();
            finish();
            Console.WriteLine("----------------------------------");
            //stats
            TextWriter tw = new StreamWriter(Config.output);

            stat.Report(tw);
            tw.Close();

            //out-of-band stats

            /*
             * foreach (MemCtrl mctrl in mctrls) {
             *  mctrl.temporal_correlator.report();
             * }
             */
/*            if (Config.collect_reuse == true) {
 *              for (int n = 0; n < Config.N; n++) {
 *                  TextWriter rw = new StreamWriter(Config.output + ".reuse-thread" + n);
 *                  foreach (ulong key in reuse[n].Keys)
 *                      rw.WriteLine(key + " " + reuse[n][key]);
 *                  rw.Close();
 *              }
 *          }*/
        }
コード例 #2
0
ファイル: Sim.cs プロジェクト: CMU-SAFARI/MemSchedSim
        static void Main(string[] args)
        {
            //*IMPORTANT* without a trace listener, mono can't output Dbg.Assert() */
            Debug.Listeners.Add(new ConsoleTraceListener());

            Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;

            Config config = new Config();
            config.read(args);
            stat = new Stat();

            initialize();
            run();
            finish();

            //stats
            TextWriter tw = new StreamWriter(Config.output);
            stat.Report(tw);
            tw.Close();

        }
コード例 #3
0
        static void Main(string[] args)
        {
            //*IMPORTANT* without a trace listener, mono can't output Dbg.Assert() */
            Debug.Listeners.Add(new ConsoleTraceListener());

            Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;

            Config config = new Config();

            config.read(args);
            stat = new Stat();

            initialize();
            run();
            finish();

            //stats
            TextWriter tw = new StreamWriter(Config.output);

            stat.Report(tw);
            tw.Close();
        }