enum perf_event_active_state state;
unsigned int attach_state;
atomic64_t count;
+ atomic64_t child_count;
/*
* These are the total time in nanoseconds that the event
static inline u64 perf_event_count(struct perf_event *event)
{
- return atomic64_read(&event->count);
+ return atomic64_read(&event->count) + atomic64_read(&event->child_count);
}
static u64 perf_event_read(struct perf_event *event)
/*
* Add back the child's count to the parent's count:
*/
- atomic64_add(child_val, &parent_event->count);
+ atomic64_add(child_val, &parent_event->child_count);
atomic64_add(child_event->total_time_enabled,
&parent_event->child_total_time_enabled);
atomic64_add(child_event->total_time_running,