Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162955
b: refs/heads/master
c: b5130b1
h: refs/heads/master
i:
  162953: a91e025
  162951: 4a0ef65
v: v3
  • Loading branch information
Carsten Emde authored and Steven Rostedt committed Sep 13, 2009
1 parent d94066d commit 76995a8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 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: 41dfba4367109b92d92ec6e059be6950497d932f
refs/heads/master: b5130b1e7d3717d03ab1916b198bf0d49fa0a619
5 changes: 5 additions & 0 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,11 @@ static void trace_init_cmdlines(void)
cmdline_idx = 0;
}

int is_tracing_stopped(void)
{
return trace_stop_count;
}

/**
* ftrace_off_permanent - disable all ftrace code permanently
*
Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ void tracing_stop_sched_switch_record(void);
void tracing_start_sched_switch_record(void);
int register_tracer(struct tracer *type);
void unregister_tracer(struct tracer *type);
int is_tracing_stopped(void);

extern unsigned long nsecs_to_usecs(unsigned long nsecs);

Expand Down
6 changes: 4 additions & 2 deletions trunk/kernel/trace/trace_irqsoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ check_critical_timing(struct trace_array *tr,

data->critical_end = parent_ip;

tracing_max_latency = delta;
update_max_tr_single(tr, current, cpu);
if (likely(!is_tracing_stopped())) {
tracing_max_latency = delta;
update_max_tr_single(tr, current, cpu);
}

max_sequence++;

Expand Down
6 changes: 4 additions & 2 deletions trunk/kernel/trace/trace_sched_wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev,
if (!report_latency(delta))
goto out_unlock;

tracing_max_latency = delta;
update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu);
if (likely(!is_tracing_stopped())) {
tracing_max_latency = delta;
update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu);
}

out_unlock:
__wakeup_reset(wakeup_trace);
Expand Down

0 comments on commit 76995a8

Please sign in to comment.