···226226 Traces and records the max latency that it takes for227227 the highest priority task to get scheduled after228228 it has been woken up.229229+ Traces all tasks as an average developer would expect.230230+231231+ "wakeup_rt"232232+233233+ Traces and records the max latency that it takes for just234234+ RT tasks (as the current "wakeup" does). This is useful235235+ for those interested in wake up timings of RT tasks.229236230237 "hw-branch-tracer"231238
+12-12
arch/x86/kernel/process.c
···377377void default_idle(void)378378{379379 if (hlt_use_halt()) {380380- trace_power_start(POWER_CSTATE, 1, smp_processor_id());381381- trace_cpu_idle(1, smp_processor_id());380380+ trace_power_start_rcuidle(POWER_CSTATE, 1, smp_processor_id());381381+ trace_cpu_idle_rcuidle(1, smp_processor_id());382382 current_thread_info()->status &= ~TS_POLLING;383383 /*384384 * TS_POLLING-cleared state must be visible before we···391391 else392392 local_irq_enable();393393 current_thread_info()->status |= TS_POLLING;394394- trace_power_end(smp_processor_id());395395- trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());394394+ trace_power_end_rcuidle(smp_processor_id());395395+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());396396 } else {397397 local_irq_enable();398398 /* loop is done by the caller */···450450static void mwait_idle(void)451451{452452 if (!need_resched()) {453453- trace_power_start(POWER_CSTATE, 1, smp_processor_id());454454- trace_cpu_idle(1, smp_processor_id());453453+ trace_power_start_rcuidle(POWER_CSTATE, 1, smp_processor_id());454454+ trace_cpu_idle_rcuidle(1, smp_processor_id());455455 if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR))456456 clflush((void *)¤t_thread_info()->flags);457457···461461 __sti_mwait(0, 0);462462 else463463 local_irq_enable();464464- trace_power_end(smp_processor_id());465465- trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());464464+ trace_power_end_rcuidle(smp_processor_id());465465+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());466466 } else467467 local_irq_enable();468468}···474474 */475475static void poll_idle(void)476476{477477- trace_power_start(POWER_CSTATE, 0, smp_processor_id());478478- trace_cpu_idle(0, smp_processor_id());477477+ trace_power_start_rcuidle(POWER_CSTATE, 0, smp_processor_id());478478+ trace_cpu_idle_rcuidle(0, smp_processor_id());479479 local_irq_enable();480480 while (!need_resched())481481 cpu_relax();482482- trace_power_end(smp_processor_id());483483- trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());482482+ trace_power_end_rcuidle(smp_processor_id());483483+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());484484}485485486486/*
···11291129 return NULL;1130113011311131 size = 1 << size_bits;11321132- hash->buckets = kzalloc(sizeof(*hash->buckets) * size, GFP_KERNEL);11321132+ hash->buckets = kcalloc(size, sizeof(*hash->buckets), GFP_KERNEL);1133113311341134 if (!hash->buckets) {11351135 kfree(hash);···31463146 mutex_lock(&ftrace_regex_lock);31473147 if (reset)31483148 ftrace_filter_reset(hash);31493149- if (buf)31503150- ftrace_match_records(hash, buf, len);31493149+ if (buf && !ftrace_match_records(hash, buf, len)) {31503150+ ret = -EINVAL;31513151+ goto out_regex_unlock;31523152+ }3151315331523154 mutex_lock(&ftrace_lock);31533155 ret = ftrace_hash_move(ops, enable, orig_hash, hash);···3159315731603158 mutex_unlock(&ftrace_lock);3161315931603160+ out_regex_unlock:31623161 mutex_unlock(&ftrace_regex_lock);3163316231643163 free_ftrace_hash(hash);···31763173 * Filters denote which functions should be enabled when tracing is enabled.31773174 * If @buf is NULL and reset is set, all functions will be enabled for tracing.31783175 */31793179-void ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,31763176+int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,31803177 int len, int reset)31813178{31823182- ftrace_set_regex(ops, buf, len, reset, 1);31793179+ return ftrace_set_regex(ops, buf, len, reset, 1);31833180}31843181EXPORT_SYMBOL_GPL(ftrace_set_filter);31853182···31943191 * is enabled. If @buf is NULL and reset is set, all functions will be enabled31953192 * for tracing.31963193 */31973197-void ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,31943194+int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,31983195 int len, int reset)31993196{32003200- ftrace_set_regex(ops, buf, len, reset, 0);31973197+ return ftrace_set_regex(ops, buf, len, reset, 0);32013198}32023199EXPORT_SYMBOL_GPL(ftrace_set_notrace);32033200/**