Skip to content

Commit f65eec6

Browse files
author
leinlin
committed
PSS 不稳定,不同版本会宕机,所以就不用了
1 parent 4589218 commit f65eec6

File tree

7 files changed

+0
-126
lines changed

7 files changed

+0
-126
lines changed

LuaProfiler/LuaProfilerClient/Core/Driver/NativeHelper.cs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -46,72 +46,20 @@ namespace MikuLuaProfiler
4646

4747
public static class NativeHelper
4848
{
49-
#if UNITY_IPHONE
50-
const string NATIVE_DLL = "__Internal";
51-
#else
52-
const string NATIVE_DLL = "native";//名字没定下来
53-
#endif
54-
55-
#if UNITY_ANDROID && !UNITY_EDITOR
56-
static IntPtr m_debugClassPtr;
57-
static IntPtr m_getPassPtr;
58-
static IntPtr m_getBatteryLevel;
59-
static AndroidJavaClass m_debugClass;
60-
static jvalue[] m_jv = new jvalue[0] { };
61-
#endif
62-
63-
[Conditional("UNITY_ANDROID")]
64-
public static void RunAyncPass()
65-
{
66-
#if UNITY_ANDROID && !UNITY_EDITOR
67-
object[] jv = new object[0] { };
68-
m_debugClassPtr = AndroidJNI.FindClass("com/miku/profiler/Profiler");
69-
m_getPassPtr = AndroidJNIHelper.GetMethodID<int>(m_debugClassPtr, "GetPassValue", jv, true);
70-
m_getBatteryLevel = AndroidJNIHelper.GetMethodID<float>(m_debugClassPtr,"GetBattleryLevel", jv, true);
71-
m_debugClass = new AndroidJavaClass("com/miku/profiler/Profiler");
72-
m_debugClass.CallStatic("run");
73-
#endif
74-
}
75-
7649
public static int GetPass()
7750
{
78-
#if UNITY_ANDROID && !UNITY_EDITOR
79-
if (m_getPassPtr != IntPtr.Zero)
80-
{
81-
return AndroidJNI.CallStaticIntMethod(m_debugClassPtr, m_getPassPtr, m_jv) * 1024;
82-
}
83-
else
84-
{
85-
#if UNITY_5_5_OR_NEWER
86-
return (int)Profiler.GetTotalAllocatedMemoryLong();
87-
#else
88-
return (int)Profiler.GetTotalAllocatedMemory();
89-
#endif
90-
}
91-
#else
9251
#if UNITY_5_5_OR_NEWER
9352
return (int)Profiler.GetTotalAllocatedMemoryLong();
9453
#else
9554
return (int)Profiler.GetTotalAllocatedMemory();
96-
#endif
9755
#endif
9856
}
9957

10058
public static float GetBatteryLevel()
10159
{
10260
float result = 100;
103-
#if UNITY_ANDROID && !UNITY_EDITOR
104-
result = AndroidJNI.CallStaticFloatMethod(m_debugClassPtr, m_getBatteryLevel, m_jv);
105-
#elif UNITY_IPHONE && !UNITY_EDITOR
106-
result = GetIOSBatteryLevel();
107-
#endif
10861
return result;
10962
}
110-
111-
#if UNITY_IPHONE && !UNITY_EDITOR
112-
[DllImport(NATIVE_DLL)]
113-
private static extern float GetIOSBatteryLevel();
114-
#endif
11563
}
11664
}
11765
#endif

LuaProfiler/LuaProfilerClient/Core/LuaHookSetup.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ public static void OnStartGame()
109109

110110
private void Awake()
111111
{
112-
NativeHelper.RunAyncPass();
113112
setting = LuaDeepProfilerSetting.Instance;
114113
}
115114

LuaProfiler/LuaProfilerClient/Editor/StartUp.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public static class InjectMethods
137137
private static MethodDefinition m_hookloadbuffer;
138138
private static MethodDefinition m_hookRef;
139139
private static MethodDefinition m_hookUnref;
140-
private static MethodDefinition m_luaGC;
141140
public delegate void InjectMethodAction(MethodDefinition method, ModuleDefinition module, MethodDefinition newMethod);
142141

143142
private const string LUA_NEW_STATE = "luaL_newstate";
@@ -578,10 +577,6 @@ private static void DoHookLuaFun(string luaPath, string profilerPath)
578577
{
579578
return;
580579
}
581-
if (m.Name == "lua_gc")
582-
{
583-
m_luaGC = m;
584-
}
585580
}
586581
#endregion
587582

-2.16 KB
Binary file not shown.

LuaProfiler/LuaProfilerClient/Plugins/Android/miku_profiler.jar.meta

Lines changed: 0 additions & 29 deletions
This file was deleted.

LuaProfiler/LuaProfilerClient/Plugins/IOS/MikuProfilerNative.mm

Lines changed: 0 additions & 5 deletions
This file was deleted.

LuaProfiler/LuaProfilerClient/Plugins/IOS/MikuProfilerNative.mm.meta

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)