Skip to content

Commit c3dd787

Browse files
[rtsan] Update notify function name in blocking Pass
1 parent b0e4cf3 commit c3dd787

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static PreservedAnalyses rtsanPreservedCFGAnalyses() {
5252
return PA;
5353
}
5454

55-
static void insertExpectNotRealtimeAtFunctionEntryPoint(Function &F) {
55+
static void insertNotifyBlockingCallAtFunctionEntryPoint(Function &F) {
5656
IRBuilder<> Builder(&F.front().front());
5757
Value *NameArg = Builder.CreateGlobalString(demangle(F.getName()));
5858

@@ -61,7 +61,7 @@ static void insertExpectNotRealtimeAtFunctionEntryPoint(Function &F) {
6161
{PointerType::getUnqual(F.getContext())}, false);
6262

6363
FunctionCallee Func = F.getParent()->getOrInsertFunction(
64-
"__rtsan_expect_not_realtime", FuncType);
64+
"__rtsan_notify_blocking_call", FuncType);
6565

6666
Builder.CreateCall(Func, {NameArg});
6767
}
@@ -78,7 +78,7 @@ PreservedAnalyses RealtimeSanitizerPass::run(Function &F,
7878
}
7979

8080
if (F.hasFnAttribute(Attribute::SanitizeRealtimeUnsafe)) {
81-
insertExpectNotRealtimeAtFunctionEntryPoint(F);
81+
insertNotifyBlockingCallAtFunctionEntryPoint(F);
8282
return rtsanPreservedCFGAnalyses();
8383
}
8484

llvm/test/Instrumentation/RealtimeSanitizer/rtsan_unsafe.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ attributes #0 = { mustprogress noinline sanitize_realtime_unsafe optnone ssp uwt
1616
; CHECK: [[GLOBAL_STR:@[a-zA-Z0-9\.]+]]
1717
; CHECK-SAME: c"blocking_function()\00"
1818
; CHECK-LABEL: @_Z17blocking_functionv()
19-
; CHECK-NEXT: call{{.*}}@__rtsan_expect_not_realtime(ptr{{.*}}[[GLOBAL_STR]])
19+
; CHECK-NEXT: call{{.*}}@__rtsan_notify_blocking_call(ptr{{.*}}[[GLOBAL_STR]])

0 commit comments

Comments
 (0)