Instrument: Fix code for version 2 output format. (#2655)
Correct record size. Also bring version 2 tests up to version 1 equivalence.
This commit is contained in:
Родитель
08cc49ec59
Коммит
43fb2403a6
|
@ -605,7 +605,9 @@ uint32_t InstrumentPass::GetStreamWriteFunctionId(uint32_t stage_idx,
|
|||
context(), &*new_blk_ptr,
|
||||
IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping);
|
||||
// Gen test if debug output buffer size will not be exceeded.
|
||||
uint32_t obuf_record_sz = kInstStageOutCnt + val_spec_param_cnt;
|
||||
uint32_t val_spec_offset =
|
||||
(version_ == 1) ? kInstStageOutCnt : kInst2StageOutCnt;
|
||||
uint32_t obuf_record_sz = val_spec_offset + val_spec_param_cnt;
|
||||
uint32_t buf_id = GetOutputBufferId();
|
||||
uint32_t buf_uint_ptr_id = GetBufferUintPtrId();
|
||||
Instruction* obuf_curr_sz_ac_inst =
|
||||
|
@ -649,8 +651,6 @@ uint32_t InstrumentPass::GetStreamWriteFunctionId(uint32_t stage_idx,
|
|||
GenCommonStreamWriteCode(obuf_record_sz, param_vec[kInstCommonParamInstIdx],
|
||||
stage_idx, obuf_curr_sz_id, &builder);
|
||||
GenStageStreamWriteCode(stage_idx, obuf_curr_sz_id, &builder);
|
||||
uint32_t val_spec_offset =
|
||||
(version_ == 1) ? kInstStageOutCnt : kInst2StageOutCnt;
|
||||
// Gen writes of validation specific data
|
||||
for (uint32_t i = 0; i < val_spec_param_cnt; ++i) {
|
||||
GenDebugOutputFieldCode(obuf_curr_sz_id, val_spec_offset + i,
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче