1 // RUN: %clangxx -S -ftime-trace -ftime-trace-granularity=0 -o %T/check-time-trace %s
2 // RUN: cat %T/check-time-trace.json \
3 // RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
4 // RUN: | FileCheck %s
5
6 // CHECK: "beginningOfTime": {{[0-9]{16},}}
7 // CHECK-NEXT: "traceEvents": [
8 // CHECK: "args":
9 // CHECK: "detail":
10 // CHECK: "dur":
11 // CHECK: "name":
12 // CHECK-NEXT: "ph":
13 // CHECK-NEXT: "pid":
14 // CHECK-NEXT: "tid":
15 // CHECK-NEXT: "ts":
16 // CHECK: "name": "clang{{.*}}"
17 // CHECK: "name": "process_name"
18 // CHECK: "name": "thread_name"
19
20 template <typename T>
21 struct Struct {
22 T Num;
23 };
24
main()25 int main() {
26 Struct<int> S;
27
28 return 0;
29 }
30