Exemplo n.º 1
0
 static StartUp()
 {
     if (LuaDeepProfilerSetting.Instance.isDeepMonoProfiler)
     {
         InjectMethods.InjectAllMethods();
     }
 }
Exemplo n.º 2
0
        static HookLuaUtil()
        {
#if XLUA || TOLUA || SLUA
            if (hookNewLuaEnv == null)
            {
                Type envReplace = typeof(LuaEnvReplace);

                Type typeDll      = typeof(LuaDLL);
                var  newstateFun  = typeDll.GetMethod("luaL_newstate");
                var  clickReplace = envReplace.GetMethod("luaL_newstate");
                var  clickProxy   = envReplace.GetMethod("ProxyNewstate", BindingFlags.Public | BindingFlags.Static);
                hookNewLuaEnv = new MethodHooker(newstateFun, clickReplace, clickProxy);
                hookNewLuaEnv.Install();

                newstateFun   = typeDll.GetMethod("lua_close");
                clickReplace  = envReplace.GetMethod("lua_close");
                clickProxy    = envReplace.GetMethod("ProxyClose", BindingFlags.Public | BindingFlags.Static);
                hookNewLuaEnv = new MethodHooker(newstateFun, clickReplace, clickProxy);
                hookNewLuaEnv.Install();

                if (LuaDeepProfilerSetting.Instance.isDeepProfiler && LuaDeepProfilerSetting.Instance.profilerMono)
                {
                    InjectMethods.InjectAllMethods();
                }

                EditorApplication.update += () =>
                {
                    isPlaying  = Application.isPlaying;
                    frameCount = Time.frameCount;
                };
            }
            if (LuaDeepProfilerSetting.Instance.isInited)
            {
                return;
            }
#endif
            string[] paths = Directory.GetFiles(Application.dataPath, "*.dll", SearchOption.AllDirectories);
            foreach (var item in paths)
            {
                string fileName = Path.GetFileName(item);
                if (fileName == "slua.dll")
                {
                    AppendMacro("#define SLUA");
                }

                if (fileName == "xlua.dll")
                {
                    AppendMacro("#define XLUA");
                    break;
                }

                if (fileName == "tolua.dll")
                {
                    AppendMacro("#define TOLUA");
                    break;
                }
            }
            LuaDeepProfilerSetting.Instance.isInited = true;
        }
Exemplo n.º 3
0
        //private static int tickNum = 0;
        static StartUp()
        {
            if (LuaDeepProfilerSetting.Instance.isDeepLuaProfiler)
            {
                InjectMethods.HookLuaFun();
            }
            if (LuaDeepProfilerSetting.Instance.isDeepMonoProfiler)
            {
                InjectMethods.InjectAllMethods();
            }

#if XLUA || TOLUA || SLUA
            if (LuaDeepProfilerSetting.Instance.isInited)
            {
                return;
            }
#endif
            string[] paths = Directory.GetFiles(Application.dataPath, "*.dll", SearchOption.AllDirectories);
            foreach (var item in paths)
            {
                string fileName = Path.GetFileName(item);
                if (fileName == "slua.dll")
                {
                    AppendMacro("#define SLUA");
                }

                if (fileName == "xlua.dll")
                {
                    AppendMacro("#define XLUA");
                    break;
                }

                if (fileName == "tolua.dll")
                {
                    AppendMacro("#define TOLUA");
                    break;
                }
            }

            LuaDeepProfilerSetting.Instance.isInited = true;
        }
