Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175426
b: refs/heads/master
c: aa5452d
h: refs/heads/master
v: v3
  • Loading branch information
Xiao Guangrong authored and Ingo Molnar committed Dec 9, 2009
1 parent dac4c0d commit 592ddc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: 44234adcdce38f83c56e05f808ce656175b4beeb
refs/heads/master: aa5452d70c0d559310598b243b8b1033c10056e7
7 changes: 3 additions & 4 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/*
* Each CPU has a list of per CPU events:
*/
DEFINE_PER_CPU(struct perf_cpu_context, perf_cpu_context);
static DEFINE_PER_CPU(struct perf_cpu_context, perf_cpu_context);

int perf_max_events __read_mostly = 1;
static int perf_reserved_percpu __read_mostly;
Expand Down Expand Up @@ -1579,7 +1579,6 @@ static void
__perf_event_init_context(struct perf_event_context *ctx,
struct task_struct *task)
{
memset(ctx, 0, sizeof(*ctx));
spin_lock_init(&ctx->lock);
mutex_init(&ctx->mutex);
INIT_LIST_HEAD(&ctx->group_list);
Expand Down Expand Up @@ -1654,7 +1653,7 @@ static struct perf_event_context *find_get_context(pid_t pid, int cpu)
}

if (!ctx) {
ctx = kmalloc(sizeof(struct perf_event_context), GFP_KERNEL);
ctx = kzalloc(sizeof(struct perf_event_context), GFP_KERNEL);
err = -ENOMEM;
if (!ctx)
goto errout;
Expand Down Expand Up @@ -5105,7 +5104,7 @@ int perf_event_init_task(struct task_struct *child)
* First allocate and initialize a context for the child.
*/

child_ctx = kmalloc(sizeof(struct perf_event_context), GFP_KERNEL);
child_ctx = kzalloc(sizeof(struct perf_event_context), GFP_KERNEL);
if (!child_ctx)
return -ENOMEM;

Expand Down

0 comments on commit 592ddc6

Please sign in to comment.