xref: /llvm-project/llvm/test/tools/gold/X86/time-trace.ll (revision cd3255abede5e3687c1538f2d3857deb2c51af1b)
1; RUN: llvm-as %s -o %t.o
2
3; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
4; RUN:    -m elf_x86_64 --plugin-opt=time-trace=%t2.json \
5; RUN:    -shared %t.o -o /dev/null
6; RUN: FileCheck --input-file %t2.json %s
7
8; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
9; RUN:    -m elf_x86_64 --plugin-opt=time-trace=%t2.json \
10; RUN:    --plugin-opt=time-trace-granularity=250  \
11; RUN:    -shared %t.o -o /dev/null
12; RUN: FileCheck --input-file %t2.json %s
13
14; RUN: not %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
15; RUN:    -m elf_x86_64 --plugin-opt=time-trace=%t2.json \
16; RUN:    --plugin-opt=time-trace-granularity=hello  \
17; RUN:    -shared %t.o -o /dev/null 2> %t4.txt
18; RUN: FileCheck --input-file %t4.txt %s --check-prefix=ERR
19
20target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
21target triple = "x86_64-unknown-linux-gnu"
22
23define void @f1() {
24  ret void
25}
26
27define void @f2() {
28  ret void
29}
30
31; CHECK: "traceEvents":
32; ERR: Invalid time trace granularity: hello
33