general.proftext 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # RUN: llvm-profdata merge %s -o %t.profdata
  2. # RUN: llvm-profdata show %t.profdata --function function_count_only --counts | FileCheck %s -check-prefix=FUNC_COUNT_ONLY
  3. function_count_only
  4. 0
  5. 1
  6. 97531
  7. # FUNC_COUNT_ONLY: Hash: 0x{{0+$}}
  8. # FUNC_COUNT_ONLY-NEXT: Counters: 1
  9. # FUNC_COUNT_ONLY-NEXT: Function count: 97531
  10. # FUNC_COUNT_ONLY-NEXT: Block counts: []
  11. # RUN: llvm-profdata show %t.profdata --function "name with spaces" --counts | FileCheck %s -check-prefix=SPACES
  12. name with spaces
  13. 1024
  14. 2
  15. 0
  16. 0
  17. # SPACES: Hash: 0x{{0+}}400
  18. # SPACES-NEXT: Counters: 2
  19. # SPACES-NEXT: Function count: 0
  20. # SPACES-NEXT: Block counts: [0]
  21. # RUN: llvm-profdata show %t.profdata --function large_numbers --counts | FileCheck %s -check-prefix=LARGENUM
  22. large_numbers
  23. 4611686018427387903
  24. 6
  25. 2305843009213693952
  26. 1152921504606846976
  27. 576460752303423488
  28. 288230376151711744
  29. 144115188075855872
  30. 72057594037927936
  31. # LARGENUM: Hash: 0x3fffffffffffffff
  32. # LARGENUM-NEXT: Counters: 6
  33. # LARGENUM-NEXT: Function count: 2305843009213693952
  34. # LARGENUM-NEXT: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936]
  35. # RUN: llvm-profdata show %t.profdata --function hex_hash | FileCheck %s -check-prefix=HEX-HASH
  36. hex_hash
  37. 0x1234
  38. 1
  39. 0
  40. # HEX-HASH: Hash: 0x0000000000001234
  41. # HEX-HASH-NEXT: Counters: 1
  42. # RUN: llvm-profdata show %t.profdata --function NOSUCHFUNC | FileCheck %s -check-prefix=NOSUCHFUNC
  43. # NOSUCHFUNC-NOT: Counters:
  44. # NOSUCHFUNC: Functions shown: 0
  45. # RUN: llvm-profdata show %t.profdata --function _ | FileCheck %s -check-prefix=SOMEFUNCS
  46. # SOMEFUNCS: Counters:
  47. # SOMEFUNCS: function_count_only:
  48. # SOMEFUNCS: large_numbers:
  49. # SOMEFUNCS: Functions shown: 3
  50. # RUN: llvm-profdata show %t.profdata | FileCheck %s -check-prefix=SUMMARY
  51. # SUMMARY-NOT: Counters:
  52. # SUMMARY-NOT: Functions shown:
  53. # SUMMARY: Total functions: 4
  54. # SUMMARY: Maximum function count: 2305843009213693952
  55. # SUMMARY: Maximum internal block count: 1152921504606846976