mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
e56a524153
llvm-profdata `show` and `overlap` will crash in `getFuncName` on compact binary profile. This change fixed this by switching to use `getName`. `getFuncName` is misused in llvm-profdata. As showed below, `GUIDToFuncNameMap` is only supported in compilation mode, there is no initialization in llvm-profdata. Compact profile whose MD5 is true would try to query `GUIDToFuncNameMap` then caused the crash. So fix this by switching to `getName` Reviewed By: MaskRay, wmi, wenlei, weihe, hoy Differential Revision: https://reviews.llvm.org/D87740
21 lines
1.1 KiB
Plaintext
21 lines
1.1 KiB
Plaintext
# Make sure "llvm-profdata show" works for sample profile in binary compact format
|
|
|
|
# RUN: llvm-profdata show -sample %S/Inputs/compat-sample.profdata | FileCheck %s
|
|
|
|
# CHECK: Function: 15822663052811949562: 17, 0, 6 sampled lines
|
|
# CHECK-NEXT: Samples collected in the function's body {
|
|
# CHECK: Samples collected in inlined callsites {
|
|
# CHECK-NEXT: 1: inlined callee: 6309742469962978389: 17, 0, 1
|
|
|
|
# RUN: llvm-profdata show -hot-func-list -sample %S/Inputs/compat-sample.profdata | FileCheck %s --check-prefix=HOTFUNC
|
|
# HOTFUNC: 24753993 out of 24754010 profile counts (100.00%) are from hot functions.
|
|
# HOTFUNC: Total sample (%) Max sample Entry sample Function name
|
|
# HOTFUNC-NEXT: 24753993 (100.00%) 1284671 1284671 16429767378996342100
|
|
|
|
# Make sure "llvm-profdata overlap" works for sample profile in binary compact format
|
|
# RUN: llvm-profdata overlap -sample %S/Inputs/compat-sample.profdata %S/Inputs/compat-sample.profdata | FileCheck %s --check-prefix=OVERLAP
|
|
|
|
# OVERLAP: Program level:
|
|
# OVERLAP-NEXT: Whole program profile similarity: 100.000%
|
|
# OVERLAP-NEXT: Whole program sample overlap: 100.000%
|