cpu: make PcCountPair use 64 bit unsigned int for count
In PcCountPair param, change the type for "count" from 32 bit int to 64 bit unsigned int. Change-Id: I2dc1bb2692914f06eaaae9bd5bbfb061bcbbfb8b
This commit is contained in:
@@ -170,12 +170,12 @@ init_pc(py::module_ &m_native)
|
||||
py::module_ m = m_native.def_submodule("pc");
|
||||
py::class_<PcCountPair>(m, "PcCountPair")
|
||||
.def(py::init<>())
|
||||
.def(py::init<Addr, int>())
|
||||
.def(py::init<Addr, uint64_t>())
|
||||
.def("__eq__", [](const PcCountPair& self, py::object other) {
|
||||
py::int_ pyPC = other.attr("get_pc")();
|
||||
py::int_ pyCount = other.attr("get_count")();
|
||||
uint64_t cPC = pyPC.cast<uint64_t>();
|
||||
int cCount = pyCount.cast<int>();
|
||||
uint64_t cCount = pyCount.cast<uint64_t>();
|
||||
return (self.getPC() == cPC && self.getCount() == cCount);
|
||||
})
|
||||
.def("__hash__", [](const PcCountPair& self){
|
||||
|
||||
Reference in New Issue
Block a user