CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
82 lines
2.7 KiB
LLVM
82 lines
2.7 KiB
LLVM
; Test that the LLD produces expected time trace output for DTLTO.
|
|
|
|
RUN: rm -rf %t && split-file %s %t && cd %t
|
|
|
|
; Generate bitcode files with summary.
|
|
RUN: opt -thinlto-bc t1.ll -o t1.bc
|
|
RUN: opt -thinlto-bc t2.ll -o t2.bc
|
|
|
|
; Generate fake object files for mock.py to return.
|
|
RUN: touch t1.o t2.o
|
|
|
|
; Perform DTLTO and generate a time trace. mock.py does not do any compilation,
|
|
; instead it simply writes the contents of the object files supplied on the
|
|
; command line into the output object files in job order.
|
|
RUN: llvm-lto2 run t1.bc t2.bc -o t.o \
|
|
RUN: -dtlto-distributor=%python \
|
|
RUN: -dtlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py,t1.o,t2.o \
|
|
RUN: --time-trace --time-trace-granularity=0 --time-trace-file=%t.json \
|
|
RUN: -r=t1.bc,t1,px \
|
|
RUN: -r=t2.bc,t2,px
|
|
RUN: %python filter_order_and_pprint.py %t.json | FileCheck %s
|
|
|
|
## Check that DTLTO events are recorded.
|
|
CHECK-NOT: "name"
|
|
CHECK: "name": "Add DTLTO files to the link"
|
|
CHECK-SAME: "pid": [[#PID:]],
|
|
CHECK-NEXT: "name": "Add input for DTLTO"
|
|
CHECK-SAME: "pid": [[#PID:]],
|
|
CHECK-NEXT: "name": "Add input for DTLTO"
|
|
CHECK-SAME: "pid": [[#PID:]],
|
|
CHECK-NEXT: "name": "Emit DTLTO JSON"
|
|
CHECK-NEXT: "name": "Emit individual index for DTLTO"
|
|
CHECK-SAME: t1.1.[[#PID]].native.o.thinlto.bc"
|
|
CHECK-NEXT: "name": "Emit individual index for DTLTO"
|
|
CHECK-SAME: t2.2.[[#PID]].native.o.thinlto.bc"
|
|
CHECK-NEXT: "name": "Execute DTLTO distributor", "{{.*}}"
|
|
CHECK-NEXT: "name": "Remove DTLTO temporary files"
|
|
CHECK-NEXT: "name": "Total Add DTLTO files to the link"
|
|
CHECK-SAME: "count": 1,
|
|
CHECK-NEXT: "name": "Total Add input for DTLTO"
|
|
CHECK-SAME: "count": 2,
|
|
CHECK-NEXT: "name": "Total Emit DTLTO JSON"
|
|
CHECK-SAME: "count": 1,
|
|
CHECK-NEXT: "name": "Total Emit individual index for DTLTO"
|
|
CHECK-SAME: "count": 2,
|
|
CHECK-NEXT: "name": "Total Execute DTLTO distributor"
|
|
CHECK-SAME: "count": 1,
|
|
CHECK-NEXT: "name": "Total Remove DTLTO temporary files"
|
|
CHECK-SAME: "count": 1,
|
|
CHECK-NOT: "name"
|
|
|
|
;--- t1.ll
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
define void @t1() {
|
|
ret void
|
|
}
|
|
|
|
;--- t2.ll
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
define void @t2() {
|
|
ret void
|
|
}
|
|
|
|
#--- filter_order_and_pprint.py
|
|
import json, sys
|
|
|
|
data = json.load(open(sys.argv[1], "r", encoding="utf-8"))
|
|
|
|
# Get DTLTO events.
|
|
events = [e for e in data["traceEvents"] if "DTLTO" in e["name"]]
|
|
events.sort(key=lambda e: (e["name"], str(e.get("args", {}).get("detail", ""))))
|
|
|
|
# Print an event per line. Ensure 'name' is the first key.
|
|
for ev in events:
|
|
name = ev.pop("name")
|
|
print(json.dumps({"name": name, **ev}))
|
|
|