hash-mismatch.proftext 816 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # If we see the same function name, but with different hashes, make
  2. # sure we keep both.
  3. # RUN: llvm-profdata merge %s -o %t 2>&1
  4. # RUN: llvm-profdata show %t -all-functions -counts > %t.out
  5. # The function ordering is non-deterministic, so we need to do our
  6. # checks in multiple runs.
  7. # RUN: FileCheck -check-prefix=FOO3 -check-prefix=BOTH %s -input-file %t.out
  8. # RUN: FileCheck -check-prefix=FOO4 -check-prefix=BOTH %s -input-file %t.out
  9. # FOO3: Hash: 0x{{0+}}3
  10. # FOO3-NEXT: Counters: 3
  11. # FOO3-NEXT: Function count: 1
  12. # FOO3-NEXT: Block counts: [2, 3]
  13. foo
  14. 3
  15. 3
  16. 1
  17. 2
  18. 3
  19. # FOO4: Hash: 0x{{0+}}4
  20. # FOO4-NEXT: Counters: 4
  21. # FOO4-NEXT: Function count: 11
  22. # FOO4-NEXT: Block counts: [22, 33, 44]
  23. foo
  24. 4
  25. 4
  26. 11
  27. 22
  28. 33
  29. 44
  30. # BOTH: Total functions: 2
  31. # BOTH: Maximum function count: 11
  32. # BOTH: Maximum internal block count: 44