[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / time-trace.s
blob436da2483a54f6172ba8724f3909bd9ec7019514
1 # REQUIRES: x86
3 # RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
5 # Test implicit trace file name
6 # RUN: lld-link %t.obj /entry:main /out:%t1.exe --time-trace --time-trace-granularity=0
7 # RUN: cat %t1.exe.time-trace \
8 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
9 # RUN: | FileCheck %s
11 # Test specified trace file name
12 # RUN: lld-link %t.obj /entry:main /out:%t2.exe --time-trace=%t2.json --time-trace-granularity=0
13 # RUN: cat %t2.json \
14 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
15 # RUN: | FileCheck %s
17 # Test trace requested to stdout
18 # RUN: env LLD_IN_TEST=1 lld-link %t.obj /entry:main /out:%t3.exe --time-trace=- --time-trace-granularity=0 \
19 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
20 # RUN: | FileCheck %s
22 # CHECK: "beginningOfTime": {{[0-9]{16},}}
23 # CHECK-NEXT: "traceEvents": [
25 # Check one event has correct fields
26 # CHECK: "dur":
27 # CHECK-NEXT: "name":
28 # CHECK-NEXT: "ph":
29 # CHECK-NEXT: "pid":
30 # CHECK-NEXT: "tid":
31 # CHECK-NEXT: "ts":
33 # Check there are events
34 # CHECK: "name": "Read input files"
36 # Check process_name entry field
37 # CHECK: "name": "lld-link{{(.exe)?}}"
38 # CHECK: "name": "process_name"
39 # CHECK: "name": "thread_name"
41 .text
42 .global main
43 main:
44 ret