Exemple #1
0
        public static void Main(string[] args)
        {
            InitArray();
            PerformanceTest.InitInternals();
//			GC ();
            Console.WriteLine("Performance measuring starting");

            //You can call it directly in AOT mode
//			for (int i = 0; i < 5; i++) {
//				Performance ();
//			}

            //This is workaround for mono bug/feature
            //When mono started it tries to compile 'Main' and recursively
            //all methods, which are called from 'Main' method
            //And in our case it compiles managed_to_native wrapper for our Internal Call methods
            //which are not registred yet by 'InitInternal'. (We are expecting to register icalls
            //first and only after compile them). In this case JIT cannot find icall entry points,
            //generates 'MissingMethodException' body for managed_to_native wrapper and cashes it.
            //When we register new icall entry later we can't regenerate wrapper or remove it from
            //the wrapper's cache.
            //To workaround this behaviour we hide our functions from JIT by calling them through
            //delegate
            //By the way in AOT mode you don't need to use such workaround all works out of the box.
            HideFromJit d = Performance;

            for (int i = 0; i < 5; i++)
            {
                d();
            }
        }
        public static void Main(string[] args)
        {
            GLib.Global.ProgramName = "ProgramName";
            //StartUp (args);
            HideFromJit d = StartUp;

            d(args);
        }
Exemple #3
0
        public static void Main(string[] args)
        {
            InitArray();
            PerformanceTest.InitInternals();

            Console.WriteLine("Performance measuring starting");

            HideFromJit d = Performance;

            for (int i = 0; i < 5; i++)
            {
                d();
            }
        }
Exemple #4
0
        public CombinedFastCgiListenerTransport()
        {
            HideFromJit d = RegisterTransport;

            d();
        }