@@ -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,")
@@ -646,11 +656,11 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
646
656
647
657
/* FIXME: Please remedy the fixme in the header before bumping the version. */
648
658
/* Raw profile format version (start from 1). */
649
- #define INSTR_PROF_RAW_VERSION 8
659
+ #define INSTR_PROF_RAW_VERSION 9
650
660
/* Indexed profile format version (start from 1). */
651
- #define INSTR_PROF_INDEX_VERSION 10
661
+ #define INSTR_PROF_INDEX_VERSION 11
652
662
/* Coverage mapping format version (start from 0). */
653
- #define INSTR_PROF_COVMAP_VERSION 5
663
+ #define INSTR_PROF_COVMAP_VERSION 6
654
664
655
665
/* Profile version is always of type uint64_t. Reserve the upper 8 bits in the
656
666
* version for other variants of profile. We set the lowest bit of the upper 8
@@ -687,6 +697,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
687
697
#define INSTR_PROF_DATA_COMMON __llvm_prf_data
688
698
#define INSTR_PROF_NAME_COMMON __llvm_prf_names
689
699
#define INSTR_PROF_CNTS_COMMON __llvm_prf_cnts
700
+ #define INSTR_PROF_BITS_COMMON __llvm_prf_bits
690
701
#define INSTR_PROF_VALS_COMMON __llvm_prf_vals
691
702
#define INSTR_PROF_VNODES_COMMON __llvm_prf_vnds
692
703
#define INSTR_PROF_COVMAP_COMMON __llvm_covmap
@@ -698,6 +709,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
698
709
#define INSTR_PROF_DATA_COFF " .lprfd$M"
699
710
#define INSTR_PROF_NAME_COFF " .lprfn$M"
700
711
#define INSTR_PROF_CNTS_COFF " .lprfc$M"
712
+ #define INSTR_PROF_BITS_COFF " .lprfb$M"
701
713
#define INSTR_PROF_VALS_COFF " .lprfv$M"
702
714
#define INSTR_PROF_VNODES_COFF " .lprfnd$M"
703
715
#define INSTR_PROF_COVMAP_COFF " .lcovmap$M"
@@ -709,6 +721,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
709
721
#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_DATA_COFF
710
722
#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_NAME_COFF
711
723
#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_CNTS_COFF
724
+ #define INSTR_PROF_BITS_SECT_NAME INSTR_PROF_BITS_COFF
712
725
/* Array of pointers. Each pointer points to a list
713
726
* of value nodes associated with one value site.
714
727
*/
@@ -723,6 +736,7 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
723
736
#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_DATA_COMMON)
724
737
#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_NAME_COMMON)
725
738
#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_CNTS_COMMON)
739
+ #define INSTR_PROF_BITS_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_BITS_COMMON)
726
740
/* Array of pointers. Each pointer points to a list
727
741
* of value nodes associated with one value site.
728
742
*/
0 commit comments