[compiler-rt] d6fc61b - [profile] Record the profile size as a property of the VMO
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 16:22:37 PDT 2020
Author: Petr Hosek
Date: 2020-03-19T16:22:19-07:00
New Revision: d6fc61b7e8b0dac481e4c84c1ace4a43e5b7ed4c
URL: https://github.com/llvm/llvm-project/commit/d6fc61b7e8b0dac481e4c84c1ace4a43e5b7ed4c
DIFF: https://github.com/llvm/llvm-project/commit/d6fc61b7e8b0dac481e4c84c1ace4a43e5b7ed4c.diff
LOG: [profile] Record the profile size as a property of the VMO
While the VMO size is always page aligned, we can record the content
size as a property and then use this metadata when writing the profile
to a file.
Differential Revision: https://reviews.llvm.org/D76402
Added:
Modified:
compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c b/compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c
index bf78adbbca15..2d66be6de73e 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c
@@ -79,6 +79,11 @@ static uint32_t lprofVMOWriter(ProfDataWriter *This, ProfDataIOVec *IOVecs,
__llvm_profile_offset += Length;
}
+ /* Record the profile size as a property of the VMO. */
+ _zx_object_set_property(__llvm_profile_vmo, ZX_PROP_VMO_CONTENT_SIZE,
+ &__llvm_profile_offset,
+ sizeof(__llvm_profile_offset));
+
return 0;
}
More information about the llvm-commits
mailing list