1 //===-- xray_powerpc64.inc --------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file is a part of XRay, a dynamic runtime instrumentation system.
11 //===----------------------------------------------------------------------===//
15 #include <sys/platform/ppc.h>
17 #include "xray_defs.h"
21 ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
23 return __ppc_get_timebase();
26 inline uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT {
28 std::lock_guard<std::mutex> Guard(M);
29 return __ppc_get_timebase_freq();
32 inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT {