Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[llvm] Ensure propagated constants in the vtable are aligned #136630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025

Conversation

PiJoules
Copy link
Contributor

It's possible for virtual constant propagation in whole program devirtualization to create unaligned loads. We originally saw this with 4-byte aligned relative vtables where we could store 8-byte values before/after the vtable. But since the vtable is 4-byte aligned and we unconditionally do an 8-byte load, we can't guarantee that the stored constant will always be aligned to 8 bytes. We can also see this with normal vtables whenever a 1-byte char is stored in the vtable because the offset calculation for the GEP doesn't take into account the original vtable alignment.

This patch introduces two changes to virtual constant propagation:

  1. Do not propagate constants whose preferred alignment is larger than the vtable alignment. This is required because if the constants are stored in the vtable, we can only guarantee the constant will be stored at an address at most aligned to the vtable's alignment.
  2. Round up the offset used in the GEP before the load to ensure it's at an address suitably aligned such that we can load from it.

This patch updates tests to reflect this alignment change and adds some cases for relative vtables.

@llvmbot
Copy link
Member

llvmbot commented Apr 21, 2025

@llvm/pr-subscribers-llvm-transforms

Author: None (PiJoules)

Changes

It's possible for virtual constant propagation in whole program devirtualization to create unaligned loads. We originally saw this with 4-byte aligned relative vtables where we could store 8-byte values before/after the vtable. But since the vtable is 4-byte aligned and we unconditionally do an 8-byte load, we can't guarantee that the stored constant will always be aligned to 8 bytes. We can also see this with normal vtables whenever a 1-byte char is stored in the vtable because the offset calculation for the GEP doesn't take into account the original vtable alignment.

This patch introduces two changes to virtual constant propagation:

  1. Do not propagate constants whose preferred alignment is larger than the vtable alignment. This is required because if the constants are stored in the vtable, we can only guarantee the constant will be stored at an address at most aligned to the vtable's alignment.
  2. Round up the offset used in the GEP before the load to ensure it's at an address suitably aligned such that we can load from it.

This patch updates tests to reflect this alignment change and adds some cases for relative vtables.


Patch is 56.76 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/136630.diff

7 Files Affected:

  • (modified) llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp (+43-1)
  • (modified) llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-begin.ll (+96-29)
  • (modified) llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-check.ll (+80-11)
  • (modified) llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-end.ll (+79-14)
  • (added) llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-small-alignment-32.ll (+291)
  • (added) llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-small-alignment-64.ll (+292)
  • (modified) llvm/unittests/Transforms/IPO/WholeProgramDevirt.cpp (+1-1)
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
index 0680b2c558807..b9f5e5d893c9a 100644
--- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
@@ -226,6 +226,10 @@ struct PatternList {
     return false;
   }
 };
+
+inline uint64_t RoundUp(uint64_t Size, uint64_t Align) {
+  return (Size + (Align - 1)) / Align * Align;
+}
 } // namespace
 
 // Find the minimum offset that we may store a value of size Size bits at. If
@@ -298,7 +302,9 @@ wholeprogramdevirt::findLowestOffset(ArrayRef<VirtualCallTarget> Targets,
           ++Byte;
         }
       }
-      return (MinByte + I) * 8;
+      // Rounding up ensures the constant is always stored at address we
+      // can directly load from without misalignment.
+      return RoundUp((MinByte + I) * 8, Size);
     NextI:;
     }
   }
@@ -1834,9 +1840,19 @@ bool DevirtModule::tryVirtualConstProp(
   if (!RetType)
     return false;
   unsigned BitWidth = RetType->getBitWidth();
+
+  // TODO: Since we can evaluated these constants at compile-time, we can save
+  // some space by calculating the smallest range of values that all these
+  // constants can fit in, then only allocate enough space to fit those values.
+  // At each callsite, we can get the original type by doing a sign/zero
+  // extension. For example, if we would store an i64, but we can see that all
+  // the values fit into an i16, then we can store an i16 before/after the
+  // vtable and at each callsite do a s/zext.
   if (BitWidth > 64)
     return false;
 
+  Align TypeAlignment = M.getDataLayout().getPrefTypeAlign(RetType);
+
   // Make sure that each function is defined, does not access memory, takes at
   // least one argument, does not use its first argument (which we assume is
   // 'this'), and has the same return type.
@@ -1861,6 +1877,18 @@ bool DevirtModule::tryVirtualConstProp(
         Fn->arg_empty() || !Fn->arg_begin()->use_empty() ||
         Fn->getReturnType() != RetType)
       return false;
+
+    // This only works if the integer size is at most the alignment of the
+    // vtable. If the table is underaligned, then we can't guarantee that the
+    // constant will always be aligned to the integer type alignment. For
+    // example, if the table is `align 1`, we can never guarantee that an i32
+    // stored before/after the vtable is 32-bit aligned without changing the
+    // alignment of the new global.
+    GlobalVariable *GV = Target.TM->Bits->GV;
+    Align TableAlignment = M.getDataLayout().getValueOrABITypeAlignment(
+        GV->getAlign(), GV->getValueType());
+    if (TypeAlignment > TableAlignment)
+      return false;
   }
 
   for (auto &&CSByConstantArg : SlotInfo.ConstCSInfo) {
@@ -1880,6 +1908,12 @@ bool DevirtModule::tryVirtualConstProp(
 
     // Find an allocation offset in bits in all vtables associated with the
     // type.
+    // TODO: If a series of i1s would be placed after the vtable, it would
+    // help save some space if they were placed at the very end after all
+    // other larger-size constants. Having these i1s anywhere in the middle
+    // of the allocation would mean extra padding is needed for any subsequent
+    // constants, but having them at the end wouldn't require this padding
+    // at the very end.
     uint64_t AllocBefore =
         findLowestOffset(TargetsForSlot, /*IsAfter=*/false, BitWidth);
     uint64_t AllocAfter =
@@ -1911,6 +1945,14 @@ bool DevirtModule::tryVirtualConstProp(
       setAfterReturnValues(TargetsForSlot, AllocAfter, BitWidth, OffsetByte,
                            OffsetBit);
 
+    // In an earlier check we forbade constant propagation from operating on
+    // tables whose alignment is less than the alignment needed for loading
+    // the constant. Thus, the address we take the offset from will always be
+    // aligned to at least this integer alignment. Now, we need to ensure that
+    // the offset is also aligned to this integer alignment to ensure we always
+    // have an aligned load.
+    assert(OffsetByte % TypeAlignment.value() == 0);
+
     if (RemarksEnabled || AreStatisticsEnabled())
       for (auto &&Target : TargetsForSlot)
         Target.WasDevirt = true;
diff --git a/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-begin.ll b/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-begin.ll
index 11273804e2081..3ed8027522788 100644
--- a/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-begin.ll
+++ b/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-begin.ll
@@ -1,34 +1,35 @@
 ; RUN: opt -S -passes=wholeprogramdevirt -whole-program-visibility %s | FileCheck %s
 
 target datalayout = "e-p:64:64"
-target triple = "x86_64-unknown-linux-gnu"
 
-; CHECK: [[VT1DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\01\00\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf1i32], [0 x i8] zeroinitializer }, section "vt1sec", !type [[T8:![0-9]+]]
+;; Note that i16 is used here such that we can ensure all constants for "typeid"
+;; can come before the vtable.
+; CHECK: [[VT1DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\00\03\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf1i16], [0 x i8] zeroinitializer }, section "vt1sec", !type [[T8:![0-9]+]]
 @vt1 = constant [3 x ptr] [
 ptr @vf0i1,
 ptr @vf1i1,
-ptr @vf1i32
+ptr @vf1i16
 ], section "vt1sec", !type !0
 
-; CHECK: [[VT2DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\02\00\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf2i32], [0 x i8] zeroinitializer }, !type [[T8]]
+; CHECK: [[VT2DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\00\04\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf2i16], [0 x i8] zeroinitializer }, !type [[T8]]
 @vt2 = constant [3 x ptr] [
 ptr @vf1i1,
 ptr @vf0i1,
-ptr @vf2i32
+ptr @vf2i16
 ], !type !0
 
-; CHECK: [[VT3DATA:@[^ ]*]] = private constant { [5 x i8], [3 x ptr], [0 x i8] } { [5 x i8] c"\03\00\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf3i32], [0 x i8] zeroinitializer }, align 1, !type [[T5:![0-9]+]]
+; CHECK: [[VT3DATA:@[^ ]*]] = private constant { [4 x i8], [3 x ptr], [0 x i8] } { [4 x i8] c"\05\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf3i16], [0 x i8] zeroinitializer }, align 2, !type [[T5:![0-9]+]]
 @vt3 = constant [3 x ptr] [
 ptr @vf0i1,
 ptr @vf1i1,
-ptr @vf3i32
-], align 1, !type !0
+ptr @vf3i16
+], align 2, !type !0
 
-; CHECK: [[VT4DATA:@[^ ]*]] = private constant { [16 x i8], [3 x ptr], [0 x i8] } { [16 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf4i32], [0 x i8] zeroinitializer },  align 16, !type [[T16:![0-9]+]]
+; CHECK: [[VT4DATA:@[^ ]*]] = private constant { [16 x i8], [3 x ptr], [0 x i8] } { [16 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\00\06\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf4i16], [0 x i8] zeroinitializer },  align 16, !type [[T16:![0-9]+]]
 @vt4 = constant [3 x ptr] [
 ptr @vf1i1,
 ptr @vf0i1,
-ptr @vf4i32
+ptr @vf4i16
 ], align 16, !type !0
 
 ; CHECK: @vt5 = {{.*}}, !type [[T0:![0-9]+]]
@@ -38,10 +39,35 @@ ptr @__cxa_pure_virtual,
 ptr @__cxa_pure_virtual
 ], !type !0
 
+;; Test relative vtables
+; CHECK:      [[VT6RELDATA:@[^ ]*]] = private constant { [4 x i8], [3 x i32], [0 x i8] } { [4 x i8] c"\00\00\03\00", [3 x i32] [
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf0i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i16 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32)
+; CHECK-SAME: ], [0 x i8] zeroinitializer }, !type [[TREL:![0-9]+]]
+@vt6_rel = constant [3 x i32] [
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf0i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i16 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32)
+], !type !2
+
+; CHECK:      [[VT7RELDATA:@[^ ]*]] = private constant { [4 x i8], [3 x i32], [0 x i8] } { [4 x i8] c"\00\00\04\00", [3 x i32] [
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf0i1 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf2i16 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32)
+; CHECK-SAME: ], [0 x i8] zeroinitializer }, !type [[TREL]]
+@vt7_rel = constant [3 x i32] [
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32),
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf0i1 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32),
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf2i16 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32)
+], !type !2
+
 ; CHECK: @vt1 = alias [3 x ptr], getelementptr inbounds ({ [8 x i8], [3 x ptr], [0 x i8] }, ptr [[VT1DATA]], i32 0, i32 1)
 ; CHECK: @vt2 = alias [3 x ptr], getelementptr inbounds ({ [8 x i8], [3 x ptr], [0 x i8] }, ptr [[VT2DATA]], i32 0, i32 1)
