2019-07-24 22:55:40 +08:00
|
|
|
// RUN: %clangxx -S -ftime-trace -ftime-trace-granularity=0 -o %T/check-time-trace %s
|
2019-06-11 20:05:03 +08:00
|
|
|
// RUN: cat %T/check-time-trace.json \
|
2019-06-11 16:25:54 +08:00
|
|
|
// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
|
|
|
|
// RUN: | FileCheck %s
|
|
|
|
|
2020-04-16 22:37:25 +08:00
|
|
|
// CHECK: "beginningOfTime": {{[0-9]{16},}}
|
|
|
|
// CHECK-NEXT: "traceEvents": [
|
|
|
|
// CHECK: "args":
|
|
|
|
// CHECK: "detail":
|
|
|
|
// CHECK: "dur":
|
|
|
|
// CHECK: "name":
|
2019-06-11 16:25:54 +08:00
|
|
|
// CHECK-NEXT: "ph":
|
|
|
|
// CHECK-NEXT: "pid":
|
|
|
|
// CHECK-NEXT: "tid":
|
|
|
|
// CHECK-NEXT: "ts":
|
2020-04-16 22:37:25 +08:00
|
|
|
// CHECK: "name": "clang{{.*}}"
|
|
|
|
// CHECK: "name": "process_name"
|
|
|
|
// CHECK: "name": "thread_name"
|
2019-06-11 16:25:54 +08:00
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
struct Struct {
|
|
|
|
T Num;
|
|
|
|
};
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
Struct<int> S;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|