summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2017-12-13 16:23:54 +0000
committerKostya Kortchinsky <kostyak@google.com>2017-12-13 16:23:54 +0000
commitf50246da651ee11fec68b2a29c3b21325cdc12b1 (patch)
treef743449e54f1050469150d1ea7711fd2adbcc7c9 /compiler-rt/lib/sanitizer_common/sanitizer_linux.h
parent7634f7093a752517678a90d0fb1fa5c5d1d69706 (diff)
downloadbcm5719-llvm-f50246da651ee11fec68b2a29c3b21325cdc12b1.tar.gz
bcm5719-llvm-f50246da651ee11fec68b2a29c3b21325cdc12b1.zip
[sanitizer] Introduce a vDSO aware timing function
Summary: See D40657 & D40679 for previous versions of this patch & description. A couple of things were fixed here to have it not break some bots. Weak symbols can't be used with `SANITIZER_GO` so the previous version was breakin TsanGo. I set up some additional local tests and those pass now. I changed the workaround for the glibc vDSO issue: `__progname` is initialized after the vDSO and is actually public and of known type, unlike `__vdso_clock_gettime`. This works better, and with all compilers. The rest is the same. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D41121 llvm-svn: 320594
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_linux.h')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_linux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.h b/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
index 88cac33d870..c10dcf5639a 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
@@ -46,6 +46,7 @@ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
uptr internal_sigaltstack(const void* ss, void* oss);
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
__sanitizer_sigset_t *oldset);
+uptr internal_clock_gettime(__sanitizer_clockid_t clk_id, void *tp);
// Linux-only syscalls.
#if SANITIZER_LINUX
OpenPOWER on IntegriCloud