Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140655
b: refs/heads/master
c: 3244351
h: refs/heads/master
i:
  140653: aabf57e
  140651: a22a87d
  140647: 1bd57fa
  140639: c0b61d0
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Jan 22, 2009
1 parent 856516b commit 8386884
Show file tree
Hide file tree
Showing 2 changed files with 33 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: 97b17efe4537e11bf6669106cfe4ee2c5331b267
refs/heads/master: 3244351c31211a8b1ba8b4b34c3de04d5dfa03e4
34 changes: 32 additions & 2 deletions trunk/kernel/trace/trace_sched_wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ static int __read_mostly tracer_enabled;
static struct task_struct *wakeup_task;
static int wakeup_cpu;
static unsigned wakeup_prio = -1;
static int wakeup_rt;

static raw_spinlock_t wakeup_lock =
(raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
Expand Down Expand Up @@ -224,7 +225,7 @@ probe_wakeup(struct rq *rq, struct task_struct *p, int success)
tracing_record_cmdline(p);
tracing_record_cmdline(current);

if (likely(!rt_task(p)) ||
if ((wakeup_rt && !rt_task(p)) ||
p->prio >= wakeup_prio ||
p->prio >= current->prio)
return;
Expand Down Expand Up @@ -321,14 +322,26 @@ static void stop_wakeup_tracer(struct trace_array *tr)
unregister_trace_sched_wakeup(probe_wakeup);
}

static int wakeup_tracer_init(struct trace_array *tr)
static int __wakeup_tracer_init(struct trace_array *tr)
{
tracing_max_latency = 0;
wakeup_trace = tr;
start_wakeup_tracer(tr);
return 0;
}

static int wakeup_tracer_init(struct trace_array *tr)
{
wakeup_rt = 0;
return __wakeup_tracer_init(tr);
}

static int wakeup_rt_tracer_init(struct trace_array *tr)
{
wakeup_rt = 1;
return __wakeup_tracer_init(tr);
}

static void wakeup_tracer_reset(struct trace_array *tr)
{
stop_wakeup_tracer(tr);
Expand Down Expand Up @@ -360,6 +373,19 @@ static struct tracer wakeup_tracer __read_mostly =
#endif
};

static struct tracer wakeup_rt_tracer __read_mostly =
{
.name = "wakeup_rt",
.init = wakeup_rt_tracer_init,
.reset = wakeup_tracer_reset,
.start = wakeup_tracer_start,
.stop = wakeup_tracer_stop,
.print_max = 1,
#ifdef CONFIG_FTRACE_SELFTEST
.selftest = trace_selftest_startup_wakeup,
#endif
};

__init static int init_wakeup_tracer(void)
{
int ret;
Expand All @@ -368,6 +394,10 @@ __init static int init_wakeup_tracer(void)
if (ret)
return ret;

ret = register_tracer(&wakeup_rt_tracer);
if (ret)
return ret;

return 0;
}
device_initcall(init_wakeup_tracer);

0 comments on commit 8386884

Please sign in to comment.