// Start is called before the first frame update void Start() { mFrameTimings = new FrameTiming[3]; mFrameTimingNum = 0; mProfileData = new ProfileData(); frameCount = 0; mPrevRealTime = Time.realtimeSinceStartup; deltaTime = 0; RecorerdInit(in mPlayerLoopSamplerNames, out mPlayerLoopRecorders); RecorerdInit(in mRenderingSamplerNames, out mRenderingRecorders); RecorerdInit(in mScriptsSamplerNames, out mScriptsSamplerRecorders); RecorerdInit(in mPhysicsSamplerNames, out mPhysicsSamplerRecorders); RecorerdInit(in mAnimationSamplerNames, out mAnimationSamplerRecorders); mAnimationUpdate = UnityEngine.Profiling.Recorder.Get("Animation.Update"); mAnimatorsUpdate = UnityEngine.Profiling.Recorder.Get("Animators.Update"); mLabelStyle = new GUIStyle(); mLabelStyle.fontSize = 16; mLabelStyle.fontStyle = FontStyle.Bold; mLabelStyle.normal.textColor = Color.white; mTextStyle = new GUIStyle(); mTextStyle.fontSize = 16; mTextStyle.fontStyle = FontStyle.Normal; mTextStyle.normal.textColor = Color.white; }
static Profiling() { k_Markers = new Unity.Profiling.ProfilerMarker[(int)MarkerId.MarkerCount]; k_Recorders = new UnityEngine.Profiling.Recorder[(int)MarkerId.MarkerCount]; for (int i = 0; i != (int)MarkerId.MarkerCount; ++i) { k_Markers[i] = new Unity.Profiling.ProfilerMarker(k_MarkerNames[i]); k_Recorders[i] = UnityEngine.Profiling.Recorder.Get(k_MarkerNames[i]); } }
static int _g_get_enabled(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.Profiling.Recorder __cl_gen_to_be_invoked = (UnityEngine.Profiling.Recorder)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, __cl_gen_to_be_invoked.enabled); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
static StackObject *CollectFromAllThreads_7(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Profiling.Recorder instance_of_this_method = (UnityEngine.Profiling.Recorder) typeof(UnityEngine.Profiling.Recorder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.CollectFromAllThreads(); return(__ret); }
static StackObject *get_enabled_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Profiling.Recorder instance_of_this_method = (UnityEngine.Profiling.Recorder) typeof(UnityEngine.Profiling.Recorder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.enabled; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return(__ret + 1); }
static StackObject *set_enabled_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @value = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Profiling.Recorder instance_of_this_method = (UnityEngine.Profiling.Recorder) typeof(UnityEngine.Profiling.Recorder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.enabled = value; return(__ret); }
static int _m_GetRecorder(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Profiling.Sampler __cl_gen_to_be_invoked = (UnityEngine.Profiling.Sampler)translator.FastGetCSObj(L, 1); try { { UnityEngine.Profiling.Recorder __cl_gen_ret = __cl_gen_to_be_invoked.GetRecorder( ); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_Get_xlua_st_(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { { string samplerName = LuaAPI.lua_tostring(L, 1); UnityEngine.Profiling.Recorder __cl_gen_ret = UnityEngine.Profiling.Recorder.Get(samplerName); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static GCAllocRecorder() { AllocRecorder = UnityEngine.Profiling.Recorder.Get("GC.Alloc"); }
static GCAllocRecorderForDynamicBuffer() { AllocRecorder = UnityEngine.Profiling.Recorder.Get("GC.Alloc.DynamicBuffer"); }