diff options
author | Renato Golin <renato.golin@linaro.org> | 2017-02-20 15:03:12 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2017-02-20 15:03:12 +0000 |
commit | a5773525358cb1a1f9b1b6b7a1793892f13a7adb (patch) | |
tree | 9c05a7afa11bde3f0208cea1b2050592ee36e71f /test/profile | |
parent | cb4a476d3b02a7101d2fdcd56fafd4c38477255e (diff) |
Revert "[PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-write"
Revert "[PGO] remove unintended debug trace. NFC"
This reverts commit r295469, r295364, as they are unstable on ARM/AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@295664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile')
-rw-r--r-- | test/profile/Linux/prctl.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/test/profile/Linux/prctl.c b/test/profile/Linux/prctl.c deleted file mode 100644 index 43baf6543..000000000 --- a/test/profile/Linux/prctl.c +++ /dev/null @@ -1,36 +0,0 @@ -// RUN: %clang_pgogen -O2 -o %t %s -// RUN: rm -rf default_*.profraw -// RUN: %run %t && sleep 1 -// RUN: llvm-profdata show default_*.profraw 2>&1 | FileCheck %s - -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <sys/prctl.h> -#include <unistd.h> - -#define FAKE_COUNT_SZ 2000000 -/* fake counts to increse the profile size. */ -unsigned long long __attribute__((section("__llvm_prf_cnts"))) -counts[FAKE_COUNT_SZ]; - -int main(int argc, char **argv) { - pid_t pid = fork(); - if (pid == 0) { - int i; - int sum = 0; - /* child process: sleep 500us and get to runtime before the - * main process exits. */ - prctl(PR_SET_PDEATHSIG, SIGKILL); - usleep(500); - for (i = 0; i < 5000; ++i) - sum += i * i * i; - printf("child process (%d): sum=%d\n", getpid(), sum); - } else if (pid > 0) { - /* parent process: sleep 100us to get into profile runtime first. */ - usleep(100); - } - return 0; -} - -// CHECK-NOT: Empty raw profile file |