1 // See LICENSE for license details.
20 virtual ~memtracer_t() {}
22 virtual bool interested_in_range(uint64_t begin
, uint64_t end
, access_type type
) = 0;
23 virtual void trace(uint64_t addr
, size_t bytes
, access_type type
) = 0;
26 class memtracer_list_t
: public memtracer_t
29 bool empty() { return list
.empty(); }
30 bool interested_in_range(uint64_t begin
, uint64_t end
, access_type type
)
32 for (std::vector
<memtracer_t
*>::iterator it
= list
.begin(); it
!= list
.end(); ++it
)
33 if ((*it
)->interested_in_range(begin
, end
, type
))
37 void trace(uint64_t addr
, size_t bytes
, access_type type
)
39 for (std::vector
<memtracer_t
*>::iterator it
= list
.begin(); it
!= list
.end(); ++it
)
40 (*it
)->trace(addr
, bytes
, type
);
42 void hook(memtracer_t
* h
)
47 std::vector
<memtracer_t
*> list
;