Commit 41dfba43 authored by Carsten Emde's avatar Carsten Emde Committed by Steven Rostedt

tracing: remove unused local variables in tracer probe functions

When the nsecs_to_usecs() conversion in probe_wakeup_sched_switch() and
check_critical_timing() was moved to a later stage in order to avoid
unnecessary computing, it was overlooked to remove the original
variables, assignments and comments..
Signed-off-by: default avatarCarsten Emde <C.Emde@osadl.org>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent fe63b94a
...@@ -129,15 +129,10 @@ check_critical_timing(struct trace_array *tr, ...@@ -129,15 +129,10 @@ check_critical_timing(struct trace_array *tr,
unsigned long parent_ip, unsigned long parent_ip,
int cpu) int cpu)
{ {
unsigned long latency, t0, t1;
cycle_t T0, T1, delta; cycle_t T0, T1, delta;
unsigned long flags; unsigned long flags;
int pc; int pc;
/*
* usecs conversion is slow so we try to delay the conversion
* as long as possible:
*/
T0 = data->preempt_timestamp; T0 = data->preempt_timestamp;
T1 = ftrace_now(cpu); T1 = ftrace_now(cpu);
delta = T1-T0; delta = T1-T0;
...@@ -157,17 +152,12 @@ check_critical_timing(struct trace_array *tr, ...@@ -157,17 +152,12 @@ check_critical_timing(struct trace_array *tr,
trace_function(tr, CALLER_ADDR0, parent_ip, flags, pc); trace_function(tr, CALLER_ADDR0, parent_ip, flags, pc);
latency = nsecs_to_usecs(delta);
if (data->critical_sequence != max_sequence) if (data->critical_sequence != max_sequence)
goto out_unlock; goto out_unlock;
tracing_max_latency = delta;
t0 = nsecs_to_usecs(T0);
t1 = nsecs_to_usecs(T1);
data->critical_end = parent_ip; data->critical_end = parent_ip;
tracing_max_latency = delta;
update_max_tr_single(tr, current, cpu); update_max_tr_single(tr, current, cpu);
max_sequence++; max_sequence++;
......
...@@ -110,7 +110,6 @@ static void notrace ...@@ -110,7 +110,6 @@ static void notrace
probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev, probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev,
struct task_struct *next) struct task_struct *next)
{ {
unsigned long latency = 0, t0 = 0, t1 = 0;
struct trace_array_cpu *data; struct trace_array_cpu *data;
cycle_t T0, T1, delta; cycle_t T0, T1, delta;
unsigned long flags; unsigned long flags;
...@@ -156,10 +155,6 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev, ...@@ -156,10 +155,6 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev,
trace_function(wakeup_trace, CALLER_ADDR0, CALLER_ADDR1, flags, pc); trace_function(wakeup_trace, CALLER_ADDR0, CALLER_ADDR1, flags, pc);
tracing_sched_switch_trace(wakeup_trace, prev, next, flags, pc); tracing_sched_switch_trace(wakeup_trace, prev, next, flags, pc);
/*
* usecs conversion is slow so we try to delay the conversion
* as long as possible:
*/
T0 = data->preempt_timestamp; T0 = data->preempt_timestamp;
T1 = ftrace_now(cpu); T1 = ftrace_now(cpu);
delta = T1-T0; delta = T1-T0;
...@@ -167,12 +162,7 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev, ...@@ -167,12 +162,7 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev,
if (!report_latency(delta)) if (!report_latency(delta))
goto out_unlock; goto out_unlock;
latency = nsecs_to_usecs(delta);
tracing_max_latency = delta; tracing_max_latency = delta;
t0 = nsecs_to_usecs(T0);
t1 = nsecs_to_usecs(T1);
update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu); update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu);
out_unlock: out_unlock:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment