3 ; Test ThinLTO with time trace
4 ; RUN: opt -module-summary %s -o %t1.o
5 ; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
8 ; RUN: ld.lld --thinlto-jobs=1 --time-trace --time-trace-granularity=0 -shared %t1.o %t2.o -o %t3.so
9 ; RUN: cat %t3.so.time-trace \
10 ; RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
14 ; RUN: ld.lld --time-trace --time-trace-granularity=0 -shared %t1.o %t2.o -o %t4.so
15 ; RUN: cat %t4.so.time-trace \
16 ; RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
19 ; CHECK: "traceEvents": [
20 ; Check fields for an event are present
22 ; CHECK-NEXT: "detail":
30 ; Check that an optimisation event is present
31 ; CHECK: "name": "OptModule"
33 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
34 target triple = "x86_64-unknown-linux-gnu"