diff --git a/clients/drcachesim/common/options.cpp b/clients/drcachesim/common/options.cpp index f5c65931ac5..bb875fcc5af 100644 --- a/clients/drcachesim/common/options.cpp +++ b/clients/drcachesim/common/options.cpp @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright (c) 2015-2019 Google, Inc. All rights reserved. + * Copyright (c) 2015-2020 Google, Inc. All rights reserved. * **********************************************************/ /* @@ -175,7 +175,8 @@ droption_t op_coherence( droption_t op_use_physical( DROPTION_SCOPE_CLIENT, "use_physical", false, "Use physical addresses if possible", "If available, the default virtual addresses will be translated to physical. " - "This is not possible from user mode on all platforms."); + "This is not possible from user mode on all platforms. " + "This is not supported with -offline at this time."); droption_t op_virt2phys_freq( DROPTION_SCOPE_CLIENT, "virt2phys_freq", 0, "Frequency of physical mapping refresh", diff --git a/clients/drcachesim/tracer/instru_offline.cpp b/clients/drcachesim/tracer/instru_offline.cpp index ec45c8c1285..c19088d5536 100644 --- a/clients/drcachesim/tracer/instru_offline.cpp +++ b/clients/drcachesim/tracer/instru_offline.cpp @@ -220,6 +220,9 @@ offline_instru_t::get_entry_size(byte *buf_ptr) const addr_t offline_instru_t::get_entry_addr(byte *buf_ptr) const { + // TODO i#4014: To support -use_physical we would need to handle a PC + // entry here. + DR_ASSERT(!type_is_instr(get_entry_type(buf_ptr))); offline_entry_t *entry = (offline_entry_t *)buf_ptr; return entry->addr.addr; } diff --git a/clients/drcachesim/tracer/tracer.cpp b/clients/drcachesim/tracer/tracer.cpp index fa049ef4afc..f77d383681b 100644 --- a/clients/drcachesim/tracer/tracer.cpp +++ b/clients/drcachesim/tracer/tracer.cpp @@ -1764,6 +1764,10 @@ drmemtrace_client_main(client_id_t id, int argc, const char *argv[]) instru = new (placement) offline_instru_t( insert_load_buf_ptr, op_L0_filter.get_value(), &scratch_reserve_vec, file_ops_func.write_file, module_file, op_disable_optimizations.get_value()); + if (op_use_physical.get_value()) { + /* TODO i#4014: Add support for this combination. */ + FATAL("Usage error: -offline does not currently support -use_physical."); + } } else { void *placement; /* we use placement new for better isolation */