@@ -4877,8 +4877,8 @@ aot_dump_pgo_prof_data_to_buf(AOTModuleInstance *module_inst, char *buf,
48774877 }
48784878
48794879 prof_header .magic = 0xFF6C70726F667281LL ;
4880- /* Version 8 */
4881- prof_header .version = 0x0000000000000008LL ;
4880+ /* Version 9 */
4881+ prof_header .version = 0x0000000000000009LL ;
48824882 /* with VARIANT_MASK_IR_PROF (IR Instrumentation) */
48834883 prof_header .version |= 0x1ULL << 56 ;
48844884 /* with VARIANT_MASK_MEMPROF (Memory Profile) */
@@ -4887,14 +4887,19 @@ aot_dump_pgo_prof_data_to_buf(AOTModuleInstance *module_inst, char *buf,
48874887 prof_header .num_prof_counters = num_prof_counters ;
48884888 prof_header .names_size = prof_names_size ;
48894889 prof_header .value_kind_last = 1 ;
4890+ /* __llvm_prf_bits won't be used in PGO, set dummy value here */
4891+ prof_header .num_prof_bitmaps = 0 ;
4892+ prof_header .bitmap_delta = 0 ;
48904893
48914894 if (!is_little_endian ()) {
48924895 aot_exchange_uint64 ((uint8 * )& prof_header .magic );
48934896 aot_exchange_uint64 ((uint8 * )& prof_header .version );
48944897 aot_exchange_uint64 ((uint8 * )& prof_header .num_prof_data );
48954898 aot_exchange_uint64 ((uint8 * )& prof_header .num_prof_counters );
4899+ aot_exchange_uint64 ((uint8 * )& prof_header .num_prof_bitmaps );
48964900 aot_exchange_uint64 ((uint8 * )& prof_header .names_size );
48974901 aot_exchange_uint64 ((uint8 * )& prof_header .counters_delta );
4902+ aot_exchange_uint64 ((uint8 * )& prof_header .bitmap_delta );
48984903 aot_exchange_uint64 ((uint8 * )& prof_header .value_kind_last );
48994904 }
49004905
@@ -4912,19 +4917,23 @@ aot_dump_pgo_prof_data_to_buf(AOTModuleInstance *module_inst, char *buf,
49124917 prof_data_64 -> func_md5 = prof_data -> func_md5 ;
49134918 prof_data_64 -> func_hash = prof_data -> func_hash ;
49144919 prof_data_64 -> offset_counters = prof_data -> offset_counters ;
4920+ prof_data_64 -> offset_bitmaps = prof_data -> offset_bitmaps ;
49154921 prof_data_64 -> func_ptr = prof_data -> func_ptr ;
49164922 prof_data_64 -> values = (uint64 )(uintptr_t )prof_data -> values ;
49174923 prof_data_64 -> num_counters = prof_data -> num_counters ;
4924+ /* __llvm_prf_bits won't be used in PGO, set dummy value here */
4925+ prof_data_64 -> num_bitmaps = 0 ;
49184926 prof_data_64 -> num_value_sites [0 ] = prof_data -> num_value_sites [0 ];
49194927 prof_data_64 -> num_value_sites [1 ] = prof_data -> num_value_sites [1 ];
49204928
49214929 if (!is_little_endian ()) {
49224930 aot_exchange_uint64 ((uint8 * )& prof_data_64 -> func_hash );
49234931 aot_exchange_uint64 ((uint8 * )& prof_data_64 -> offset_counters );
4924- aot_exchange_uint64 ((uint8 * )& prof_data_64 -> offset_counters );
4932+ aot_exchange_uint64 ((uint8 * )& prof_data_64 -> offset_bitmaps );
49254933 aot_exchange_uint64 ((uint8 * )& prof_data_64 -> func_ptr );
49264934 aot_exchange_uint64 ((uint8 * )& prof_data_64 -> values );
49274935 aot_exchange_uint32 ((uint8 * )& prof_data_64 -> num_counters );
4936+ aot_exchange_uint32 ((uint8 * )& prof_data_64 -> num_bitmaps );
49284937 aot_exchange_uint16 ((uint8 * )& prof_data_64 -> num_value_sites [0 ]);
49294938 aot_exchange_uint16 ((uint8 * )& prof_data_64 -> num_value_sites [1 ]);
49304939 }
0 commit comments