Exemplo n.º 4
0
        private static void AppendMacro(string macro)
        {
            System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace(true);
            System.Diagnostics.StackFrame sf = st.GetFrame(0);
            string path = sf.GetFileName();

            string text  = File.ReadAllText(path);
            string text2 = new StringReader(text).ReadLine();

            if (text2.Contains("#define"))
            {
                text = text.Substring(text2.Length, text.Length - text2.Length);
            }
            else
            {
                macro += "\r\n";
            }
            text = text.Insert(0, macro);
            File.WriteAllText(path, text);
            InjectMethods.Recompile();
        }
        void DoToolbar()
        {
            var setting = LuaDeepProfilerSetting.Instance;

            #region profiler settting
            GUILayout.Label("profiler setting");
            GUILayout.BeginVertical("Box");

            EditorGUILayout.BeginHorizontal();
            bool flag = GUILayout.Toggle(setting.isDeepLuaProfiler, "Deep Profiler Lua");
            if (flag != setting.isDeepLuaProfiler)
            {
                setting.isDeepLuaProfiler = flag;
                if (!flag)
                {
                    setting.isCleanMode = false;
                }
                EditorApplication.isPlaying = false;
            }

            flag = GUILayout.Toggle(setting.isDeepMonoProfiler, "Deep Profiler Mono");
            if (flag != setting.isDeepMonoProfiler)
            {
                setting.isDeepMonoProfiler  = flag;
                EditorApplication.isPlaying = false;
                InjectMethods.Recompile();
            }

            flag = GUILayout.Toggle(setting.discardInvalid, "Discard Invalid");
            if (flag != setting.discardInvalid)
            {
                setting.discardInvalid = flag;
            }

            flag = GUILayout.Toggle(setting.isCleanMode, "PreCompile Lua(Use InjectLua.exe)");
            if (flag != setting.isCleanMode)
            {
                setting.isCleanMode = flag;
                if (setting.isCleanMode)
                {
                    setting.isDeepLuaProfiler = true;
                }
                EditorApplication.isPlaying = false;
            }

            EditorGUILayout.EndHorizontal();

            GUILayout.Space(5);
            if (GUILayout.Button("ReCompile", GUILayout.Height(50)))
            {
                InjectMethods.Recompile();
            }
            GUILayout.Space(5);

            GUILayout.EndVertical();
            #endregion

            #region socket
            GUILayout.Space(10);
            GUILayout.Label("connet");

            GUILayout.BeginVertical("Box");
            GUILayout.Space(5);
            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("ip:", GUILayout.Height(30), GUILayout.Width(35));
            setting.ip = EditorGUILayout.TextField(setting.ip, GUILayout.Height(16), GUILayout.Width(100));

            GUILayout.Label("port:", GUILayout.Height(30), GUILayout.Width(35));
            setting.port = EditorGUILayout.IntField(setting.port, GUILayout.Height(16), GUILayout.Width(50));
            EditorGUILayout.EndHorizontal();

            /*
             * if (GUILayout.Button("Connent", GUILayout.Height(50)))
             * {
             *  NetWorkClient.ConnectServer(setting.ip, setting.port);
             * }
             * GUILayout.Space(5);*/

            GUILayout.EndVertical();
            #endregion

            #region diff
            GUILayout.BeginVertical("Box");
            GUILayout.Space(5);
            GUILayout.BeginHorizontal();
#if (UNITY_5 || UNITY_2017_1_OR_NEWER)
            if (GUILayout.Button("MarkLuaRecord", GUILayout.Height(30)))
            {
                LuaHook.Record();
                m_luaDiffScrollView.MarkIsRecord();
            }
            if (GUILayout.Button("DiffRecord", GUILayout.Height(30)))
            {
                m_luaDiffScrollView.DelDiffInfo(LuaHook.Diff());
            }
            if (GUILayout.Button("ClearDiff", GUILayout.Height(30)))
            {
                m_luaDiffScrollView.Clear();
            }
            GUILayout.EndHorizontal();

            m_luaDiffScrollView.DoRefScroll();
#endif
            GUILayout.EndVertical();
            #endregion

            #region capture

            /*
             * GUILayout.Space(10);
             *
             * GUILayout.Label("capture setting");
             * GUILayout.BeginVertical("Box");
             *
             * flag = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.isNeedCapture, "NeedCapture");
             * if (flag != LuaDeepProfilerSetting.Instance.isNeedCapture)
             * {
             *  LuaDeepProfilerSetting.Instance.isNeedCapture = flag;
             *  if (flag)
             *  {
             *      GameViewUtility.ChangeGameViewSize(480, 270);
             *  }
             * }
             *
             * GUILayout.Space(10);
             *
             * EditorGUILayout.BeginHorizontal();
             * GUILayout.Label("lua gc", GUILayout.Height(30), GUILayout.Width(45));
             * LuaDeepProfilerSetting.Instance.captureLuaGC
             *  = EditorGUILayout.IntField(LuaDeepProfilerSetting.Instance.captureLuaGC, GUILayout.Height(16), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureLuaGC = Mathf.Max(0, LuaDeepProfilerSetting.Instance.captureLuaGC);
             * GUILayout.Label("B", GUILayout.Height(30), GUILayout.Width(20));
             *
             * GUILayout.Label("mono gc", GUILayout.Height(30), GUILayout.Width(55));
             * LuaDeepProfilerSetting.Instance.captureMonoGC
             *  = EditorGUILayout.IntField(LuaDeepProfilerSetting.Instance.captureMonoGC, GUILayout.Height(16), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureMonoGC = Mathf.Max(0, LuaDeepProfilerSetting.Instance.captureMonoGC);
             * GUILayout.Label("B", GUILayout.Height(30), GUILayout.Width(20));
             *
             * GUILayout.Label("capture ", GUILayout.Height(30), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureFrameRate
             *  = EditorGUILayout.IntField(LuaDeepProfilerSetting.Instance.captureFrameRate, GUILayout.Height(16), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureFrameRate = Mathf.Max(0, LuaDeepProfilerSetting.Instance.captureFrameRate);
             * GUILayout.Label("FPS", GUILayout.Height(30), GUILayout.Width(30));
             *
             * EditorGUILayout.EndHorizontal();
             *
             * GUILayout.EndVertical();
             */
            #endregion
        }
