@@ -4877,8 +4877,8 @@ aot_dump_pgo_prof_data_to_buf(AOTModuleInstance *module_inst, char *buf,
4877
4877
}
4878
4878
4879
4879
prof_header .magic = 0xFF6C70726F667281LL ;
4880
- /* Version 8 */
4881
- prof_header .version = 0x0000000000000008LL ;
4880
+ /* Version 9 */
4881
+ prof_header .version = 0x0000000000000009LL ;
4882
4882
/* with VARIANT_MASK_IR_PROF (IR Instrumentation) */
4883
4883
prof_header .version |= 0x1ULL << 56 ;
4884
4884
/* with VARIANT_MASK_MEMPROF (Memory Profile) */
@@ -4887,14 +4887,19 @@ aot_dump_pgo_prof_data_to_buf(AOTModuleInstance *module_inst, char *buf,
4887
4887
prof_header .num_prof_counters = num_prof_counters ;
4888
4888
prof_header .names_size = prof_names_size ;
4889
4889
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 ;
4890
4893
4891
4894
if (!is_little_endian ()) {
4892
4895
aot_exchange_uint64 ((uint8 * )& prof_header .magic );
4893
4896
aot_exchange_uint64 ((uint8 * )& prof_header .version );
4894
4897
aot_exchange_uint64 ((uint8 * )& prof_header .num_prof_data );
4895
4898
aot_exchange_uint64 ((uint8 * )& prof_header .num_prof_counters );
4899
+ aot_exchange_uint64 ((uint8 * )& prof_header .num_prof_bitmaps );
4896
4900
aot_exchange_uint64 ((uint8 * )& prof_header .names_size );
4897
4901
aot_exchange_uint64 ((uint8 * )& prof_header .counters_delta );
4902
+ aot_exchange_uint64 ((uint8 * )& prof_header .bitmap_delta );
4898
4903
aot_exchange_uint64 ((uint8 * )& prof_header .value_kind_last );
4899
4904
}
4900
4905
@@ -4912,19 +4917,23 @@ aot_dump_pgo_prof_data_to_buf(AOTModuleInstance *module_inst, char *buf,
4912
4917
prof_data_64 -> func_md5 = prof_data -> func_md5 ;
4913
4918
prof_data_64 -> func_hash = prof_data -> func_hash ;
4914
4919
prof_data_64 -> offset_counters = prof_data -> offset_counters ;
4920
+ prof_data_64 -> offset_bitmaps = prof_data -> offset_bitmaps ;
4915
4921
prof_data_64 -> func_ptr = prof_data -> func_ptr ;
4916
4922
prof_data_64 -> values = (uint64 )(uintptr_t )prof_data -> values ;
4917
4923
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 ;
4918
4926
prof_data_64 -> num_value_sites [0 ] = prof_data -> num_value_sites [0 ];
4919
4927
prof_data_64 -> num_value_sites [1 ] = prof_data -> num_value_sites [1 ];
4920
4928
4921
4929
if (!is_little_endian ()) {
4922
4930
aot_exchange_uint64 ((uint8 * )& prof_data_64 -> func_hash );
4923
4931
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 );
4925
4933
aot_exchange_uint64 ((uint8 * )& prof_data_64 -> func_ptr );
4926
4934
aot_exchange_uint64 ((uint8 * )& prof_data_64 -> values );
4927
4935
aot_exchange_uint32 ((uint8 * )& prof_data_64 -> num_counters );
4936
+ aot_exchange_uint32 ((uint8 * )& prof_data_64 -> num_bitmaps );
4928
4937
aot_exchange_uint16 ((uint8 * )& prof_data_64 -> num_value_sites [0 ]);
4929
4938
aot_exchange_uint16 ((uint8 * )& prof_data_64 -> num_value_sites [1 ]);
4930
4939
}
0 commit comments