1 // See LICENSE for license details.
14 virtual ~memtracer_t() {}
16 virtual bool interested_in_range(uint64_t begin
, uint64_t end
, bool store
, bool fetch
) = 0;
17 virtual void trace(uint64_t addr
, size_t bytes
, bool store
, bool fetch
) = 0;
20 class memtracer_list_t
: public memtracer_t
23 bool empty() { return list
.empty(); }
24 bool interested_in_range(uint64_t begin
, uint64_t end
, bool store
, bool fetch
)
26 for (std::vector
<memtracer_t
*>::iterator it
= list
.begin(); it
!= list
.end(); ++it
)
27 if ((*it
)->interested_in_range(begin
, end
, store
, fetch
))
31 void trace(uint64_t addr
, size_t bytes
, bool store
, bool fetch
)
33 for (std::vector
<memtracer_t
*>::iterator it
= list
.begin(); it
!= list
.end(); ++it
)
34 (*it
)->trace(addr
, bytes
, store
, fetch
);
36 void hook(memtracer_t
* h
)
41 std::vector
<memtracer_t
*> list
;