mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
[PR] Instrumentation: Sync file on dump
Summary: Sync the file with storage device on data dump to stabilize instrumentation testing Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei (cherry picked from FBD31738021)
This commit is contained in:
committed by
Maksim Panchenko
parent
2d431eefbf
commit
dcdd37fdc2
@@ -1485,6 +1485,7 @@ __bolt_instr_data_dump() {
|
||||
writeIndirectCallProfile(FD, Ctx);
|
||||
Ctx.CallFlowTable->forEachElement(visitCallFlowEntry, FD, &Ctx);
|
||||
|
||||
__fsync(FD);
|
||||
__close(FD);
|
||||
__munmap(Ctx.MMapPtr, Ctx.MMapSize);
|
||||
__close(Ctx.FileDesc);
|
||||
@@ -1509,6 +1510,7 @@ void watchProcess() {
|
||||
ppid = __getppid();
|
||||
if (ppid == 1) {
|
||||
// Parent already dead
|
||||
__bolt_instr_data_dump();
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user