#include <sys/types.h>
#include <time.h>
+#if defined(__linux__)
+#include <sys/syscall.h>
+#include <unistd.h>
+#endif
+
#include <functional>
#include <set>
#include <string>
bool GetValidThreadsFromThreadString(const std::string& tid_str, std::set<pid_t>* tid_set);
bool CheckPerfEventLimit();
+bool GetMaxSampleFrequency(uint64_t* max_sample_freq);
bool CheckSampleFrequency(uint64_t sample_freq);
bool CheckKernelSymbolAddresses();
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
}
+
+#if !defined(__ANDROID__)
+static inline int gettid() {
+ return syscall(__NR_gettid);
+}
+#endif
#endif
ArchType GetMachineArch();
+void PrepareVdsoFile();
#endif // SIMPLE_PERF_ENVIRONMENT_H_