| 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 |
|
| 20 |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
| 21 |
target triple = "x86_64-unknown-linux-gnu" |
| 22 |
|
| 23 |
define void @f1() { |
| 24 |
ret void |
| 25 |
} |
| 26 |
|
| 27 |
define void @f2() { |
| 28 |
ret void |
| 29 |
} |
| 30 |
|
| 31 |
; CHECK: "traceEvents": |
| 32 |
; ERR: Invalid time trace granularity: hello |