Re: [Qemu-devel] [RFC PATCH 05/21] trace: keep a count of trace-point hits

2018-10-06 Thread Richard Henderson
On 10/5/18 8:48 AM, Alex Bennée wrote: > @@ -81,6 +81,8 @@ def generate_c(event, group): > cond = "trace_event_get_state(%s)" % event_id > > out('', > +'%(event_obj)s.count++;', > +'', > 'if (!%(cond)s) {', > 'return;', > '

[Qemu-devel] [RFC PATCH 05/21] trace: keep a count of trace-point hits

2018-10-05 Thread Alex Bennée
When working via the HMP to dynamically enable trace points it would be useful to know if trace points are currently being hit. As the cost is low we can simply increment a counter as we consider if we are going to trace the event. This cannot be precise as we don't take care to use atomic accesse