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)' \
5 // RUN: %clangxx -S -ftime-trace=%T/new-name.json -ftime-trace-granularity=0 -o %T/check-time-trace %s
6 // RUN: cat %T/new-name.json \
7 // RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
9 // RUN: rm -rf %T/output1 && mkdir %T/output1
10 // RUN: %clangxx -S -ftime-trace=%T/output1 -ftime-trace-granularity=0 -o %T/check-time-trace %s
11 // RUN: cat %T/output1/check-time-trace.json \
12 // RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
13 // RUN: | FileCheck %s
14 // RUN: rm -rf %T/output2 && mkdir %T/output2
15 // RUN: %clangxx -S -ftime-trace=%T/output2/ -ftime-trace-granularity=0 -o %T/check-time-trace %s
16 // RUN: cat %T/output2/check-time-trace.json \
17 // RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
18 // RUN: | FileCheck %s
20 // CHECK: "beginningOfTime": {{[0-9]{16},}}
21 // CHECK-NEXT: "traceEvents": [
30 // CHECK: "name": "clang{{.*}}"
31 // CHECK: "name": "process_name"
32 // CHECK: "name": "thread_name"