-; CHECK: @vt3 = alias [3 x ptr], getelementptr inbounds ({ [5 x i8], [3 x ptr], [0 x i8] }, ptr [[VT3DATA]], i32 0, i32 1)
+; CHECK: @vt3 = alias [3 x ptr], getelementptr inbounds ({ [4 x i8], [3 x ptr], [0 x i8] }, ptr [[VT3DATA]], i32 0, i32 1)
 ; CHECK: @vt4 = alias [3 x ptr], getelementptr inbounds ({ [16 x i8], [3 x ptr], [0 x i8] }, ptr [[VT4DATA]], i32 0, i32 1)
+; CHECK: @vt6_rel = alias [3 x i32], getelementptr inbounds ({ [4 x i8], [3 x i32], [0 x i8] }, ptr [[VT6RELDATA]], i32 0, i32 1)
+; CHECK: @vt7_rel = alias [3 x i32], getelementptr inbounds ({ [4 x i8], [3 x i32], [0 x i8] }, ptr [[VT7RELDATA]], i32 0, i32 1)
 
 define i1 @vf0i1(ptr %this) readnone {
   ret i1 0
@@ -51,20 +77,20 @@ define i1 @vf1i1(ptr %this) readnone {
   ret i1 1
 }
 
-define i32 @vf1i32(ptr %this) readnone {
-  ret i32 1
+define i16 @vf1i16(ptr %this) readnone {
+  ret i16 3
 }
 
-define i32 @vf2i32(ptr %this) readnone {
-  ret i32 2
+define i16 @vf2i16(ptr %this) readnone {
+  ret i16 4
 }
 
-define i32 @vf3i32(ptr %this) readnone {
-  ret i32 3
+define i16 @vf3i16(ptr %this) readnone {
+  ret i16 5
 }
 
-define i32 @vf4i32(ptr %this) readnone {
-  ret i32 4
+define i16 @vf4i16(ptr %this) readnone {
+  ret i16 6
 }
 
 ; CHECK: define i1 @call1(
@@ -87,7 +113,7 @@ define i1 @call2(ptr %obj) {
   %vtable = load ptr, ptr %obj
   %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid")
   call void @llvm.assume(i1 %p)
-  %fptrptr = getelementptr [3 x ptr], ptr %vtable, i32 0, i32 1
+  %fptrptr = getelementptr [3 x ptr], ptr %vtable, i16 0, i16 1
   %fptr = load ptr, ptr %fptrptr
   ; CHECK: [[VTGEP2:%[^ ]*]] = getelementptr i8, ptr %vtable, i32 -1
   ; CHECK: [[VTLOAD2:%[^ ]*]] = load i8, ptr [[VTGEP2]]
@@ -98,27 +124,68 @@ define i1 @call2(ptr %obj) {
   ret i1 %result
 }
 
-; CHECK: define i32 @call3(
-define i32 @call3(ptr %obj) {
+; CHECK: define i16 @call3(
+define i16 @call3(ptr %obj) {
   %vtable = load ptr, ptr %obj
   %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid")
   call void @llvm.assume(i1 %p)
-  %fptrptr = getelementptr [3 x ptr], ptr %vtable, i32 0, i32 2
+  %fptrptr = getelementptr [3 x ptr], ptr %vtable, i16 0, i16 2
   %fptr = load ptr, ptr %fptrptr
-  ; CHECK: [[VTGEP3:%[^ ]*]] = getelementptr i8, ptr %vtable, i32 -5
-  ; CHECK: [[VTLOAD3:%[^ ]*]] = load i32, ptr [[VTGEP3]]
-  %result = call i32 %fptr(ptr %obj)
-  ; CHECK: ret i32 [[VTLOAD3]]
-  ret i32 %result
+  ; CHECK: [[VTGEP3:%[^ ]*]] = getelementptr i8, ptr %vtable, i32 -4
+  ; CHECK: [[VTLOAD3:%[^ ]*]] = load i16, ptr [[VTGEP3]]
+  %result = call i16 %fptr(ptr %obj)
+  ; CHECK: ret i16 [[VTLOAD3]]
+  ret i16 %result
+}
+
+; CHECK: define i1 @call1_rel(
+define i1 @call1_rel(ptr %obj) {
+  %vtable = load ptr, ptr %obj
+  %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid3")
+  call void @llvm.assume(i1 %p)
+  %fptr = call ptr @llvm.load.relative.i32(ptr %vtable, i32 0)
+  %result = call i1 %fptr(ptr %obj)
+  ret i1 %result
+  ; CHECK: [[RES:%[^ ]*]] = icmp eq ptr %vtable, @vt7_rel
+  ; CHECK: ret i1 [[RES]]
+}
+
+; CHECK: define i1 @call2_rel(
+define i1 @call2_rel(ptr %obj) {
+  %vtable = load ptr, ptr %obj
+  %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid3")
+  call void @llvm.assume(i1 %p)
+  %fptr = call ptr @llvm.load.relative.i32(ptr %vtable, i32 4)
+  %result = call i1 %fptr(ptr %obj)
+  ret i1 %result
+  ; CHECK: [[RES:%[^ ]*]] = icmp eq ptr %vtable, @vt6_rel
+  ; CHECK: ret i1 [[RES]]
+}
+
+; CHECK: define i16 @call3_rel(
+define i16 @call3_rel(ptr %obj) {
+  %vtable = load ptr, ptr %obj
+  %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid3")
+  call void @llvm.assume(i1 %p)
+  %fptr = call ptr @llvm.load.relative.i32(ptr %vtable, i32 8)
+  ; CHECK: [[VTGEP3:%[^ ]*]] = getelementptr i8, ptr %vtable, i32 -2
+  ; CHECK: [[VTLOAD3:%[^ ]*]] = load i16, ptr [[VTGEP3]]
+  %result = call i16 %fptr(ptr %obj)
+  ; CHECK: ret i16 [[VTLOAD3]]
+  ret i16 %result
 }
 
 declare i1 @llvm.type.test(ptr, metadata)
 declare void @llvm.assume(i1)
 declare void @__cxa_pure_virtual()
+declare ptr @llvm.load.relative.i32(ptr, i32)
 
 ; CHECK: [[T8]] = !{i32 8, !"typeid"}
-; CHECK: [[T5]] = !{i32 5, !"typeid"}
+; CHECK: [[T5]] = !{i32 4, !"typeid"}
 ; CHECK: [[T16]] = !{i32 16, !"typeid"}
 ; CHECK: [[T0]] = !{i32 0, !"typeid"}
+; CHECK: [[TREL]] = !{i32 4, !"typeid3"}
 
 !0 = !{i32 0, !"typeid"}
+!1 = !{i32 0, !"typeid2"}
+!2 = !{i32 0, !"typeid3"}
diff --git a/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-check.ll b/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-check.ll
index fb8b6de003fdd..d8f5c912e9a50 100644
--- a/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-check.ll
+++ b/llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-check.ll
@@ -7,13 +7,16 @@
 ; RUN: opt -S -passes=wholeprogramdevirt -whole-program-visibility -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-skip=vf0i1 %s 2>&1 | FileCheck %s --check-prefix=SKIP
 ; We have two set of call targets {vf0i1, vf1i1} and {vf1i32, vf2i32, vf3i32, vf4i32}.
 ; The command below prevents both of them from devirtualization.
-; RUN: opt -S -passes=wholeprogramdevirt -whole-program-visibility -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-skip=vf0i1,vf1i32 %s 2>&1 | FileCheck %s --check-prefix=SKIP-ALL
+; RUN: opt -S -passes=wholeprogramdevirt -whole-program-visibility -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-skip=vf0i1,vf1i32,vf3i32 %s 2>&1 | FileCheck %s --check-prefix=SKIP-ALL
 ; Check wildcard
 ; RUN: opt -S -passes=wholeprogramdevirt -whole-program-visibility -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-skip=vf?i1 %s 2>&1 | FileCheck %s --check-prefix=SKIP
 
 target datalayout = "e-p:64:64"
 target triple = "x86_64-unknown-linux-gnu"
 
+; CHECK: remark: <unknown>:0:0: unique-ret-val: devirtualized a call to vf0i1
+; CHECK: remark: <unknown>:0:0: unique-ret-val: devirtualized a call to vf1i1
+; CHECK: remark: <unknown>:0:0: virtual-const-prop: devirtualized a call to vf3i32
 ; CHECK: remark: <unknown>:0:0: virtual-const-prop-1-bit: devirtualized a call to vf0i1
 ; CHECK: remark: <unknown>:0:0: virtual-const-prop-1-bit: devirtualized a call to vf1i1
 ; CHECK: remark: <unknown>:0:0: virtual-const-prop: devirtualized a call to vf1i32
@@ -34,28 +37,28 @@ target triple = "x86_64-unknown-linux-gnu"
 
 ; SKIP-ALL-NOT: devirtualized
 
-; CHECK: [[VT1DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\01\00\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf1i32], [0 x i8] zeroinitializer }, section "vt1sec", !type [[T8:![0-9]+]]
+; CHECK: [[VT1DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [4 x i8] } { [8 x i8] c"\00\00\00\00\00\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf1i32], [4 x i8] c"\01\00\00\00" }, section "vt1sec", !type [[T8:![0-9]+]]
 @vt1 = constant [3 x ptr] [
 ptr @vf0i1,
 ptr @vf1i1,
 ptr @vf1i32
 ], section "vt1sec", !type !0
 
-; CHECK: [[VT2DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\02\00\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf2i32], [0 x i8] zeroinitializer }, !type [[T8]]
+; CHECK: [[VT2DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [4 x i8] } { [8 x i8] c"\00\00\00\00\00\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf2i32], [4 x i8] c"\02\00\00\00" }, !type [[T8]]
 @vt2 = constant [3 x ptr] [
 ptr @vf1i1,
 ptr @vf0i1,
 ptr @vf2i32
 ], !type !0
 
-; CHECK: [[VT3DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\03\00\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf3i32], [0 x i8] zeroinitializer }, !type [[T8]]
+; CHECK: [[VT3DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [4 x i8] } { [8 x i8] c"\00\00\00\00\00\00\00\02", [3 x ptr] [ptr @vf0i1, ptr @vf1i1, ptr @vf3i32], [4 x i8] c"\03\00\00\00" }, !type [[T8]]
 @vt3 = constant [3 x ptr] [
 ptr @vf0i1,
 ptr @vf1i1,
 ptr @vf3i32
 ], !type !0
 
-; CHECK: [[VT4DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [0 x i8] } { [8 x i8] c"\00\00\00\04\00\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf4i32], [0 x i8] zeroinitializer }, !type [[T8]]
+; CHECK: [[VT4DATA:@[^ ]*]] = private constant { [8 x i8], [3 x ptr], [4 x i8] } { [8 x i8] c"\00\00\00\00\00\00\00\01", [3 x ptr] [ptr @vf1i1, ptr @vf0i1, ptr @vf4i32], [4 x i8] c"\04\00\00\00" }, !type [[T8]]
 @vt4 = constant [3 x ptr] [
 ptr @vf1i1,
 ptr @vf0i1,
@@ -69,10 +72,35 @@ ptr @__cxa_pure_virtual,
 ptr @__cxa_pure_virtual
 ], !type !0
 
-; CHECK: @vt1 = alias [3 x ptr], getelementptr inbounds ({ [8 x i8], [3 x ptr], [0 x i8] }, ptr [[VT1DATA]], i32 0, i32 1)
-; CHECK: @vt2 = alias [3 x ptr], getelementptr inbounds ({ [8 x i8], [3 x ptr], [0 x i8] }, ptr [[VT2DATA]], i32 0, i32 1)
-; CHECK: @vt3 = alias [3 x ptr], getelementptr inbounds ({ [8 x i8], [3 x ptr], [0 x i8] }, ptr [[VT3DATA]], i32 0, i32 1)
-; CHECK: @vt4 = alias [3 x ptr], getelementptr inbounds ({ [8 x i8], [3 x ptr], [0 x i8] }, ptr [[VT4DATA]], i32 0, i32 1)
+;; Test relative vtables
+; CHECK:      [[VT6RELDATA:@[^ ]*]] = private constant { [4 x i8], [3 x i32], [0 x i8] } { [4 x i8] c"\03\00\00\00", [3 x i32] [
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf0i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf3i32 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32)
+; CHECK-SAME: ], [0 x i8] zeroinitializer }, !type [[TREL:![0-9]+]]
+@vt6_rel = constant [3 x i32] [
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf0i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32),
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf3i32 to i64), i64 ptrtoint (ptr @vt6_rel to i64)) to i32)
+], !type !1
+
+; CHECK:      [[VT7RELDATA:@[^ ]*]] = private constant { [4 x i8], [3 x i32], [0 x i8] } { [4 x i8] c"\04\00\00\00", [3 x i32] [
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf0i1 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32),
+; CHECK-SAME:     i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf4i32 to i64), i64 ptrtoint (ptr @vt7_rel to i64)) to i32)
+; CHECK-SAME: ], [0 x i8] zeroinitializer }, !type [[TREL]]
+@vt7_rel = constant [3 x i32] [
+i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @vf1i1 to i64), i64 ptrtoint (ptr @vt7_rel to...
[truncated]

@PiJoules
Copy link
Contributor Author

An alternative approach I tried was using llvm.memcpy.* instead of a load and hope that the lowering can "just know" if a load will always be aligned (and produce a normal load) or not (and produce a memcpy). Different experiments I tried just ended up having the intrinsic always lower to a normal load and I was never able to manifest a memcpy in aligned or unaligned cases. I imagine we don't want to unconditionally do a memcpy also.

Note this approach can also increase the size of vtables slightly, but here are some ideas we can try to reduce the size:

  1. Only constant ints are stored before/after the vtable, so it should be possible to find the smallest possible range of values for a constant-propagated method. If we can statically determine the value can fit in some smaller integer type than it would be stored as, we store it as that smaller type, and at each callsite we extend the value to the original type. For example, if we have functions that return i64s but we can assert all the values can fit in an i16, then we instead store an i16 before/after the vtable and at each callsite we zero/sign extend this loaded value to an i64.
  2. If i1s would be stored before/after the vtable, store them at the very end of the rebuilt global. The current implementation may store them right before/after the vtable but doing so forces integers placed before/after them to contain extra padding. These can be reduced if instead we stored all the single-bit constants at the end of the rebuilt global.

llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp Outdated Show resolved Hide resolved
Align TableAlignment = M.getDataLayout().getValueOrABITypeAlignment(
GV->getAlign(), GV->getValueType());
if (TypeAlignment > TableAlignment)
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider increasing the alignments of the vtables for the new member?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not since I was under the assumption we wouldn't want to change the underlying table alignment. I think maybe we won't want to do this so we can keep the 4-byte alignment for relative vtables, but lemme see if others have thoughts on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we want to keep the 4-byte alignment for relative vtables.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a smaller alignment was one of the nice to have features for relative vtables that helped save some space.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine for now then since it's the simplest approach. It may be a good idea to examine the perf/size tradeoff of adding these constants in the future.

llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@ilovepi ilovepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some new tests. Can we get those precommited, so it's easy to understand the full delta of your compiler change?

@PiJoules
Copy link
Contributor Author

I see some new tests. Can we get those precommited, so it's easy to understand the full delta of your compiler change?

You're referring to having a PR with just virtual-const-prop-small-alignment-32/64.ll without the functional changes in this PR?

@ilovepi
Copy link
Contributor

ilovepi commented Apr 23, 2025

I see some new tests. Can we get those precommited, so it's easy to understand the full delta of your compiler change?

You're referring to having a PR with just virtual-const-prop-small-alignment-32/64.ll without the functional changes in this PR?

yes, if possible. That way, when you update the test in this PR, it will be easy to understand what's changing in the new cases.

PiJoules added a commit to PiJoules/llvm-project that referenced this pull request May 7, 2025
…bles

This is a patch with precommitted tests to make
llvm#136630 easier to review. The
`virtual-const-prop-small-alignment-*` tests check the output when the
loaded int alignment is less than the vtable alignment.

This also changes some constants to make it easier to differentiate
between propagated values in vtables.
@PiJoules
Copy link
Contributor Author

PiJoules commented May 7, 2025

yes, if possible. That way, when you update the test in this PR, it will be easy to understand what's changing in the new cases.

Uhh is there a way I can upload only the diff between this PR and #138989 in this PR rather than having 2 commits? Locally what I have is

6f08bc78bce0 (HEAD -> wpd-alignment, committing/wpd-alignment) [llvm] Ensure propagated constants in the vtable are aligned
0a8b2cf472e7 (committing/wpd-alignment-precommit-tests, wpd-alignment-precommit-tests) [NFC][WPD] Add constant propagation tests to account for relative vtables

and I assumed pushing the branch for this PR would only push the that commit rather than both commits.

@ilovepi
Copy link
Contributor

ilovepi commented May 8, 2025

Stacking PRs after the fact is hard(at least for me). Maybe land the pre commit change and then rebase this on main?

Copy link
Contributor

@ilovepi ilovepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this easier to review. I think I'm comfortable with these changes. I'd double check that @pcc doesn't want any additional changes before landing.

Align TableAlignment = M.getDataLayout().getValueOrABITypeAlignment(
GV->getAlign(), GV->getValueType());
if (TypeAlignment > TableAlignment)
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine for now then since it's the simplest approach. It may be a good idea to examine the perf/size tradeoff of adding these constants in the future.

PiJoules added a commit to PiJoules/llvm-project that referenced this pull request May 8, 2025
…bles

This is a patch with precommitted tests to make
llvm#136630 easier to review. The
`virtual-const-prop-small-alignment-*` tests check the output when the
loaded int alignment is less than the vtable alignment.

This also changes some constants to make it easier to differentiate
between propagated values in vtables.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request May 8, 2025
…bles

This is a patch with precommitted tests to make
llvm#136630 easier to review. The
`virtual-const-prop-small-alignment-*` tests check the output when the
loaded int alignment is less than the vtable alignment.

This also changes some constants to make it easier to differentiate
between propagated values in vtables.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request May 9, 2025
…bles

This is a patch with precommitted tests to make
llvm#136630 easier to review. The
`virtual-const-prop-small-alignment-*` tests check the output when the
loaded int alignment is less than the vtable alignment.

This also changes some constants to make it easier to differentiate
between propagated values in vtables.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request May 9, 2025
…bles

This is a patch with precommitted tests to make
llvm#136630 easier to review. The
`virtual-const-prop-small-alignment-*` tests check the output when the
loaded int alignment is less than the vtable alignment.

This also changes some constants to make it easier to differentiate
between propagated values in vtables.
PiJoules added a commit that referenced this pull request May 13, 2025
…138989)

This is a patch with precommitted tests to make
#136630 easier to review. The
`virtual-const-prop-small-alignment-*` tests check the output when the
loaded int alignment is less than the vtable alignment.

This also changes some constants to make it easier to differentiate
between propagated values in vtables.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request May 13, 2025
…e vtables (#138989)

This is a patch with precommitted tests to make
llvm/llvm-project#136630 easier to review. The
`virtual-const-prop-small-alignment-*` tests check the output when the
loaded int alignment is less than the vtable alignment.

This also changes some constants to make it easier to differentiate
between propagated values in vtables.
@PiJoules PiJoules merged commit 2661e99 into llvm:main May 15, 2025
6 of 9 checks passed
@PiJoules PiJoules deleted the wpd-alignment branch May 15, 2025 18:52
@ZequanWu
Copy link
Contributor

ZequanWu commented Jun 2, 2025

This causes lld to crash:

ld.lld: /usr/local/google/home/zequanwu/work/chromium/src/third_party/llvm/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1947: bool (anonymous namespace)::DevirtModule::tryVirtualConstProp(MutableArrayRef<VirtualCallTarget>, VTableSlotInfo &, WholeProgramDevirtResolution *, VTableSlot): Assertion `OffsetByte % TypeAlignment.value() == 0' failed.
PLEASE submit a bug report to https://crbug.com in the Tools>LLVM component, run tools/clang/scripts/process_crashreports.py (only if inside Google) to upload crash related files, and include the crash backtrace.
Stack dump:
0.      Program arguments: ../../third_party/llvm-build/Release+Asserts/bin/ld.lld --sysroot=../../third_party/android_toolchain/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -EL --fix-cortex-a53-843419 -z now -z relro -z max-page-size=16384 --no-rosegment --hash-style=gnu --eh-frame-hdr -m aarch64linux -pie -dynamic-linker /system/bin/linker64 -o ./exe.unstripped/trace_processor_minimal_shell ../../third_party/android_toolchain/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/26/crtbegin_dynamic.o -L../../third_party/android_toolchain/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/26 -L../../third_party/android_toolchain/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android -L../../third_party/android_toolchain/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib -plugin-opt=mcpu=generic -plugin-opt=thinlto -plugin-opt=-emulated-tls -plugin-opt=-enable-tlsdesc --fatal-warnings --build-id=sha1 -z noexecstack -z relro -z now --icf=all --color-diagnostics -mllvm -instcombine-lower-dbg-declare=0 -mllvm -split-threshold-for-reg-with-hint=0 --thinlto-cache-dir=thinlto-cache --thinlto-cache-policy=cache_size=10%:cache_size_bytes=40g:cache_size_files=100000 --thinlto-jobs=all -mllvm -import-instr-limit=30 -mllvm -disable-auto-upgrade-debug-info -mllvm -inlinehint-threshold=360 --no-rosegment --undefined-version -mllvm -enable-ml-inliner=release -mllvm -ml-inliner-model-selector=arm64-mixed -mllvm -ml-inliner-skip-policy=if-caller-not-cold --exclude-libs=libvpx_assembly_arm.a -z max-page-size=16384 -mllvm -enable-machine-outliner=never --warn-shared-textrel -O2 --gc-sections -z defs --as-needed --lto-O0 -mllvm -enable-ext-tsp-block-placement=1 -z nocopyreloc -z force-bti --start-group obj/third_party/perfetto/src/trace_processor/trace_processor_minimal_shell/minimal_shell.o obj/third_party/perfetto/src/trace_processor/lib/iterator_impl.o obj/third_party/perfetto/src/trace_processor/lib/read_trace.o obj/third_party/perfetto/src/trace_processor/lib/read_trace_internal.o obj/third_party/perfetto/src/trace_processor/lib/trace_processor.o obj/third_party/perfetto/src/trace_processor/lib/trace_processor_impl.o obj/third_party/sqlite/dev_sqlite3/sqlite3_shim.o obj/third_party/perfetto/src/trace_processor/metatrace/tp_metatrace.o obj/third_party/perfetto/src/protozero/protozero/field.o obj/third_party/perfetto/src/protozero/protozero/gen_field_helpers.o obj/third_party/perfetto/src/protozero/protozero/message.o obj/third_party/perfetto/src/protozero/protozero/message_arena.o obj/third_party/perfetto/src/protozero/protozero/packed_repeated_fields.o obj/third_party/perfetto/src/protozero/protozero/proto_decoder.o obj/third_party/perfetto/src/protozero/protozero/scattered_heap_buffer.o obj/third_party/perfetto/src/protozero/protozero/scattered_stream_null_delegate.o obj/third_party/perfetto/src/protozero/protozero/scattered_stream_writer.o obj/third_party/perfetto/src/protozero/protozero/static_buffer.o obj/third_party/perfetto/src/protozero/protozero/virtual_destructors.o obj/third_party/perfetto/src/base/base/android_utils.o obj/third_party/perfetto/src/base/base/base64.o obj/third_party/perfetto/src/base/base/crash_keys.o obj/third_party/perfetto/src/base/base/ctrl_c_handler.o obj/third_party/perfetto/src/base/base/event_fd.o obj/third_party/perfetto/src/base/base/file_utils.o obj/third_party/perfetto/src/base/base/getopt_compat.o obj/third_party/perfetto/src/base/base/intrusive_list.o obj/third_party/perfetto/src/base/base/intrusive_tree.o obj/third_party/perfetto/src/base/base/logging.o obj/third_party/perfetto/src/base/base/metatrace.o obj/third_party/perfetto/src/base/base/paged_memory.o obj/third_party/perfetto/src/base/base/periodic_task.o obj/third_party/perfetto/src/base/base/pipe.o obj/third_party/perfetto/src/base/base/scoped_mmap.o obj/third_party/perfetto/src/base/base/status.o obj/third_party/perfetto/src/base/base/string_splitter.o obj/third_party/perfetto/src/base/base/string_utils.o obj/third_party/perfetto/src/base/base/string_view.o obj/third_party/perfetto/src/base/base/string_view_splitter.o obj/third_party/perfetto/src/base/base/temp_file.o obj/third_party/perfetto/src/base/base/thread_checker.o obj/third_party/perfetto/src/base/base/thread_utils.o obj/third_party/perfetto/src/base/base/time.o obj/third_party/perfetto/src/base/base/utils.o obj/third_party/perfetto/src/base/base/uuid.o obj/third_party/perfetto/src/base/base/virtual_destructors.o obj/third_party/perfetto/src/base/base/waitable_event.o obj/third_party/perfetto/src/base/base/watchdog_posix.o obj/third_party/perfetto/src/base/base/weak_runner.o obj/third_party/perfetto/src/base/base/thread_task_runner.o obj/third_party/perfetto/src/base/base/unix_task_runner.o obj/third_party/perfetto/src/base/base/subprocess.o obj/third_party/perfetto/src/base/base/subprocess_posix.o obj/third_party/perfetto/src/base/base/subprocess_windows.o obj/third_party/perfetto/src/base/perfetto_base_default_platform/default_platform.o obj/third_party/perfetto/src/trace_processor/storage_minimal/forwarding_trace_parser.o obj/third_party/perfetto/src/trace_processor/storage_minimal/trace_blob.o obj/third_party/perfetto/src/trace_processor/storage_minimal/trace_processor_context.o obj/third_party/perfetto/src/trace_processor/storage_minimal/trace_processor_storage.o obj/third_party/perfetto/src/trace_processor/storage_minimal/trace_processor_storage_impl.o obj/third_party/perfetto/src/trace_processor/storage_minimal/trace_reader_registry.o obj/third_party/perfetto/src/trace_processor/storage_minimal/virtual_destructors.o obj/third_party/perfetto/src/trace_processor/containers/containers/bit_vector.o obj/third_party/perfetto/src/trace_processor/containers/containers/row_map.o obj/third_party/perfetto/src/trace_processor/containers/containers/string_pool.o obj/third_party/perfetto/src/trace_processor/importers/common/common/args_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/args_translation_table.o obj/third_party/perfetto/src/trace_processor/importers/common/common/clock_converter.o obj/third_party/perfetto/src/trace_processor/importers/common/common/clock_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/cpu_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/deobfuscation_mapping_table.o obj/third_party/perfetto/src/trace_processor/importers/common/common/event_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/flow_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/global_args_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/jit_cache.o obj/third_party/perfetto/src/trace_processor/importers/common/common/legacy_v8_cpu_profile_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/machine_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/mapping_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/metadata_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/process_track_translation_table.o obj/third_party/perfetto/src/trace_processor/importers/common/common/process_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/sched_event_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/slice_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/slice_translation_table.o obj/third_party/perfetto/src/trace_processor/importers/common/common/stack_profile_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/system_info_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/thread_state_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/trace_file_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/trace_parser.o obj/third_party/perfetto/src/trace_processor/importers/common/common/track_compressor.o obj/third_party/perfetto/src/trace_processor/importers/common/common/track_tracker.o obj/third_party/perfetto/src/trace_processor/importers/common/common/virtual_memory_mapping.o obj/third_party/perfetto/src/trace_processor/util/proto_to_args_parser/debug_annotation_parser.o obj/third_party/perfetto/src/trace_processor/util/proto_to_args_parser/proto_to_args_parser.o obj/third_party/perfetto/src/trace_processor/util/descriptors/descriptors.o obj/third_party/perfetto/src/trace_processor/util/protozero_to_text/protozero_to_text.o obj/third_party/perfetto/src/trace_processor/types/types/destructible.o obj/third_party/perfetto/src/trace_processor/types/types/gfp_flags.o obj/third_party/perfetto/src/trace_processor/types/types/task_state.o obj/third_party/perfetto/src/trace_processor/util/trace_type/trace_type.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_log_event/android_log_event.o obj/third_party/perfetto/src/trace_processor/importers/perf_text/perf_text_sample_line_parser/perf_text_sample_line_parser.o obj/third_party/perfetto/src/trace_processor/db/minimal/column.o obj/third_party/perfetto/src/trace_processor/db/minimal/column_storage.o obj/third_party/perfetto/src/trace_processor/db/minimal/query_executor.o obj/third_party/perfetto/src/trace_processor/db/minimal/table.o obj/third_party/perfetto/src/trace_processor/util/glob/glob.o obj/third_party/perfetto/src/trace_processor/db/column/column/arrangement_overlay.o obj/third_party/perfetto/src/trace_processor/db/column/column/data_layer.o obj/third_party/perfetto/src/trace_processor/db/column/column/dense_null_overlay.o obj/third_party/perfetto/src/trace_processor/db/column/column/dummy_storage.o obj/third_party/perfetto/src/trace_processor/db/column/column/id_storage.o obj/third_party/perfetto/src/trace_processor/db/column/column/null_overlay.o obj/third_party/perfetto/src/trace_processor/db/column/column/numeric_storage.o obj/third_party/perfetto/src/trace_processor/db/column/column/overlay_layer.o obj/third_party/perfetto/src/trace_processor/db/column/column/range_overlay.o obj/third_party/perfetto/src/trace_processor/db/column/column/selector_overlay.o obj/third_party/perfetto/src/trace_processor/db/column/column/set_id_storage.o obj/third_party/perfetto/src/trace_processor/db/column/column/storage_layer.o obj/third_party/perfetto/src/trace_processor/db/column/column/string_storage.o obj/third_party/perfetto/src/trace_processor/db/column/column/utils.o obj/third_party/perfetto/src/trace_processor/storage/storage/trace_storage.o obj/third_party/perfetto/src/trace_processor/tables/tables/table_destructors.o obj/third_party/perfetto/src/trace_processor/tables/macros_internal/macros_internal.o obj/third_party/perfetto/src/trace_processor/util/build_id/build_id.o obj/third_party/perfetto/src/trace_processor/util/profiler_util/profiler_util.o obj/third_party/perfetto/src/trace_processor/importers/fuchsia/fuchsia_record/fuchsia_record.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/minimal/ftrace_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module/proto_importer_module.o obj/third_party/perfetto/src/trace_processor/importers/memory_tracker/graph_processor/graph.o obj/third_party/perfetto/src/trace_processor/importers/memory_tracker/graph_processor/graph_processor.o obj/third_party/perfetto/src/trace_processor/importers/memory_tracker/graph_processor/memory_allocator_node_id.o obj/third_party/perfetto/src/trace_processor/importers/memory_tracker/graph_processor/raw_memory_graph_node.o obj/third_party/perfetto/src/trace_processor/importers/memory_tracker/graph_processor/raw_process_memory_node.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/active_chrome_processes_tracker.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/app_wakelock_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/args_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/chrome_string_lookup.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/chrome_system_probes_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/chrome_system_probes_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/default_modules.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/memory_tracker_snapshot_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/memory_tracker_snapshot_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/metadata_minimal_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/multi_machine_trace_manager.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/network_trace_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/packet_analyzer.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/packet_sequence_state_generation.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/perf_sample_tracker.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/profile_packet_sequence_state.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/profile_packet_utils.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/proto_trace_parser_impl.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/proto_trace_reader.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/proto_trace_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/stack_profile_sequence_state.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/track_event_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/track_event_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/track_event_sequence_state.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/track_event_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/track_event_tracker.o obj/third_party/perfetto/src/trace_processor/sorter/sorter/trace_sorter.o obj/third_party/perfetto/src/trace_processor/sorter/sorter/trace_token_buffer.o obj/third_party/perfetto/src/trace_processor/importers/perf/record/perf_counter.o obj/third_party/perfetto/src/trace_processor/importers/perf/record/perf_event_attr.o obj/third_party/perfetto/src/trace_processor/importers/perf/record/perf_session.o obj/third_party/perfetto/src/trace_processor/util/bump_allocator/bump_allocator.o obj/third_party/perfetto/src/trace_processor/util/gzip/gzip_utils.o obj/third_party/zlib/zlib_adler32_simd/adler32_simd.o obj/third_party/zlib/zlib_inflate_chunk_simd/inffast_chunk.o obj/third_party/zlib/zlib_inflate_chunk_simd/inflate.o obj/third_party/zlib/zlib_arm_crc32/crc32_simd.o obj/third_party/cpu_features/ndk_compat/cpu-features.o obj/third_party/cpu_features/cpuinfo/filesystem.o obj/third_party/cpu_features/cpuinfo/hwcaps.o obj/third_party/cpu_features/cpuinfo/stack_line_reader.o obj/third_party/cpu_features/cpuinfo/string_view.o obj/third_party/cpu_features/cpuinfo/impl_aarch64_linux_or_android.o obj/third_party/perfetto/src/trace_processor/util/trace_blob_view_reader/trace_blob_view_reader.o obj/third_party/perfetto/src/trace_processor/importers/etw/minimal/etw_module.o obj/third_party/perfetto/src/trace_processor/importers/json/minimal/json_utils.o obj/third_party/jsoncpp/jsoncpp/json_reader.o obj/third_party/jsoncpp/jsoncpp/json_value.o obj/third_party/jsoncpp/jsoncpp/json_writer.o obj/third_party/perfetto/src/base/clock_snapshots/clock_snapshots.o obj/third_party/perfetto/src/trace_processor/dataframe/dataframe/dataframe.o obj/third_party/perfetto/src/trace_processor/dataframe/impl/impl/query_plan.o obj/third_party/perfetto/src/trace_processor/db/db/runtime_table.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/android_battery_stats_history_string_tracker.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/android_battery_stats_reader.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/android_bugreport_reader.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/android_dumpstate_event_parser_impl.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/android_dumpstate_reader.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/android_log_event_parser_impl.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/android_log_reader.o obj/third_party/perfetto/src/trace_processor/importers/android_bugreport/android_bugreport/chunked_line_reader.o obj/third_party/perfetto/src/trace_processor/util/zip_reader/streaming_line_reader.o obj/third_party/perfetto/src/trace_processor/util/zip_reader/zip_reader.o obj/third_party/perfetto/src/trace_processor/importers/archive/archive/archive_entry.o obj/third_party/perfetto/src/trace_processor/importers/archive/archive/gzip_trace_parser.o obj/third_party/perfetto/src/trace_processor/importers/archive/archive/tar_trace_reader.o obj/third_party/perfetto/src/trace_processor/importers/archive/archive/zip_trace_reader.o obj/third_party/perfetto/src/trace_processor/importers/art_method/art_method/art_method_parser_impl.o obj/third_party/perfetto/src/trace_processor/importers/art_method/art_method/art_method_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/etw/full/etw_module_impl.o obj/third_party/perfetto/src/trace_processor/importers/etw/full/etw_parser.o obj/third_party/perfetto/src/trace_processor/importers/etw/full/etw_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/i2c/full/i2c_tracker.o obj/third_party/perfetto/src/trace_processor/importers/syscalls/full/syscall_tracker.o obj/third_party/perfetto/src/kernel_utils/syscall_table/syscall_table.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/binder_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/drm_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/ftrace_module_impl.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/ftrace_parser.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/ftrace_sched_event_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/ftrace_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/gpu_work_period_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/iostat_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/mali_gpu_event_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/pixel_mm_kswapd_event_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/pkvm_hyp_cpu_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/rss_stat_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/thermal_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/v4l2_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/virtio_gpu_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/full/virtio_video_tracker.o obj/third_party/perfetto/src/trace_processor/importers/ftrace/ftrace_descriptors/ftrace_descriptors.o obj/third_party/perfetto/src/trace_processor/importers/systrace/systrace_parser/systrace_parser.o obj/third_party/perfetto/src/trace_processor/importers/fuchsia/full/fuchsia_trace_parser.o obj/third_party/perfetto/src/trace_processor/importers/fuchsia/full/fuchsia_trace_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/fuchsia/full/fuchsia_trace_utils.o obj/third_party/perfetto/src/trace_processor/importers/ninja/ninja/ninja_log_parser.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/attrs_section_reader.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/aux_data_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/aux_record.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/aux_stream_manager.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/auxtrace_info_record.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/auxtrace_record.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/features.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/itrace_start_record.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/mmap_record.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/perf_data_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/perf_tracker.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/record_parser.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/sample.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/sample_id.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/spe_record_parser.o obj/third_party/perfetto/src/trace_processor/importers/perf/perf/spe_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/perf_text/perf_text/perf_text_trace_parser_impl.o obj/third_party/perfetto/src/trace_processor/importers/perf_text/perf_text/perf_text_trace_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/additional_modules.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/android_camera_event_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/android_kernel_wakelocks_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/android_kernel_wakelocks_state.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/android_probes_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/android_probes_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/android_probes_tracker.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/content_analyzer.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/frame_timeline_event_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/gpu_event_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/graphics_event_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/graphics_frame_event_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/heap_graph_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/heap_graph_tracker.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/jit_tracker.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/metadata_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/pigweed_detokenizer.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/pixel_modem_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/pixel_modem_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/profile_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/statsd_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/string_encoding_utils.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/system_probes_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/system_probes_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/translation_table_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/v8_module.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/v8_sequence_state.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/v8_tracker.o obj/third_party/perfetto/src/trace_processor/importers/proto/full/vulkan_memory_tracker.o obj/third_party/perfetto/src/trace_processor/util/proto_profiler/proto_profiler.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/android_input_event_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/protolog_message_decoder.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/protolog_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/shell_transitions_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/shell_transitions_tracker.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/surfaceflinger_layers_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/surfaceflinger_transactions_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/viewcapture_args_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/viewcapture_parser.o obj/third_party/perfetto/src/trace_processor/importers/proto/winscope/full/winscope_module.o obj/third_party/perfetto/src/trace_processor/importers/systrace/full/systrace_line_parser.o obj/third_party/perfetto/src/trace_processor/importers/systrace/full/systrace_line_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/systrace/full/systrace_trace_parser.o obj/third_party/perfetto/src/trace_processor/metrics/metrics/metrics.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/engine/engine/created_function.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/engine/engine/dataframe_module.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/engine/engine/perfetto_sql_engine.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/engine/engine/runtime_table_function.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/engine/engine/table_pointer_module.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/interface/sql_function.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/interface/static_table_function.o obj/third_party/perfetto/src/trace_processor/sqlite/sqlite/db_sqlite_table.o obj/third_party/perfetto/src/trace_processor/sqlite/sqlite/module_state_manager.o obj/third_party/perfetto/src/trace_processor/sqlite/sqlite/sql_source.o obj/third_party/perfetto/src/trace_processor/sqlite/sqlite/sql_stats_table.o obj/third_party/perfetto/src/trace_processor/sqlite/sqlite/sqlite_engine.o obj/third_party/perfetto/src/trace_processor/sqlite/sqlite/sqlite_utils.o obj/third_party/perfetto/src/trace_processor/sqlite/sqlite/stats_table.o obj/third_party/perfetto/src/trace_processor/util/profile_builder/annotated_callsites.o obj/third_party/perfetto/src/trace_processor/util/profile_builder/profile_builder.o obj/third_party/perfetto/src/trace_processor/util/sql_argument/sql_argument.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/parser/parser/function_util.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/parser/parser/perfetto_sql_parser.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/grammar/grammar/perfettosql_grammar.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/preprocessor/preprocessor/perfetto_sql_preprocessor.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/preprocessor/grammar/preprocessor_grammar.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/tokenizer/tokenizer/sqlite_tokenizer.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/tokenizer/tokenize_internal/tokenize_internal.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/base64.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/counter_intervals.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/create_function.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/create_view_function.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/dominator_tree.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/graph_scan.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/graph_traversal.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/import.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/interval_intersect.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/layout_functions.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/math.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/pprof_functions.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/replace_numbers_function.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/sqlite3_str_split.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/stack_functions.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/structural_tree_partition.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/to_ftrace.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/functions/functions/type_builders.o obj/third_party/perfetto/src/trace_processor/demangle/demangle.o obj/third_party/perfetto/src/trace_processor/export_json/export_json.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/ancestor.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/connected_flow.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/descendant.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/dfs_weight_bounded.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/experimental_annotated_stack.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/experimental_flamegraph.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/experimental_flat_slice.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/experimental_slice_layout.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/flamegraph_construction_algorithms.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/table_info.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/table_functions/table_functions/winscope_proto_to_args_with_defaults.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/generator/generator/structured_query_generator.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/operators/operators/counter_mipmap_operator.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/operators/operators/slice_mipmap_operator.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/operators/operators/span_join_operator.o obj/third_party/perfetto/src/trace_processor/perfetto_sql/intrinsics/operators/operators/window_operator.o obj/third_party/perfetto/src/trace_processor/trace_summary/trace_summary/summary.o obj/third_party/perfetto/src/protozero/text_to_proto/text_to_proto/text_to_proto.o obj/third_party/perfetto/src/trace_processor/util/protozero_to_json/protozero_to_json.o obj/third_party/perfetto/src/trace_processor/importers/gecko/gecko/gecko_trace_parser_impl.o obj/third_party/perfetto/src/trace_processor/importers/gecko/gecko/gecko_trace_tokenizer.o obj/third_party/perfetto/src/trace_processor/importers/json/json/json_trace_parser_impl.o obj/third_party/perfetto/src/trace_processor/importers/json/json/json_trace_tokenizer.o obj/buildtools/third_party/libunwind/libunwind/Unwind-EHABI.o obj/buildtools/third_party/libunwind/libunwind/libunwind.o obj/buildtools/third_party/libunwind/libunwind/Unwind-sjlj.o obj/buildtools/third_party/libunwind/libunwind/UnwindLevel1-gcc-ext.o obj/buildtools/third_party/libunwind/libunwind/UnwindLevel1.o obj/buildtools/third_party/libunwind/libunwind/UnwindRegistersRestore.o obj/buildtools/third_party/libunwind/libunwind/UnwindRegistersSave.o obj/third_party/compiler-rt/atomic/atomic.o obj/third_party/icu/libicui18n.a obj/third_party/icu/libicuuc.a obj/third_party/perfetto/protos/perfetto/trace_processor/libzero.a obj/third_party/perfetto/protos/perfetto/common/libzero.a obj/third_party/perfetto/protos/perfetto/perfetto_sql/libzero.a obj/third_party/perfetto/protos/perfetto/trace/interned_data/libzero.a obj/third_party/perfetto/protos/perfetto/trace/android/libzero.a obj/third_party/perfetto/protos/perfetto/trace/android/libwinscope_regular_zero.a obj/third_party/perfetto/protos/perfetto/trace/android/libwinscope_common_zero.a obj/third_party/perfetto/protos/perfetto/trace/chrome/libzero.a obj/third_party/perfetto/protos/perfetto/trace/gpu/libzero.a obj/third_party/perfetto/protos/perfetto/trace/profiling/libzero.a obj/third_party/perfetto/protos/perfetto/trace/track_event/libzero.a obj/third_party/perfetto/protos/perfetto/trace/libnon_minimal_zero.a obj/third_party/perfetto/protos/perfetto/trace/libminimal_zero.a obj/third_party/perfetto/protos/perfetto/config/libzero.a obj/third_party/perfetto/protos/perfetto/config/android/libzero.a obj/third_party/perfetto/protos/perfetto/config/ftrace/libzero.a obj/third_party/perfetto/protos/perfetto/config/gpu/libzero.a obj/third_party/perfetto/protos/perfetto/config/inode_file/libzero.a obj/third_party/perfetto/protos/perfetto/config/interceptors/libzero.a obj/third_party/perfetto/protos/perfetto/config/power/libzero.a obj/third_party/perfetto/protos/perfetto/config/process_stats/libzero.a obj/third_party/perfetto/protos/perfetto/config/profiling/libzero.a obj/third_party/perfetto/protos/perfetto/config/statsd/libzero.a obj/third_party/perfetto/protos/perfetto/config/sys_stats/libzero.a obj/third_party/perfetto/protos/perfetto/config/system_info/libzero.a obj/third_party/perfetto/protos/perfetto/config/track_event/libzero.a obj/third_party/perfetto/protos/perfetto/trace/etw/libzero.a obj/third_party/perfetto/protos/perfetto/trace/filesystem/libzero.a obj/third_party/perfetto/protos/perfetto/trace/ftrace/libzero.a obj/third_party/perfetto/protos/perfetto/trace/perfetto/libzero.a obj/third_party/perfetto/protos/perfetto/trace/power/libzero.a obj/third_party/perfetto/protos/perfetto/trace/ps/libzero.a obj/third_party/perfetto/protos/perfetto/trace/statsd/libzero.a obj/third_party/perfetto/protos/perfetto/trace/sys_stats/libzero.a obj/third_party/perfetto/protos/perfetto/trace/system_info/libzero.a obj/third_party/perfetto/protos/perfetto/trace/translation/libzero.a obj/third_party/zlib/libchrome_zlib.a obj/third_party/perfetto/protos/perfetto/trace_summary/libzero.a obj/third_party/perfetto/protos/third_party/simpleperf/libzero.a obj/third_party/perfetto/protos/third_party/pprof/libzero.a obj/third_party/perfetto/protos/perfetto/trace/android/libwinscope_extensions_zero.a obj/third_party/perfetto/protos/perfetto/trace_processor/libmetrics_impl_zero.a obj/third_party/perfetto/protos/perfetto/common/libcpp.a obj/buildtools/third_party/libc++/libc++.a obj/buildtools/third_party/libc++abi/libc++abi.a --end-group ../../third_party/llvm-build/Release+Asserts/lib/clang/21/lib/linux/libclang_rt.builtins-aarch64-android.a -ldl -lm -llog --start-group --end-group -Map ./exe.unstripped/trace_processor_minimal_shell.map.gz.tmp -lm ../../third_party/llvm-build/Release+Asserts/lib/clang/21/lib/linux/libclang_rt.builtins-aarch64-android.a -ldl -lc ../../third_party/llvm-build/Release+Asserts/lib/clang/21/lib/linux/libclang_rt.builtins-aarch64-android.a -ldl ../../third_party/android_toolchain/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/26/crtend_android.o
1.      Running pass "wholeprogramdevirt" on module "ld-temp.o"
#0 0x0000558bda151068 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (../../third_party/llvm-build/Release+Asserts/bin/ld.lld+0x2883068)
clang++: error: unable to execute command: Aborted (core dumped)
clang++: error: linker command failed due to signal (use -v to see invocation)

Repro attached in https://crbug.com/421938962#comment2.

@PiJoules
Copy link
Contributor Author

PiJoules commented Jun 2, 2025

Looking into this

@PiJoules
Copy link
Contributor Author

PiJoules commented Jun 2, 2025

Forward fix at #142500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.