brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 2213a30 Raw
44 lines · plain
1; REQUIRES: x862 3; Test ThinLTO with time trace4; RUN: opt -module-summary %s -o %t1.o5; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o6 7; Test single-threaded8; RUN: ld.lld --thinlto-jobs=1 --time-trace --time-trace-granularity=0 -shared %t1.o %t2.o -o %t3.so9; 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)' \11; RUN:   | FileCheck %s12 13; Test multi-threaded14; RUN: ld.lld --time-trace --time-trace-granularity=0 -shared %t1.o %t2.o -o %t4.so15; 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)' \17; RUN:   | FileCheck %s18 19; CHECK: "traceEvents": [20; Check fields for an event are present21; CHECK: "args":22; CHECK-NEXT: "detail":23; CHECK: "dur":24; CHECK-NEXT: "name":25; CHECK-NEXT: "ph":26; CHECK-NEXT: "pid":27; CHECK-NEXT: "tid":28; CHECK-NEXT: "ts":29 30; Check that an optimisation event is present31; CHECK: "name": "OptModule"32 33target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"34target triple = "x86_64-unknown-linux-gnu"35 36declare void @g(...)37 38define void @f() {39entry:40  call void (...) @g()41  ret void42}43 44