Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191346
b: refs/heads/master
c: 96c21a4
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 11, 2010
1 parent bcb96f7 commit a86963a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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: 050735b08ca8a016bbace4445fa025b88fee770b
refs/heads/master: 96c21a460a37880abfbc8445d5b098dbab958a29
26 changes: 13 additions & 13 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,18 @@ static void update_event_times(struct perf_event *event)
event->total_time_running = run_end - event->tstamp_running;
}

/*
* Update total_time_enabled and total_time_running for all events in a group.
*/
static void update_group_times(struct perf_event *leader)
{
struct perf_event *event;

update_event_times(leader);
list_for_each_entry(event, &leader->sibling_list, group_entry)
update_event_times(event);
}

static struct list_head *
ctx_group_list(struct perf_event *event, struct perf_event_context *ctx)
{
Expand Down Expand Up @@ -320,7 +332,7 @@ list_del_event(struct perf_event *event, struct perf_event_context *ctx)
if (event->group_leader != event)
event->group_leader->nr_siblings--;

update_event_times(event);
update_group_times(event);

/*
* If event was in error state, then keep it
Expand Down Expand Up @@ -501,18 +513,6 @@ static void perf_event_remove_from_context(struct perf_event *event)
raw_spin_unlock_irq(&ctx->lock);
}

/*
* Update total_time_enabled and total_time_running for all events in a group.
*/
static void update_group_times(struct perf_event *leader)
{
struct perf_event *event;

update_event_times(leader);
list_for_each_entry(event, &leader->sibling_list, group_entry)
update_event_times(event);
}

/*
* Cross CPU call to disable a performance event
*/
Expand Down

0 comments on commit a86963a

Please sign in to comment.