mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
JitCache: Add WipeBlockProfilingData Function
Accessible from DolphinQt and Android.
This commit is contained in:
@ -391,6 +391,11 @@ public final class NativeLibrary
|
||||
*/
|
||||
public static native boolean IsUninitialized();
|
||||
|
||||
/**
|
||||
* Re-initialize software JitBlock profiling data
|
||||
*/
|
||||
public static native void WipeJitBlockProfilingData();
|
||||
|
||||
/**
|
||||
* Writes out the JitBlock Cache log dump
|
||||
*/
|
||||
|
@ -2013,6 +2013,16 @@ class SettingsFragmentPresenter(
|
||||
0
|
||||
)
|
||||
)
|
||||
sl.add(
|
||||
RunRunnable(
|
||||
context,
|
||||
R.string.debug_jit_wipe_block_profiling_data,
|
||||
0,
|
||||
R.string.debug_jit_wipe_block_profiling_data_alert,
|
||||
0,
|
||||
true
|
||||
) { NativeLibrary.WipeJitBlockProfilingData() }
|
||||
)
|
||||
sl.add(
|
||||
RunRunnable(
|
||||
context,
|
||||
|
@ -412,6 +412,8 @@
|
||||
<string name="debug_large_entry_points_map">Disable Large Entry Points Map</string>
|
||||
<string name="debug_jit_profiling_header">Jit Profiling</string>
|
||||
<string name="debug_jit_enable_block_profiling">Enable Jit Block Profiling</string>
|
||||
<string name="debug_jit_wipe_block_profiling_data">Wipe Jit Block Profiling Data</string>
|
||||
<string name="debug_jit_wipe_block_profiling_data_alert">Re-initialize JIT block profiling data?</string>
|
||||
<string name="debug_jit_write_block_log_dump">Write Jit Block Log Dump</string>
|
||||
<string name="debug_jit_header">Jit</string>
|
||||
<string name="debug_jitoff">Jit Disabled</string>
|
||||
|
@ -410,6 +410,22 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetMaxLogLev
|
||||
return static_cast<jint>(Common::Log::MAX_LOGLEVEL);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WipeJitBlockProfilingData(
|
||||
JNIEnv* env, jclass native_library_class)
|
||||
{
|
||||
HostThreadLock guard;
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& jit_interface = system.GetJitInterface();
|
||||
const Core::CPUThreadGuard cpu_guard(system);
|
||||
if (jit_interface.GetCore() == nullptr)
|
||||
{
|
||||
env->CallStaticVoidMethod(native_library_class, IDCache::GetDisplayToastMsg(),
|
||||
ToJString(env, Common::GetStringT("JIT is not active")), JNI_FALSE);
|
||||
return;
|
||||
}
|
||||
jit_interface.WipeBlockProfilingData(cpu_guard);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteJitBlockLogDump(
|
||||
JNIEnv* env, jclass native_library_class)
|
||||
{
|
||||
|
Reference in New Issue
Block a user