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
66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
REQUIRES: x86
|
|
|
|
## Test that DTLTO-specific LTO input file handling time-trace output is
|
|
## produced as expected.
|
|
|
|
RUN: rm -rf %t && split-file %s %t && cd %t
|
|
|
|
RUN: sed 's/@t1/@t2/g' t1.ll > t2.ll
|
|
|
|
## Generate ThinLTO bitcode files.
|
|
RUN: opt -thinlto-bc t1.ll -o t1.bc
|
|
RUN: opt -thinlto-bc t2.ll -o t2.bc
|
|
|
|
## Create archives.
|
|
RUN: llvm-ar rcs t1.a t1.bc
|
|
RUN: llvm-ar rcsT t2.thin.a t2.bc
|
|
|
|
## Generate object files for mock.py to return.
|
|
RUN: llc t1.ll --filetype=obj -o t1.o
|
|
RUN: llc t2.ll --filetype=obj -o t2.o
|
|
|
|
## Link and generate a time-trace.
|
|
## Note: mock.py doesn't compile; it copies the specified object files to the
|
|
## outputs in job order.
|
|
RUN: ld.lld --whole-archive t1.a t2.thin.a -o my.elf \
|
|
RUN: --thinlto-distributor=%python \
|
|
RUN: --thinlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py \
|
|
RUN: --thinlto-distributor-arg=t1.o --thinlto-distributor-arg=t2.o \
|
|
RUN: --time-trace-granularity=0 --time-trace=%t.json
|
|
RUN: %python filter_order_and_pprint.py %t.json | FileCheck %s
|
|
|
|
## Check that DTLTO add input file events are recorded.
|
|
CHECK: "name": "Add input for DTLTO"
|
|
CHECK: "name": "Add input for DTLTO"
|
|
CHECK: "name": "Remove DTLTO temporary files"
|
|
CHECK: "name": "Serialize bitcode input for DTLTO"
|
|
CHECK-SAME: "detail": "t1.a(t1.bc at [[#ARCHIVE_OFFSET:]]).1.[[PID:[A-F0-9]+]].o"
|
|
CHECK: "name": "Total Add input for DTLTO"
|
|
CHECK-SAME: "count": 2,
|
|
CHECK: "name": "Total Remove DTLTO temporary files"
|
|
CHECK-SAME: "count": 1,
|
|
CHECK: "name": "Total Serialize bitcode input for DTLTO"
|
|
CHECK-SAME: "count": 1,
|
|
|
|
#--- 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
|
|
}
|
|
|
|
#--- 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}))
|