Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211946
b: refs/heads/master
c: ebf31f5
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Oct 18, 2010
1 parent f9917c0 commit 8dc3d65
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 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: 7e54a5a0b655734326dc78c2b5efc1eb35497bb6
refs/heads/master: ebf31f502492527e2b6b5e5cf85a4ebc7fc8a52e
10 changes: 10 additions & 0 deletions trunk/include/linux/jump_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,14 @@ static inline int jump_label_text_reserved(void *start, void *end)

#endif

#define COND_STMT(key, stmt) \
do { \
__label__ jl_enabled; \
JUMP_LABEL(key, jl_enabled); \
if (0) { \
jl_enabled: \
stmt; \
} \
} while (0)

#endif
12 changes: 2 additions & 10 deletions trunk/include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -903,21 +903,13 @@ extern atomic_t perf_task_events;

static inline void perf_event_task_sched_in(struct task_struct *task)
{
JUMP_LABEL(&perf_task_events, have_events);
return;

have_events:
__perf_event_task_sched_in(task);
COND_STMT(&perf_task_events, __perf_event_task_sched_in(task));
}

static inline
void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next)
{
JUMP_LABEL(&perf_task_events, have_events);
return;

have_events:
__perf_event_task_sched_out(task, next);
COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next));
}

extern int perf_event_init_task(struct task_struct *child);
Expand Down

0 comments on commit 8dc3d65

Please sign in to comment.