Skip to content

Commit f8c5d7a

Browse files
author
tiann
committed
fixes #616 #634 #626
1 parent 0fee90a commit f8c5d7a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

VirtualApp/lib/src/main/jni/Foundation/VMPatch.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,11 @@ bool (*orig_ProcessProfilingInfo)(void*, void*);
443443
bool compileNothing(void* thiz, void* thread, void* method, bool osr) { return false; }
444444
bool (*orig_CompileNothing)(void* thiz, void* thread, void* method, bool osr);
445445

446+
void (*org_notifyJitActivity)(void *);
447+
void notifyNothing(void *thiz) {
448+
return;
449+
}
450+
446451
void disableJit(int apiLevel) {
447452
#ifdef __arm__
448453
void *libart = fake_dlopen("/system/lib/libart.so", RTLD_NOW);
@@ -466,6 +471,12 @@ void disableJit(int apiLevel) {
466471
if (compileMethod) {
467472
MSHookFunction(compileMethod, (void*) compileNothing, (void**) &orig_CompileNothing);
468473
}
474+
475+
void *notifyJitActivity = fake_dlsym(libart, "_ZN3art12ProfileSaver17NotifyJitActivityEv");
476+
if (notifyJitActivity) {
477+
MSHookFunction(notifyJitActivity, (void *) notifyNothing,
478+
(void **) &org_notifyJitActivity);
479+
}
469480
}
470481
#endif
471482
}

0 commit comments

Comments
 (0)