File tree 2 files changed +36
-5
lines changed
2 files changed +36
-5
lines changed Original file line number Diff line number Diff line change 1
- #pragma once
2
- #include < time.h>
1
+ // ===-- xray_emulate_tsc.h --------------------------------------*- C++ -*-===//
2
+ //
3
+ // The LLVM Compiler Infrastructure
4
+ //
5
+ // This file is distributed under the University of Illinois Open Source
6
+ // License. See LICENSE.TXT for details.
7
+ //
8
+ // ===----------------------------------------------------------------------===//
9
+ //
10
+ // This file is a part of XRay, a dynamic runtime instrumentation system.
11
+ //
12
+ // ===----------------------------------------------------------------------===//
13
+ #ifndef XRAY_EMULATE_TSC_H
14
+ #define XRAY_EMULATE_TSC_H
3
15
4
16
#include " sanitizer_common/sanitizer_internal_defs.h"
5
17
#include " xray_defs.h"
18
+ #include < cstdint>
19
+ #include < time.h>
6
20
7
21
namespace __xray {
8
22
@@ -19,5 +33,6 @@ ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
19
33
CPU = 0 ;
20
34
return TS.tv_sec * NanosecondsPerSecond + TS.tv_nsec ;
21
35
}
22
-
23
36
}
37
+
38
+ #endif // XRAY_EMULATE_TSC_H
Original file line number Diff line number Diff line change 1
- #pragma once
1
+ // ===-- xray_x86_64.h -------------------------------------------*- C++ -*-===//
2
+ //
3
+ // The LLVM Compiler Infrastructure
4
+ //
5
+ // This file is distributed under the University of Illinois Open Source
6
+ // License. See LICENSE.TXT for details.
7
+ //
8
+ // ===----------------------------------------------------------------------===//
9
+ //
10
+ // This file is a part of XRay, a dynamic runtime instrumentation system.
11
+ //
12
+ // ===----------------------------------------------------------------------===//
13
+ #ifndef XRAY_X86_64_H
14
+ #define XRAY_X86_64_H
15
+
16
+ #include < cstdint>
2
17
#include < x86intrin.h>
3
18
4
19
#include " sanitizer_common/sanitizer_internal_defs.h"
@@ -12,5 +27,6 @@ ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
12
27
CPU = LongCPU;
13
28
return TSC;
14
29
}
15
-
16
30
}
31
+
32
+ #endif // XRAY_X86_64_H
You can’t perform that action at this time.
0 commit comments