Skip to content

Commit

Permalink
perf: Unindent labels
Browse files Browse the repository at this point in the history
Fixup random annoying style bits.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus <paulus@samba.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 9, 2010
1 parent b0a873e commit 9ed6060
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ perf_lock_task_context(struct task_struct *task, unsigned long *flags)
struct perf_event_context *ctx;

rcu_read_lock();
retry:
retry:
ctx = rcu_dereference(task->perf_event_ctxp);
if (ctx) {
/*
Expand Down Expand Up @@ -619,7 +619,7 @@ void perf_event_disable(struct perf_event *event)
return;
}

retry:
retry:
task_oncpu_function_call(task, __perf_event_disable, event);

raw_spin_lock_irq(&ctx->lock);
Expand Down Expand Up @@ -849,7 +849,7 @@ static void __perf_install_in_context(void *info)
if (!err && !ctx->task && cpuctx->max_pertask)
cpuctx->max_pertask--;

unlock:
unlock:
perf_enable();

raw_spin_unlock(&ctx->lock);
Expand Down Expand Up @@ -922,10 +922,12 @@ static void __perf_event_mark_enabled(struct perf_event *event,

event->state = PERF_EVENT_STATE_INACTIVE;
event->tstamp_enabled = ctx->time - event->total_time_enabled;
list_for_each_entry(sub, &event->sibling_list, group_entry)
if (sub->state >= PERF_EVENT_STATE_INACTIVE)
list_for_each_entry(sub, &event->sibling_list, group_entry) {
if (sub->state >= PERF_EVENT_STATE_INACTIVE) {
sub->tstamp_enabled =
ctx->time - sub->total_time_enabled;
}
}
}

/*
Expand Down Expand Up @@ -991,7 +993,7 @@ static void __perf_event_enable(void *info)
}
}

unlock:
unlock:
raw_spin_unlock(&ctx->lock);
}

Expand Down Expand Up @@ -1032,7 +1034,7 @@ void perf_event_enable(struct perf_event *event)
if (event->state == PERF_EVENT_STATE_ERROR)
event->state = PERF_EVENT_STATE_OFF;

retry:
retry:
raw_spin_unlock_irq(&ctx->lock);
task_oncpu_function_call(task, __perf_event_enable, event);

Expand All @@ -1052,7 +1054,7 @@ void perf_event_enable(struct perf_event *event)
if (event->state == PERF_EVENT_STATE_OFF)
__perf_event_mark_enabled(event, ctx);

out:
out:
raw_spin_unlock_irq(&ctx->lock);
}

Expand Down Expand Up @@ -1092,17 +1094,19 @@ static void ctx_sched_out(struct perf_event_context *ctx,
if (!ctx->nr_active)
goto out_enable;

if (event_type & EVENT_PINNED)
if (event_type & EVENT_PINNED) {
list_for_each_entry(event, &ctx->pinned_groups, group_entry)
group_sched_out(event, cpuctx, ctx);
}

if (event_type & EVENT_FLEXIBLE)
if (event_type & EVENT_FLEXIBLE) {
list_for_each_entry(event, &ctx->flexible_groups, group_entry)
group_sched_out(event, cpuctx, ctx);
}

out_enable:
perf_enable();
out:
out:
raw_spin_unlock(&ctx->lock);
}

Expand Down Expand Up @@ -1341,9 +1345,10 @@ ctx_flexible_sched_in(struct perf_event_context *ctx,
if (event->cpu != -1 && event->cpu != smp_processor_id())
continue;

if (group_can_go_on(event, cpuctx, can_add_hw))
if (group_can_go_on(event, cpuctx, can_add_hw)) {
if (group_sched_in(event, cpuctx, ctx))
can_add_hw = 0;
}
}
}

Expand Down Expand Up @@ -1373,7 +1378,7 @@ ctx_sched_in(struct perf_event_context *ctx,
ctx_flexible_sched_in(ctx, cpuctx);

perf_enable();
out:
out:
raw_spin_unlock(&ctx->lock);
}

Expand Down Expand Up @@ -1714,7 +1719,7 @@ static void perf_event_enable_on_exec(struct task_struct *task)
raw_spin_unlock(&ctx->lock);

perf_event_task_sched_in(task);
out:
out:
local_irq_restore(flags);
}

Expand Down Expand Up @@ -2053,7 +2058,7 @@ static struct perf_event_context *find_get_context(pid_t pid, int cpu)
if (!ptrace_may_access(task, PTRACE_MODE_READ))
goto errout;

retry:
retry:
ctx = perf_lock_task_context(task, &flags);
if (ctx) {
unclone_ctx(ctx);
Expand Down Expand Up @@ -2081,7 +2086,7 @@ static struct perf_event_context *find_get_context(pid_t pid, int cpu)
put_task_struct(task);
return ctx;

errout:
errout:
put_task_struct(task);
return ERR_PTR(err);
}
Expand Down Expand Up @@ -3264,7 +3269,7 @@ static void perf_output_put_handle(struct perf_output_handle *handle)
if (handle->wakeup != local_read(&buffer->wakeup))
perf_output_wakeup(handle);

out:
out:
preempt_enable();
}

Expand Down Expand Up @@ -4562,7 +4567,7 @@ static int swevent_hlist_get_cpu(struct perf_event *event, int cpu)
rcu_assign_pointer(cpuctx->swevent_hlist, hlist);
}
cpuctx->hlist_refcount++;
exit:
exit:
mutex_unlock(&cpuctx->hlist_mutex);

return err;
Expand All @@ -4587,7 +4592,7 @@ static int swevent_hlist_get(struct perf_event *event)
put_online_cpus();

return 0;
fail:
fail:
for_each_possible_cpu(cpu) {
if (cpu == failed_cpu)
break;
Expand Down

0 comments on commit 9ed6060

Please sign in to comment.