1 //===-- xray_powerpc64.inc --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of XRay, a dynamic runtime instrumentation system.
12 //===----------------------------------------------------------------------===//
16 #include <sys/platform/ppc.h>
18 #include "xray_defs.h"
22 ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
24 return __ppc_get_timebase();
27 inline uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT {
29 std::lock_guard<std::mutex> Guard(M);
30 return __ppc_get_timebase_freq();
33 inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT {