Skip to content

Commit d4b32f6

Browse files
committed
stf_inst_reader: Check for PTE-related trace features in the header before constructing a
PTE reader
1 parent 0857ea5 commit d4b32f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stf-inc/stf_inst_reader.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,10 @@ namespace stf {
413413
tid_ = 0;
414414
last_iem_ = getInitialIEM();
415415
iem_changes_allowed_ = (getISA() != ISA::RISCV);
416-
enable_address_translation_ = enable_address_translation;
416+
enable_address_translation_ = enable_address_translation &&
417+
ParentReader::getTraceFeatures()->hasAnyFeatures(TRACE_FEATURES::STF_CONTAIN_PTE,
418+
TRACE_FEATURES::STF_CONTAIN_PTE_ONLY,
419+
TRACE_FEATURES::STF_CONTAIN_PTE_HW_AD);
417420

418421
if(enable_address_translation_) {
419422
if(!pte_reader_) {

0 commit comments

Comments
 (0)