--- zzzz-none-000/linux-4.4.60/kernel/sched/core.c 2017-04-08 07:53:53.000000000 +0000 +++ dragonfly-4020-701/linux-4.4.60/kernel/sched/core.c 2018-11-08 13:36:17.000000000 +0000 @@ -90,6 +90,11 @@ #define CREATE_TRACE_POINTS #include +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ + + DEFINE_MUTEX(sched_domains_mutex); DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); @@ -2596,12 +2601,18 @@ * running on another CPU and we could rave with its RUNNING -> DEAD * transition, resulting in a double drop. */ + prev_state = prev->state; vtime_task_switch(prev); perf_event_task_sched_in(prev, current); finish_lock_switch(rq, prev); finish_arch_post_lock_switch(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_schedule_begin(current); +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ + + fire_sched_in_preempt_notifiers(current); if (mm) mmdrop(mm);