]> granicus.if.org Git - llvm/commitdiff
[profile] Support profiling runtime on Fuchsia
authorPetr Hosek <phosek@chromium.org>
Wed, 25 Jul 2018 03:01:35 +0000 (03:01 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 25 Jul 2018 03:01:35 +0000 (03:01 +0000)
This ports the profiling runtime on Fuchsia and enables the
instrumentation. Unlike on other platforms, Fuchsia doesn't use
files to dump the instrumentation data since on Fuchsia, filesystem
may not be accessible to the instrumented process. We instead use
the data sink to pass the profiling data to the system the same
sanitizer runtimes do.

Differential Revision: https://reviews.llvm.org/D47208

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337881 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/InstrProfiling.cpp

index 8be1638ce403ff74b1dba88573af47f3c5a46d49..22076f04d6ad1c2fca745cdf6743bcbe1479fef6 100644 (file)
@@ -691,6 +691,7 @@ static bool needsRuntimeRegistrationOfSectionRange(const Module &M) {
   // Use linker script magic to get data/cnts/name start/end.
   if (Triple(M.getTargetTriple()).isOSLinux() ||
       Triple(M.getTargetTriple()).isOSFreeBSD() ||
+      Triple(M.getTargetTriple()).isOSFuchsia() ||
       Triple(M.getTargetTriple()).isPS4CPU())
     return false;