mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
InstrProf: Allow hexadecimal function hashes in proftext format
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231685 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -113,7 +113,7 @@ std::error_code TextInstrProfReader::readNextRecord(InstrProfRecord &Record) {
|
|||||||
// Read the function hash.
|
// Read the function hash.
|
||||||
if (Line.is_at_end())
|
if (Line.is_at_end())
|
||||||
return error(instrprof_error::truncated);
|
return error(instrprof_error::truncated);
|
||||||
if ((Line++)->getAsInteger(10, Record.Hash))
|
if ((Line++)->getAsInteger(0, Record.Hash))
|
||||||
return error(instrprof_error::malformed);
|
return error(instrprof_error::malformed);
|
||||||
|
|
||||||
// Read the number of counters.
|
// Read the number of counters.
|
||||||
|
@ -38,6 +38,14 @@ large_numbers
|
|||||||
# LARGENUM-NEXT: Function count: 2305843009213693952
|
# LARGENUM-NEXT: Function count: 2305843009213693952
|
||||||
# LARGENUM-NEXT: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936]
|
# LARGENUM-NEXT: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936]
|
||||||
|
|
||||||
|
# RUN: llvm-profdata show %t.profdata --function hex_hash | FileCheck %s -check-prefix=HEX-HASH
|
||||||
|
hex_hash
|
||||||
|
0x1234
|
||||||
|
1
|
||||||
|
0
|
||||||
|
# HEX-HASH: Hash: 0x0000000000001234
|
||||||
|
# HEX-HASH-NEXT: Counters: 1
|
||||||
|
|
||||||
# RUN: llvm-profdata show %t.profdata --function NOSUCHFUNC | FileCheck %s -check-prefix=NOSUCHFUNC
|
# RUN: llvm-profdata show %t.profdata --function NOSUCHFUNC | FileCheck %s -check-prefix=NOSUCHFUNC
|
||||||
# NOSUCHFUNC-NOT: Counters:
|
# NOSUCHFUNC-NOT: Counters:
|
||||||
# NOSUCHFUNC: Functions shown: 0
|
# NOSUCHFUNC: Functions shown: 0
|
||||||
@ -46,11 +54,11 @@ large_numbers
|
|||||||
# SOMEFUNCS: Counters:
|
# SOMEFUNCS: Counters:
|
||||||
# SOMEFUNCS: function_count_only:
|
# SOMEFUNCS: function_count_only:
|
||||||
# SOMEFUNCS: large_numbers:
|
# SOMEFUNCS: large_numbers:
|
||||||
# SOMEFUNCS: Functions shown: 2
|
# SOMEFUNCS: Functions shown: 3
|
||||||
|
|
||||||
# RUN: llvm-profdata show %t.profdata | FileCheck %s -check-prefix=SUMMARY
|
# RUN: llvm-profdata show %t.profdata | FileCheck %s -check-prefix=SUMMARY
|
||||||
# SUMMARY-NOT: Counters:
|
# SUMMARY-NOT: Counters:
|
||||||
# SUMMARY-NOT: Functions shown:
|
# SUMMARY-NOT: Functions shown:
|
||||||
# SUMMARY: Total functions: 3
|
# SUMMARY: Total functions: 4
|
||||||
# SUMMARY: Maximum function count: 2305843009213693952
|
# SUMMARY: Maximum function count: 2305843009213693952
|
||||||
# SUMMARY: Maximum internal block count: 1152921504606846976
|
# SUMMARY: Maximum internal block count: 1152921504606846976
|
||||||
|
Reference in New Issue
Block a user