Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205251
b: refs/heads/master
c: a6e6dea
h: refs/heads/master
i:
  205249: 3feee52
  205247: 146a675
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 9, 2010
1 parent 4a294e6 commit 0348383
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5e58793c7a8ec35e72ea6ec6c353499dd189809
refs/heads/master: a6e6dea68c18f705957573ee5596097c7e82d0e5
1 change: 1 addition & 0 deletions trunk/include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ struct perf_event {
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
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ static void __perf_event_read(void *info)

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)
Expand Down Expand Up @@ -5379,7 +5379,7 @@ static void sync_child_event(struct perf_event *child_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,
Expand Down

0 comments on commit 0348383

Please sign in to comment.