diff options
author | Amir Ayupov <aaupov@fb.com> | 2024-07-18 20:58:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-18 20:58:16 -0700 |
commit | 9b007a199d650f47072fe112b8315f3b3bebb27d (patch) | |
tree | 0469bddd47d51778d77629c5f16f24ab74f38a4d /bolt/test | |
parent | 3023b15fb1ec00dbe6a1cb630236125f500978ef (diff) | |
download | llvm-9b007a199d650f47072fe112b8315f3b3bebb27d.zip llvm-9b007a199d650f47072fe112b8315f3b3bebb27d.tar.gz llvm-9b007a199d650f47072fe112b8315f3b3bebb27d.tar.bz2 |
[BOLT] Expose pseudo probe function checksum and GUID (#99389)
Add a BinaryFunction field for pseudo probe function GUID.
Populate it during pseudo probe section parsing, and emit it in YAML
profile (both regular and BAT), along with function checksum.
To be used for stale function matching.
Test Plan: update pseudoprobe-decoding-inline.test
Diffstat (limited to 'bolt/test')
-rw-r--r-- | bolt/test/X86/pseudoprobe-decoding-inline.test | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/bolt/test/X86/pseudoprobe-decoding-inline.test b/bolt/test/X86/pseudoprobe-decoding-inline.test index 15e93b1..c32660c 100644 --- a/bolt/test/X86/pseudoprobe-decoding-inline.test +++ b/bolt/test/X86/pseudoprobe-decoding-inline.test @@ -1,5 +1,26 @@ # REQUIRES: system-linux -# RUN: llvm-bolt %S/../../../llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin --print-pseudo-probes=all -o %t.bolt 2>&1 | FileCheck %s +# RUN: llvm-bolt %S/../../../llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin --print-pseudo-probes=all -o %t.bolt --lite=0 --enable-bat 2>&1 | FileCheck %s + +# PREAGG: B X:0 #foo# 1 0 +# PREAGG: B X:0 #bar# 1 0 +# PREAGG: B X:0 #main# 1 0 +## Check pseudo-probes in regular YAML profile (non-BOLTed binary) +# RUN: link_fdata %s %S/../../../llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin %t.preagg PREAGG +# RUN: perf2bolt %S/../../../llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin -p %t.preagg --pa -w %t.yaml -o %t.fdata +# RUN: FileCheck --input-file %t.yaml %s --check-prefix CHECK-YAML +## Check pseudo-probes in BAT YAML profile (BOLTed binary) +# RUN: link_fdata %s %t.bolt %t.preagg2 PREAGG +# RUN: perf2bolt %t.bolt -p %t.preagg2 --pa -w %t.yaml2 -o %t.fdata2 +# RUN: FileCheck --input-file %t.yaml2 %s --check-prefix CHECK-YAML +# CHECK-YAML: name: bar +# CHECK-YAML: guid: 0xE413754A191DB537 +# CHECK-YAML: pseudo_probe_desc_hash: 0x10E852DA94 +# CHECK-YAML: name: foo +# CHECK-YAML: guid: 0x5CF8C24CDB18BDAC +# CHECK-YAML: pseudo_probe_desc_hash: 0x200205A19C5B4 +# CHECK-YAML: name: main +# CHECK-YAML: guid: 0xDB956436E78DD5FA +# CHECK-YAML: pseudo_probe_desc_hash: 0x10000FFFFFFFF CHECK: Report of decoding input pseudo probe binaries |