compat.proftext 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Compatibility tests for older profile format versions. These ensure
  2. # that we don't break compatibility with an older profile version
  3. # without noticing it.
  4. # The input file at %S/Inputs/compat.profdata.v1 was generated with
  5. # llvm-profdata merge from r214548.
  6. # RUN: llvm-profdata show %S/Inputs/compat.profdata.v1 --function function_count_only --counts | FileCheck %s -check-prefix=FUNC_COUNT_ONLY
  7. function_count_only
  8. 0
  9. 1
  10. 97531
  11. # FUNC_COUNT_ONLY: Hash: 0x{{0+$}}
  12. # FUNC_COUNT_ONLY-NEXT: Counters: 1
  13. # FUNC_COUNT_ONLY-NEXT: Function count: 97531
  14. # FUNC_COUNT_ONLY-NEXT: Block counts: []
  15. # RUN: llvm-profdata show %S/Inputs/compat.profdata.v1 --function "name with spaces" --counts | FileCheck %s -check-prefix=SPACES
  16. name with spaces
  17. 1024
  18. 2
  19. 0
  20. 0
  21. # SPACES: Hash: 0x{{0+}}400
  22. # SPACES-NEXT: Counters: 2
  23. # SPACES-NEXT: Function count: 0
  24. # SPACES-NEXT: Block counts: [0]
  25. # RUN: llvm-profdata show %S/Inputs/compat.profdata.v1 --function large_numbers --counts | FileCheck %s -check-prefix=LARGENUM
  26. large_numbers
  27. 4611686018427387903
  28. 6
  29. 2305843009213693952
  30. 1152921504606846976
  31. 576460752303423488
  32. 288230376151711744
  33. 144115188075855872
  34. 72057594037927936
  35. # LARGENUM: Hash: 0x3fffffffffffffff
  36. # LARGENUM-NEXT: Counters: 6
  37. # LARGENUM-NEXT: Function count: 2305843009213693952
  38. # LARGENUM-NEXT: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936]
  39. # RUN: llvm-profdata show %S/Inputs/compat.profdata.v1 | FileCheck %s -check-prefix=SUMMARY
  40. # SUMMARY: Total functions: 3
  41. # SUMMARY: Maximum function count: 2305843009213693952
  42. # SUMMARY: Maximum internal block count: 1152921504606846976