[llvm] [ctx_prof] test tool: generate ctxprof bistream from json (PR #100379)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 08:02:02 PDT 2024
================
@@ -3,37 +3,17 @@
; RUN: llvm-bcanalyzer --dump %t/empty.bitstream | FileCheck %s --check-prefix=EMPTY
; RUN: llvm-ctxprof-util fromJSON --input %S/Inputs/valid.json -output %t/valid.bitstream
-; RUN: llvm-bcanalyzer --dump %t/valid.bitstream | FileCheck %s --check-prefix=VALID
+
+; For the valid case, check against a reference output.
+; Note that uint64_t are printed as signed values by llvm-bcanalyzer:
+; * 18446744073709551613 in json is -3 in the output
+; * 18446744073709551612 in json is -4 in the output
+; Also we have no callee/context at index 0, 2 callsites for index 1, and one for
+; index 2.
+; RUN: llvm-bcanalyzer --dump %t/valid.bitstream | head -27 > %t.valid.in
+; RUN: diff %S/Inputs/valid.expected %t.valid.in
----------------
teresajohnson wrote:
Prefer the expected to be inlined here like it was earlier, which will be easier to analyze (and give more meaningful error output) on a mismatch.
https://github.com/llvm/llvm-project/pull/100379
More information about the llvm-commits
mailing list