Skip to content

Commit

Permalink
trace: Cosmetic changes on fast-path tracing
Browse files Browse the repository at this point in the history
Signed-off-by: Lluís Vilanova <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
  • Loading branch information
Lluís Vilanova authored and stefanhaRH committed Jul 18, 2016
1 parent ca66f1a commit e1d6e0a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions trace/control-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ static inline bool trace_event_get_state_static(TraceEvent *ev)
return ev->sstate;
}

static inline bool trace_event_get_state_dynamic_by_id(int id)
static inline bool trace_event_get_state_dynamic_by_id(TraceEventID id)
{
/* it's on fast path, avoid consistency checks (asserts) */
return unlikely(trace_events_enabled_count) && trace_events_dstate[id];
}

static inline bool trace_event_get_state_dynamic(TraceEvent *ev)
{
int id = trace_event_get_id(ev);
TraceEventID id;
assert(trace_event_get_state_static(ev));
id = trace_event_get_id(ev);
return trace_event_get_state_dynamic_by_id(id);
}

Expand Down

0 comments on commit e1d6e0a

Please sign in to comment.