Exemplo n.º 6
0
        void DoToolbar()
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            #region clear
            bool isClear = GUILayout.Button("Clear", EditorStyles.toolbarButton, GUILayout.Height(30));
            if (isClear)
            {
                m_TreeView.Clear(true);
            }
            GUILayout.Space(5);
            #endregion

            #region deep
            bool flag = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.isDeepProfiler,
                                         "Deep Profiler Lua", EditorStyles.toolbarButton, GUILayout.Height(30));
            if (flag != LuaDeepProfilerSetting.Instance.isDeepProfiler)
            {
                LuaDeepProfilerSetting.Instance.isDeepProfiler = flag;
                EditorApplication.isPlaying = false;
                InjectMethods.Recompile();
            }
            GUILayout.Space(5);

            flag = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.profilerMono,
                                    "Include Mono", EditorStyles.toolbarButton, GUILayout.Height(30));
            if (flag != LuaDeepProfilerSetting.Instance.profilerMono)
            {
                LuaDeepProfilerSetting.Instance.profilerMono = flag;
                EditorApplication.isPlaying = false;
                InjectMethods.Recompile();
            }
            GUILayout.Space(5);

            flag = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.includeCSLua,
                                    "Contain C# Lua", EditorStyles.toolbarButton, GUILayout.Height(30));
            if (flag != LuaDeepProfilerSetting.Instance.includeCSLua)
            {
                LuaDeepProfilerSetting.Instance.includeCSLua = flag;
                EditorApplication.isPlaying = false;
                InjectMethods.Recompile();
            }
            GUILayout.Space(5);
            #endregion

            #region stop
            bool isStop = GUILayout.Toggle(m_isStop, "Stop GC", EditorStyles.toolbarButton, GUILayout.Height(30));

            if (m_isStop != isStop)
            {
                if (isStop)
                {
                    LuaLib.StopGC();
                    m_isStop = true;
                }
                else
                {
                    LuaLib.ResumeGC();
                    m_isStop = false;
                }
            }
            GUILayout.Space(5);
            #endregion

            #region run gc
            bool isRunGC = GUILayout.Button("Run GC", EditorStyles.toolbarButton, GUILayout.Height(30));
            if (isRunGC)
            {
                LuaLib.RunGC();
            }
            GUILayout.Space(5);
            #endregion

            #region history
            flag = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.isRecord,
                                    "Record", EditorStyles.toolbarButton, GUILayout.Height(30));
            if (flag != LuaDeepProfilerSetting.Instance.isRecord)
            {
                LuaDeepProfilerSetting.Instance.isRecord = flag;
                if (flag)
                {
                    GameViewUtility.ChangeGameViewSize(480, 270);
                }
                EditorApplication.isPlaying = false;
            }
            GUILayout.Space(25);
            #endregion

            #region path
            if (GUILayout.Button("Lua Path", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                LocalToLuaIDE.SetExternalProjectRootPath();
            }
            if (GUILayout.Button("IDE Path", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                LocalToLuaIDE.SetExternalEditorPath();
            }
            if (GUILayout.Button("Clear Path", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                LocalToLuaIDE.ClearPath();
            }
            GUILayout.Space(100);
            if (GUILayout.Button("Save Result", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                m_TreeView.SaveResult();
            }
            if (GUILayout.Button("Load Result", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                m_TreeView.LoadHistory();
            }
            #endregion

            #region gc value
            GUILayout.Space(5);
            GUILayout.FlexibleSpace();
            GUILayout.Label(string.Format("Lua Total:{0}", m_TreeView.GetLuaMemory()), EditorStyles.toolbarButton, GUILayout.Height(30));
            #endregion

            GUILayout.Space(100);
            GUILayout.FlexibleSpace();

            m_TreeView.searchString = m_SearchField.OnToolbarGUI(m_TreeView.searchString);

            EditorGUILayout.EndHorizontal();
        }
Exemplo n.º 7
0
        void DoToolbar()
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            #region clear
            bool isClear = GUILayout.Button("Clear", EditorStyles.toolbarButton, GUILayout.Height(30));
            if (isClear)
            {
                currentFrameIndex = 0;
                m_TreeView.Clear(true);
                m_luaRefScrollView.ClearRefInfo(true);
                m_luaDiffScrollView.Clear();
                ClearConsole();
            }
            GUILayout.Space(5);
            #endregion

            #region history
            string recordName = "Record";
            bool   flag       = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.isRecord, recordName, EditorStyles.toolbarButton, GUILayout.Height(30));
            if (flag != LuaDeepProfilerSetting.Instance.isRecord)
            {
                LuaDeepProfilerSetting.Instance.isRecord = flag;
            }
            GUILayout.Space(25);
            #endregion

            var setting = LuaDeepProfilerSetting.Instance;

            #region socket
            bool   oldIsLocal = LuaDeepProfilerSetting.Instance.isLocal;
            string localName  = "local mode";
            if (!LuaDeepProfilerSetting.Instance.isLocal)
            {
                localName = "remote mode";
            }
            LuaDeepProfilerSetting.Instance.isLocal = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.isLocal, localName, EditorStyles.toolbarButton, GUILayout.Height(30));
            if (!oldIsLocal && LuaDeepProfilerSetting.Instance.isLocal)
            {
                OpenLocalMode();
            }

            if (!LuaDeepProfilerSetting.Instance.isLocal)
            {
                if (GUILayout.Button("OpenService", EditorStyles.toolbarButton, GUILayout.Height(30)))
                {
                    ClearConsole();
                    NetWorkServer.RealClose();
                    currentFrameIndex = 0;
                    m_TreeView.Clear(true);
                    LuaProfiler.UnRegistReceive();
                    NetWorkServer.UnRegisterReceive();
                    NetWorkServer.RegisterOnReceiveSample(m_TreeView.LoadRootSample);
                    NetWorkServer.RegisterOnReceiveRefInfo(m_luaRefScrollView.DelRefInfo);
                    NetWorkServer.RegisterOnReceiveDiffInfo(m_luaDiffScrollView.DelDiffInfo);
                    NetWorkServer.BeginListen("0.0.0.0", port);
                }
                GUILayout.Label("port:", GUILayout.Height(30), GUILayout.Width(35));
                port = EditorGUILayout.IntField(port, GUILayout.Height(16), GUILayout.Width(50));

                if (GUILayout.Button("CloseService", EditorStyles.toolbarButton, GUILayout.Height(30)))
                {
                    ClearConsole();
                    NetWorkServer.RealClose();
                    UnityEngine.Debug.Log("<color=#ff0000>disconnect</color>");
                }
            }
            else
            {
                GUILayout.Space(10);
                flag = GUILayout.Toggle(setting.isDeepLuaProfiler, "Deep Lua", EditorStyles.toolbarButton);
                if (flag != setting.isDeepLuaProfiler)
                {
                    setting.isDeepLuaProfiler = flag;
                    if (!flag)
                    {
                        setting.isCleanMode = false;
                    }
                    EditorApplication.isPlaying = false;
                }

                flag = GUILayout.Toggle(setting.isDeepMonoProfiler, "Deep Mono", EditorStyles.toolbarButton);
                if (flag != setting.isDeepMonoProfiler)
                {
                    setting.isDeepMonoProfiler  = flag;
                    EditorApplication.isPlaying = false;
                    InjectMethods.Recompile();
                }

                flag = GUILayout.Toggle(setting.discardInvalid, "Discard Invalid", EditorStyles.toolbarButton);
                if (flag != setting.discardInvalid)
                {
                    setting.discardInvalid = flag;
                }

                flag = GUILayout.Toggle(setting.isCleanMode, "PreCompile Lua", EditorStyles.toolbarButton);
                if (flag != setting.isCleanMode)
                {
                    setting.isCleanMode = flag;
                    if (setting.isCleanMode)
                    {
                        setting.isDeepLuaProfiler = true;
                        Selection.activeObject    = LuaProfilerPrecompileSetting.Instance;
#if UNITY_2018_2_OR_NEWER
                        EditorApplication.ExecuteMenuItem("Window/General/Inspector");
#else
                        EditorApplication.ExecuteMenuItem("Window/Inspector");
#endif
                    }
                    EditorApplication.isPlaying = false;
                }
            }

            GUILayout.Space(25);
            if (GUILayout.Button("MarkStaticRecord", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                if (!LuaDeepProfilerSetting.Instance.isLocal)
                {
                    NetWorkServer.SendCmd(3);
                }
                else
                {
                    m_luaDiffScrollView.DelDiffInfo(LuaHook.RecordStatic());
                }
                m_luaDiffScrollView.MarkIsStaticRecord();
            }

            if (GUILayout.Button("MarkLuaRecord", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                if (!LuaDeepProfilerSetting.Instance.isLocal)
                {
                    NetWorkServer.SendCmd(1);
                }
                else
                {
                    m_luaDiffScrollView.DelDiffInfo(LuaHook.Record());
                }
                m_luaDiffScrollView.MarkIsRecord();
            }
            if (GUILayout.Button("DiffRecord", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                if (!LuaDeepProfilerSetting.Instance.isLocal)
                {
                    NetWorkServer.SendCmd(2);
                }
                else
                {
                    m_luaDiffScrollView.DelDiffInfo(LuaHook.Diff());
                }
            }
            if (GUILayout.Button("ClearDiff", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                m_luaDiffScrollView.Clear();
            }

            GUILayout.Space(20);
            if (GUILayout.Button("AddLuaDir", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                LocalToLuaIDE.AddExternalProjectRootPath();
            }
            if (GUILayout.Button("SetIDE", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                LocalToLuaIDE.SetExternalEditorPath();
            }
            if (GUILayout.Button("ClearLuaDir", EditorStyles.toolbarButton, GUILayout.Height(30)))
            {
                LocalToLuaIDE.ClearPath();
            }

            GUILayout.Space(10);
            if (NetWorkServer.acceptThread != null)
            {
                Color c = GUI.color;
                GUI.color = Color.green;
                GUILayout.Label("listerning..");
                GUI.color = c;
            }
            #endregion

            #region gc value
            GUILayout.Space(100);
            GUILayout.FlexibleSpace();
            #endregion

            if (m_TreeView != null)
            {
                m_TreeView.searchString = m_SearchField.OnToolbarGUI(m_TreeView.searchString);
                m_TreeView.toggleMerge  = GUILayout.Toggle(m_TreeView.toggleMerge, "merge", EditorStyles.toolbarButton, GUILayout.Height(30));
            }
            isShowRef = GUILayout.Toggle(isShowRef, "show refInfo", EditorStyles.toolbarButton, GUILayout.Height(30));

            EditorGUILayout.EndHorizontal();
        }
Exemplo n.º 8
0
        void DoToolbar()
        {
            var setting = LuaDeepProfilerSetting.Instance;

            #region profiler settting
            GUILayout.Label("profiler setting");
            GUILayout.BeginVertical("Box");

            EditorGUILayout.BeginHorizontal();
            bool flag = GUILayout.Toggle(setting.isDeepLuaProfiler, "Deep Profiler Lua");
            if (flag != setting.isDeepLuaProfiler)
            {
                setting.isDeepLuaProfiler   = flag;
                EditorApplication.isPlaying = false;
                InjectMethods.Recompile();
            }

            flag = GUILayout.Toggle(setting.isDeepMonoProfiler, "Deep Profiler Mono");
            if (flag != setting.isDeepMonoProfiler)
            {
                setting.isDeepMonoProfiler  = flag;
                EditorApplication.isPlaying = false;
                InjectMethods.Recompile();
            }

            flag = GUILayout.Toggle(setting.discardInvalid, "Discard Invalid");
            if (flag != setting.discardInvalid)
            {
                setting.discardInvalid = flag;
            }

            EditorGUILayout.EndHorizontal();

            //GUILayout.Space(5);
            //if (GUILayout.Button("Inject Method", GUILayout.Height(50)))
            //{
            //    InjectMethods.InjectAllMethods();
            //}
            GUILayout.Space(5);
            if (GUILayout.Button("ReCompile", GUILayout.Height(50)))
            {
                InjectMethods.Recompile();
            }
            GUILayout.Space(5);
            GUILayout.EndVertical();
            #endregion

            #region socket
            GUILayout.Space(10);
            GUILayout.Label("connet");

            GUILayout.BeginVertical("Box");
            GUILayout.Space(5);
            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("ip:", GUILayout.Height(30), GUILayout.Width(35));
            setting.ip = EditorGUILayout.TextField(setting.ip, GUILayout.Height(16), GUILayout.Width(100));

            GUILayout.Label("port:", GUILayout.Height(30), GUILayout.Width(35));
            setting.port = EditorGUILayout.IntField(setting.port, GUILayout.Height(16), GUILayout.Width(50));
            EditorGUILayout.EndHorizontal();

            /*
             * if (GUILayout.Button("Connent", GUILayout.Height(50)))
             * {
             *  NetWorkClient.ConnectServer(setting.ip, setting.port);
             * }
             * GUILayout.Space(5);*/

            GUILayout.EndVertical();
            #endregion

            #region gc control
            GUILayout.Space(10);
            GUILayout.Label("gc control");

            GUILayout.BeginVertical("Box");
            bool isStop = GUILayout.Toggle(m_isStop, "Stop Lua GC");

            if (m_isStop != isStop)
            {
                if (isStop)
                {
                    LuaLib.StopGC();
                    m_isStop = true;
                }
                else
                {
                    LuaLib.ResumeGC();
                    m_isStop = false;
                }
            }
            GUILayout.Space(5);

            if (GUILayout.Button("Run GC", GUILayout.Height(50)))
            {
                LuaLib.RunGC();
                System.GC.Collect();
            }
            GUILayout.Space(5);
            GUILayout.EndVertical();
            #endregion

            #region capture

            /*
             * GUILayout.Space(10);
             *
             * GUILayout.Label("capture setting");
             * GUILayout.BeginVertical("Box");
             *
             * flag = GUILayout.Toggle(LuaDeepProfilerSetting.Instance.isNeedCapture, "NeedCapture");
             * if (flag != LuaDeepProfilerSetting.Instance.isNeedCapture)
             * {
             *  LuaDeepProfilerSetting.Instance.isNeedCapture = flag;
             *  if (flag)
             *  {
             *      GameViewUtility.ChangeGameViewSize(480, 270);
             *  }
             * }
             *
             * GUILayout.Space(10);
             *
             * EditorGUILayout.BeginHorizontal();
             * GUILayout.Label("lua gc", GUILayout.Height(30), GUILayout.Width(45));
             * LuaDeepProfilerSetting.Instance.captureLuaGC
             *  = EditorGUILayout.IntField(LuaDeepProfilerSetting.Instance.captureLuaGC, GUILayout.Height(16), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureLuaGC = Mathf.Max(0, LuaDeepProfilerSetting.Instance.captureLuaGC);
             * GUILayout.Label("B", GUILayout.Height(30), GUILayout.Width(20));
             *
             * GUILayout.Label("mono gc", GUILayout.Height(30), GUILayout.Width(55));
             * LuaDeepProfilerSetting.Instance.captureMonoGC
             *  = EditorGUILayout.IntField(LuaDeepProfilerSetting.Instance.captureMonoGC, GUILayout.Height(16), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureMonoGC = Mathf.Max(0, LuaDeepProfilerSetting.Instance.captureMonoGC);
             * GUILayout.Label("B", GUILayout.Height(30), GUILayout.Width(20));
             *
             * GUILayout.Label("capture ", GUILayout.Height(30), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureFrameRate
             *  = EditorGUILayout.IntField(LuaDeepProfilerSetting.Instance.captureFrameRate, GUILayout.Height(16), GUILayout.Width(50));
             * LuaDeepProfilerSetting.Instance.captureFrameRate = Mathf.Max(0, LuaDeepProfilerSetting.Instance.captureFrameRate);
             * GUILayout.Label("FPS", GUILayout.Height(30), GUILayout.Width(30));
             *
             * EditorGUILayout.EndHorizontal();
             *
             * GUILayout.EndVertical();
             */
            #endregion
        }