xref: /llvm-project/llvm/test/tools/llvm-xray/X86/convert-traceevent-special-events.txt (revision 935a6d4024295201f1e3e59c995a9dfa986836d7)
1# RUN: llvm-xray convert %s -f trace_event -o - \
2# RUN:   | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
3# RUN:   | FileCheck %s
4---
5header:
6  version: 1
7  type: 0
8  constant-tsc: true
9  nonstop-tsc: true
10  cycle-frequency: 2601000000
11records:
12  - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 }
13  - { type: 0, func-id: 1, function: 'x', cpu: 1, thread: 111, process: 111, kind: custom-event, tsc: 2000, data: "\x03\0\0\0" }
14  - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10100 }
15...
16
17# CHECK: "traceEvents": [
18# Check fields for an event are present
19# CHECK: "name":
20# CHECK-NEXT: "ph":
21# CHECK-NEXT: "pid":
22# CHECK-NEXT: "sf":
23# CHECK-NEXT: "tid":
24# CHECK-NEXT: "ts":
25