[PATCH] D156460: [MemProf] Convert PGO raw profile to text format
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 10:30:22 PDT 2023
tejohnson created this revision.
tejohnson added a reviewer: snehasish.
Herald added subscribers: wlei, wenlei.
Herald added a project: All.
tejohnson requested review of this revision.
Herald added a project: LLVM.
This avoids the need to regenerate the PGO raw profile on version
changes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156460
Files:
llvm/test/Transforms/PGOProfile/Inputs/memprof_pgo.profraw
llvm/test/Transforms/PGOProfile/Inputs/memprof_pgo.proftext
llvm/test/Transforms/PGOProfile/memprof.ll
Index: llvm/test/Transforms/PGOProfile/memprof.ll
===================================================================
--- llvm/test/Transforms/PGOProfile/memprof.ll
+++ llvm/test/Transforms/PGOProfile/memprof.ll
@@ -14,8 +14,8 @@
;; Generate indexed profiles of all combinations:
; RUN: llvm-profdata merge %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.memprofdata
-; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.profraw %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.pgomemprofdata
-; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.profraw -o %t.pgoprofdata
+; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.proftext %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.pgomemprofdata
+; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.proftext -o %t.pgoprofdata
;; In all below cases we should not get any messages about missing profile data
;; for any functions. Either we are not performing any matching for a particular
Index: llvm/test/Transforms/PGOProfile/Inputs/memprof_pgo.proftext
===================================================================
--- /dev/null
+++ llvm/test/Transforms/PGOProfile/Inputs/memprof_pgo.proftext
@@ -0,0 +1,60 @@
+# IR level Instrumentation Flag
+:ir
+_Z3barv
+# Func Hash:
+742261418966908927
+# Num Counters:
+1
+# Counter Values:
+1
+
+_Z3bazv
+# Func Hash:
+742261418966908927
+# Num Counters:
+1
+# Counter Values:
+1
+
+_Z3foov
+# Func Hash:
+742261418966908927
+# Num Counters:
+1
+# Counter Values:
+6
+
+_Z4foo2v
+# Func Hash:
+742261418966908927
+# Num Counters:
+1
+# Counter Values:
+2
+
+_Z7recursej
+# Func Hash:
+146835647075900052
+# Num Counters:
+2
+# Counter Values:
+7
+2
+
+main
+# Func Hash:
+303685788594980264
+# Num Counters:
+10
+# Counter Values:
+2
+2
+1
+1
+1
+1
+1
+1
+1
+1
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156460.544848.patch
Type: text/x-patch
Size: 1836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230727/57b36829/attachment.bin>
More information about the llvm-commits
mailing list