count-mismatch.proftext 847 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Make sure we don't try to combine counters with the same function
  2. # name and a matching hash if the number of counters differs
  3. # RUN: llvm-profdata merge %s -o %t.profdata 2>&1 | FileCheck -check-prefix=MERGE_ERRS %s
  4. # RUN: llvm-profdata show %t.profdata -all-functions -counts > %t.out
  5. # RUN: FileCheck %s -input-file %t.out
  6. foo
  7. 1024
  8. 4
  9. 1
  10. 2
  11. 4
  12. 8
  13. # The hash matches, but we can't combine these because the number of
  14. # counters differs.
  15. # MERGE_ERRS: count-mismatch.proftext: foo: Function count mismatch
  16. foo
  17. 1024
  18. 3
  19. 2
  20. 4
  21. 8
  22. # This one does match, so it should combine with the first just fine.
  23. # CHECK: Hash: 0x{{0+}}400
  24. # CHECK-NEXT: Counters: 4
  25. # CHECK-NEXT: Function count: 5
  26. # CHECK-NEXT: Block counts: [10, 20, 40]
  27. foo
  28. 1024
  29. 4
  30. 4
  31. 8
  32. 16
  33. 32
  34. # CHECK: Total functions: 1
  35. # CHECK: Maximum function count: 5
  36. # CHECK: Maximum internal block count: 40