Hi Robert, Apologies for the late reply. This is probably something easy to fix.
If you have a look at src/proto/inst.proto, it defines an enum of instruction types. If you see the enum list, it is missing number 47. What is probably happening is that a new instruction type had been added to gem5 but it hadn't been included in the proto files. Let me know if it is easy for you to fix this and contribute to master. If not, I can open a JIRA ticket and handle it myself as soon as I have more time. We should also find a way to prevent this syncing issues to happen again. This could be achieved by having a shared InstType enumeration or, if this is not possible in protobuf, to add a minimal protobuf test in the regression system. Giacomo ________________________________ From: gem5-dev <[email protected]> on behalf of Robert Henry <[email protected]> Sent: 26 November 2019 01:14 To: [email protected] <[email protected]> Subject: [gem5-dev] Use of protobuf backend with ARMv8 appears to be badly broken gem5'ers There is an attractive instruction tracer "InstPBTrace" in gem5, but no documentation on how to use it. I'm using gem5 for ARMv8. Taking a guess by analogy with documentation on how to enable other instr tracers, I hack into fs.py cpu.tracer = InstPBTrace() cpu.tracer.file_name = "/tmp/foo" And that starts up the InstPBTracer, albeit briefly. The tracer soon derails when it attempts to protobuf serialize an enumeration value which is not valid for protobuf encodings. See the stack trace below. Given the age of InstPBTrace, the lack of documentation, and the apparent misfit between the internals of gem5 and the protobuf specification, I would seem InstPBTrace is broken. Here's the stack trace; frame1 argument 'value' with value of 47 is rejected by Inst_InstType_IsValid. 0 ProtoMessage::Inst_InstType_IsValid (value=21845) at build/ARM/proto/inst.pb.cc:224 #1 0x00005555592d3849 in ProtoMessage::Inst::set_type (this=0x55555c9b5aa0, value=47) at build/ARM/proto/inst.pb.h:1143 #2 0x0000555559523c58 in Trace::InstPBTrace::traceInst (this=0x55555c8d9450, tc=0x55555c3db0d0, si=..., pc=...) at build/ARM/cpu/inst_pb_trace.cc:162 #3 0x00005555595232d9 in Trace::InstPBTraceRecord::dump (this=0x55555bbe9960) at build/ARM/cpu/inst_pb_trace.cc:63 #4 0x00005555592e6e79 in BaseSimpleCPU::postExecute (this=0x55555e0e8000) at build/ARM/cpu/simple/base.cc:657 #5 0x00005555592dcb5e in AtomicSimpleCPU::tick (this=0x55555e0e8000) at build/ARM/cpu/simple/atomic.cc:733 #6 0x00005555592d8f7d in AtomicSimpleCPU::<lambda()>::operator()(void) const (__closure=0x55555e0e8458) at build/ARM/cpu/simple/atomic.cc:81 #7 0x00005555592dd164 in std::_Function_handler<void(), AtomicSimpleCPU::AtomicSimpleCPU(AtomicSimpleCPUParams*)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/9/bits/std_function.h:300 #8 0x000055555721781e in std::function<void ()>::operator()() const (this=0x55555e0e8458) at /usr/include/c++/9/bits/std_function.h:690 #9 0x0000555557216a14 in EventFunctionWrapper::process (this=0x55555e0e8420) at build/ARM/sim/eventq.hh:836 #10 0x0000555557519095 in EventQueue::serviceOne (this=0x55555bf9bf20) at build/ARM/sim/eventq.cc:228 #11 0x0000555557523b1c in doSimLoop (eventq=0x55555bf9bf20) at build/ARM/sim/simulate.cc:219 #12 0x000055555752372e in simulate (num_cycles=18446744073709551615) at build/ARM/sim/simulate.cc:132 #13 0x0000555557356652 in pybind11::detail::argument_loader<unsigned long>::call_impl<GlobalSimLoopExitEvent*, GlobalSimLoopExitEvent* (*&)(unsigned long), 0ul, pybind11::detail::void_type> (this=0x7fffffffd288, f=@0x55555bc295b8: 0x5555575233f4 <simulate(unsigned long)>) at ext/pybind11/include/pybind11/cast.h:1935 _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
