@@ -348,9 +348,6 @@ INSTR_PROF_SECT_ENTRY(IPSK_covmap, \
348348INSTR_PROF_SECT_ENTRY(IPSK_covfun, \
349349 INSTR_PROF_QUOTE (INSTR_PROF_COVFUN_COMMON), \
350350 INSTR_PROF_COVFUN_COFF, "__LLVM_COV,")
351- INSTR_PROF_SECT_ENTRY(IPSK_orderfile, \
352- INSTR_PROF_QUOTE (INSTR_PROF_ORDERFILE_COMMON), \
353- INSTR_PROF_QUOTE(INSTR_PROF_ORDERFILE_COFF), "__DATA,")
354351INSTR_PROF_SECT_ENTRY(IPSK_covdata, \
355352 INSTR_PROF_QUOTE (INSTR_PROF_COVDATA_COMMON), \
356353 INSTR_PROF_COVDATA_COFF, "__LLVM_COV,")
@@ -408,14 +405,14 @@ typedef struct ValueProfRecord {
408405 /* !
409406 * Read data from this record and save it to Record.
410407 */
411- void deserializeTo (InstrProfRecord &Record,
408+ LLVM_ABI void deserializeTo (InstrProfRecord &Record,
412409 InstrProfSymtab *SymTab);
413410 /*
414411 * In-place byte swap:
415412 * Do byte swap for this instance. \c Old is the original order before
416413 * the swap, and \c New is the New byte order.
417414 */
418- void swapBytes (llvm::endianness Old, llvm::endianness New);
415+ LLVM_ABI void swapBytes (llvm::endianness Old, llvm::endianness New);
419416#endif
420417} ValueProfRecord;
421418
@@ -452,48 +449,48 @@ typedef struct ValueProfData {
452449 * Return the total size in bytes of the on-disk value profile data
453450 * given the data stored in Record.
454451 */
455- static uint32_t getSize (const InstrProfRecord &Record);
452+ LLVM_ABI static uint32_t getSize (const InstrProfRecord &Record);
456453 /* !
457454 * Return a pointer to \c ValueProfData instance ready to be streamed.
458455 */
459- static std::unique_ptr<ValueProfData>
456+ LLVM_ABI static std::unique_ptr<ValueProfData>
460457 serializeFrom (const InstrProfRecord &Record);
461458 /* !
462459 * Check the integrity of the record.
463460 */
464- Error checkIntegrity ();
461+ LLVM_ABI Error checkIntegrity ();
465462 /* !
466463 * Return a pointer to \c ValueProfileData instance ready to be read.
467464 * All data in the instance are properly byte swapped. The input
468465 * data is assumed to be in little endian order.
469466 */
470- static Expected<std::unique_ptr<ValueProfData>>
467+ LLVM_ABI static Expected<std::unique_ptr<ValueProfData>>
471468 getValueProfData (const unsigned char *SrcBuffer,
472469 const unsigned char *const SrcBufferEnd,
473470 llvm::endianness SrcDataEndianness);
474471 /* !
475472 * Swap byte order from \c Endianness order to host byte order.
476473 */
477- void swapBytesToHost (llvm::endianness Endianness);
474+ LLVM_ABI void swapBytesToHost (llvm::endianness Endianness);
478475 /* !
479476 * Swap byte order from host byte order to \c Endianness order.
480477 */
481- void swapBytesFromHost (llvm::endianness Endianness);
478+ LLVM_ABI void swapBytesFromHost (llvm::endianness Endianness);
482479 /* !
483480 * Return the total size of \c ValueProfileData.
484481 */
485- uint32_t getSize () const { return TotalSize; }
482+ LLVM_ABI uint32_t getSize () const { return TotalSize; }
486483 /* !
487484 * Read data from this data and save it to \c Record.
488485 */
489- void deserializeTo (InstrProfRecord &Record,
486+ LLVM_ABI void deserializeTo (InstrProfRecord &Record,
490487 InstrProfSymtab *SymTab);
491488 void operator delete (void *ptr) { ::operator delete (ptr); }
492489#endif
493490} ValueProfData;
494491
495492/*
496- * The closure is designed to abstact away two types of value profile data:
493+ * The closure is designed to abstract away two types of value profile data:
497494 * - InstrProfRecord which is the primary data structure used to
498495 * represent profile data in host tools (reader, writer, and profile-use)
499496 * - value profile runtime data structure suitable to be used by C
@@ -778,7 +775,6 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
778775#define INSTR_PROF_COVFUN_COMMON __llvm_covfun
779776#define INSTR_PROF_COVDATA_COMMON __llvm_covdata
780777#define INSTR_PROF_COVNAME_COMMON __llvm_covnames
781- #define INSTR_PROF_ORDERFILE_COMMON __llvm_orderfile
782778#define INSTR_PROF_COVINIT_COMMON __llvm_covinit
783779
784780/* Windows section names. Because these section names contain dollar characters,
@@ -799,7 +795,6 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
799795 */
800796#define INSTR_PROF_COVDATA_COFF " .lcovd"
801797#define INSTR_PROF_COVNAME_COFF " .lcovn"
802- #define INSTR_PROF_ORDERFILE_COFF " .lorderfile$M"
803798
804799// FIXME: Placeholder for Windows. Windows currently does not initialize
805800// the GCOV functions in the runtime.
@@ -823,7 +818,6 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
823818#define INSTR_PROF_COVFUN_SECT_NAME INSTR_PROF_COVFUN_COFF
824819#define INSTR_PROF_COVDATA_SECT_NAME INSTR_PROF_COVDATA_COFF
825820#define INSTR_PROF_COVNAME_SECT_NAME INSTR_PROF_COVNAME_COFF
826- #define INSTR_PROF_ORDERFILE_SECT_NAME INSTR_PROF_ORDERFILE_COFF
827821#define INSTR_PROF_COVINIT_SECT_NAME INSTR_PROF_COVINIT_COFF
828822#else
829823/* Runtime section names and name strings. */
@@ -843,19 +837,9 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
843837#define INSTR_PROF_COVFUN_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_COVFUN_COMMON)
844838#define INSTR_PROF_COVDATA_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_COVDATA_COMMON)
845839#define INSTR_PROF_COVNAME_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_COVNAME_COMMON)
846- /* Order file instrumentation. */
847- #define INSTR_PROF_ORDERFILE_SECT_NAME \
848- INSTR_PROF_QUOTE (INSTR_PROF_ORDERFILE_COMMON)
849840#define INSTR_PROF_COVINIT_SECT_NAME INSTR_PROF_QUOTE (INSTR_PROF_COVINIT_COMMON)
850841#endif
851842
852- #define INSTR_PROF_ORDERFILE_BUFFER_NAME _llvm_order_file_buffer
853- #define INSTR_PROF_ORDERFILE_BUFFER_NAME_STR \
854- INSTR_PROF_QUOTE (INSTR_PROF_ORDERFILE_BUFFER_NAME)
855- #define INSTR_PROF_ORDERFILE_BUFFER_IDX_NAME _llvm_order_file_buffer_idx
856- #define INSTR_PROF_ORDERFILE_BUFFER_IDX_NAME_STR \
857- INSTR_PROF_QUOTE (INSTR_PROF_ORDERFILE_BUFFER_IDX_NAME)
858-
859843/* Macros to define start/stop section symbol for a given
860844 * section on Linux. For instance
861845 * INSTR_PROF_SECT_START(INSTR_PROF_DATA_SECT_NAME) will
@@ -889,12 +873,6 @@ typedef struct InstrProfValueData {
889873
890874#endif /* INSTR_PROF_DATA_INC */
891875
892- #ifndef INSTR_ORDER_FILE_INC
893- /* The maximal # of functions: 128*1024 (the buffer size will be 128*4 KB). */
894- #define INSTR_ORDER_FILE_BUFFER_SIZE 131072
895- #define INSTR_ORDER_FILE_BUFFER_BITS 17
896- #define INSTR_ORDER_FILE_BUFFER_MASK 0x1ffff
897- #endif /* INSTR_ORDER_FILE_INC */
898876#else
899877#undef INSTR_PROF_DATA_DEFINED
900878#endif
0 commit comments