mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
ftrace: sched special
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
36fc25a9f4
commit
88a4216c3e
4 changed files with 36 additions and 3 deletions
|
@ -103,6 +103,30 @@ ftrace_wake_up_task(void *__rq, struct task_struct *wakee,
|
|||
wakeup_sched_wakeup(wakee, curr);
|
||||
}
|
||||
|
||||
void
|
||||
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3)
|
||||
{
|
||||
struct trace_array *tr = ctx_trace;
|
||||
struct trace_array_cpu *data;
|
||||
unsigned long flags;
|
||||
long disabled;
|
||||
int cpu;
|
||||
|
||||
if (!tracer_enabled)
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
cpu = raw_smp_processor_id();
|
||||
data = tr->data[cpu];
|
||||
disabled = atomic_inc_return(&data->disabled);
|
||||
|
||||
if (likely(disabled == 1))
|
||||
__trace_special(tr, data, arg1, arg2, arg3);
|
||||
|
||||
atomic_dec(&data->disabled);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static void sched_switch_reset(struct trace_array *tr)
|
||||
{
|
||||
int cpu;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue