@@ -76,6 +76,7 @@ INSTR_PROF_DATA(const uint64_t, llvm::Type::getInt64Ty(Ctx), FuncHash, \
76
76
ConstantInt::get(llvm::Type::getInt64Ty(Ctx), \
77
77
Inc->getHash()->getZExtValue()))
78
78
INSTR_PROF_DATA(const IntPtrT, IntPtrTy, CounterPtr, RelativeCounterPtr)
79
+ INSTR_PROF_DATA(const IntPtrT, IntPtrTy, BitmapPtr, RelativeBitmapPtr)
79
80
/* This is used to map function pointers for the indirect call targets to
80
81
* function name hashes during the conversion from raw to merged profile
81
82
* data.
@@ -87,7 +88,9 @@ INSTR_PROF_DATA(IntPtrT, llvm::Type::getInt8PtrTy(Ctx), Values, \
87
88
INSTR_PROF_DATA(const uint32_t , llvm::Type::getInt32Ty(Ctx), NumCounters, \
88
89
ConstantInt::get(llvm::Type::getInt32Ty(Ctx), NumCounters))
89
90
INSTR_PROF_DATA(const uint16_t , Int16ArrayTy, NumValueSites[IPVK_Last+1 ], \
90
- ConstantArray::get (Int16ArrayTy, Int16ArrayVals))
91
+ ConstantArray::get (Int16ArrayTy, Int16ArrayVals)) \
92
+ INSTR_PROF_DATA(const uint32_t , llvm::Type::getInt32Ty(Ctx), NumBitmapBytes, \
93
+ ConstantInt::get(llvm::Type::getInt32Ty(Ctx), NumBitmapBytes))
91
94
#undef INSTR_PROF_DATA
92
95
/* INSTR_PROF_DATA end. */
93
96
@@ -132,9 +135,13 @@ INSTR_PROF_RAW_HEADER(uint64_t, NumData, NumData)
132
135
INSTR_PROF_RAW_HEADER(uint64_t , PaddingBytesBeforeCounters, PaddingBytesBeforeCounters)
133
136
INSTR_PROF_RAW_HEADER(uint64_t , NumCounters, NumCounters)
134
137
INSTR_PROF_RAW_HEADER(uint64_t , PaddingBytesAfterCounters, PaddingBytesAfterCounters)
138
+ INSTR_PROF_RAW_HEADER(uint64_t , NumBitmapBytes, NumBitmapBytes)
139
+ INSTR_PROF_RAW_HEADER(uint64_t , PaddingBytesAfterBitmapBytes, PaddingBytesAfterBitmapBytes)
135
140
INSTR_PROF_RAW_HEADER(uint64_t , NamesSize, NamesSize)
136
141
INSTR_PROF_RAW_HEADER(uint64_t , CountersDelta,
137
142
(uintptr_t )CountersBegin - (uintptr_t )DataBegin)
143
+ INSTR_PROF_RAW_HEADER(uint64_t , BitmapDelta,
144
+ (uintptr_t )BitmapBegin - (uintptr_t )DataBegin)
138
145
INSTR_PROF_RAW_HEADER(uint64_t , NamesDelta, (uintptr_t )NamesBegin)
139
146
INSTR_PROF_RAW_HEADER(uint64_t , ValueKindLast, IPVK_Last)
140
147
#undef INSTR_PROF_RAW_HEADER
@@ -267,6 +274,9 @@ INSTR_PROF_SECT_ENTRY(IPSK_data, \
267
274
INSTR_PROF_SECT_ENTRY(IPSK_cnts, \
268
275
INSTR_PROF_QUOTE (INSTR_PROF_CNTS_COMMON), \
269
276
INSTR_PROF_CNTS_COFF, "__DATA,")
277
+ INSTR_PROF_SECT_ENTRY(IPSK_bitmap, \
278
+ INSTR_PROF_QUOTE (INSTR_PROF_BITS_COMMON), \
279
+ INSTR_PROF_BITS_COFF, "__DATA,")
270
280
INSTR_PROF_SECT_ENTRY(IPSK_name, \
271
281
INSTR_PROF_QUOTE (INSTR_PROF_NAME_COMMON), \
272
282
INSTR_PROF_NAME_COFF, "__DATA,")
@@ -645,11 +655,11 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
645
655
(uint64_t )' f' << 16 | (uint64_t )' R' << 8 | (uint64_t )129
646
656
647
657
/* Raw profile format version (start from 1). */
648
- #define INSTR_PROF_RAW_VERSION 8
658
+ #define INSTR_PROF_RAW_VERSION 9
649
659
/* Indexed profile format version (start from 1). */
650
- #define INSTR_PROF_INDEX_VERSION 10
660
+ #define INSTR_PROF_INDEX_VERSION 11
651
661
/* Coverage mapping format version (start from 0). */
652
- #define INSTR_PROF_COVMAP_VERSION 5
662
+ #define INSTR_PROF_COVMAP_VERSION 6
653
663
654
664
/* Profile version is always of type uint64_t. Reserve the upper 32 bits in the
655
665
* version for other variants of profile. We set the 8th most significant bit
@@ -686,6 +696,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
686
696
#define INSTR_PROF_DATA_COMMON __llvm_prf_data
687
697
#define INSTR_PROF_NAME_COMMON __llvm_prf_names
688
698
#define INSTR_PROF_CNTS_COMMON __llvm_prf_cnts
699
+ #define INSTR_PROF_BITS_COMMON __llvm_prf_bits
689
700
#define INSTR_PROF_VALS_COMMON __llvm_prf_vals
690
701
#define INSTR_PROF_VNODES_COMMON __llvm_prf_vnds
691
702
#define INSTR_PROF_COVMAP_COMMON __llvm_covmap
@@ -697,6 +708,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
697
708
#define INSTR_PROF_DATA_COFF " .lprfd$M"
698
709
#define INSTR_PROF_NAME_COFF " .lprfn$M"
699
710
#define INSTR_PROF_CNTS_COFF " .lprfc$M"
711
+ #define INSTR_PROF_BITS_COFF " .lprfb$M"
700
712
#define INSTR_PROF_VALS_COFF " .lprfv$M"
701
713
#define INSTR_PROF_VNODES_COFF " .lprfnd$M"
702
714
#define INSTR_PROF_COVMAP_COFF " .lcovmap$M"
@@ -708,6 +720,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
708
720
#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_DATA_COFF
709
721
#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_NAME_COFF
710
722
#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_CNTS_COFF
723
+ #define INSTR_PROF_BITS_SECT_NAME INSTR_PROF_BITS_COFF
711
724
/* Array of pointers. Each pointer points to a list
712
725
* of value nodes associated with one value site.
713
726
*/
@@ -722,6 +735,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
722
735
#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_DATA_COMMON)
723
736
#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_NAME_COMMON)
724
737
#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_CNTS_COMMON)
738
+ #define INSTR_PROF_BITS_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_BITS_COMMON)
725
739
/* Array of pointers. Each pointer points to a list
726
740
* of value nodes associated with one value site.
727
741
*/
0 commit comments